Solved Exercises on Properties of Matrix Multiplication

Master matrix multiplication properties: associativity, distributivity, scalar multiplication, and identity matrices through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Associativity Property
Exercise 1
Verify the associative property: (AB)C = A(BC) for matrices
A = \(\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\), B = \(\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\), C = \(\begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix}\)
Definition:

Associativity: For matrices A (m×n), B (n×p), C (p×q): \((AB)C = A(BC)\)

Method:
  1. Calculate AB first, then multiply by C to get (AB)C
  2. Calculate BC first, then multiply by A to get A(BC)
  3. Compare the results
Calculate AB
\(AB = \begin{bmatrix} 2 & 1 \\ 4 & 3 \end{bmatrix}\)
Then (AB)C
\(\begin{bmatrix} 5 & 3 \\ 11 & 9 \end{bmatrix}\)
Step 1: Calculate AB

AB = \(\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\)

Row 1, Col 1: (1×0) + (2×1) = 0 + 2 = 2

Row 1, Col 2: (1×1) + (2×0) = 1 + 0 = 1

Row 2, Col 1: (3×0) + (4×1) = 0 + 4 = 4

Row 2, Col 2: (3×1) + (4×0) = 3 + 0 = 3

Step 2: Calculate (AB)C

(AB)C = \(\begin{bmatrix} 2 & 1 \\ 4 & 3 \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix}\)

Row 1, Col 1: (2×2) + (1×1) = 4 + 1 = 5

Row 1, Col 2: (2×0) + (1×3) = 0 + 3 = 3

Row 2, Col 1: (4×2) + (3×1) = 8 + 3 = 11

Row 2, Col 2: (4×0) + (3×3) = 0 + 9 = 9

Step 3: Calculate BC

BC = \(\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix}\)

Row 1, Col 1: (0×2) + (1×1) = 0 + 1 = 1

Row 1, Col 2: (0×0) + (1×3) = 0 + 3 = 3

Row 2, Col 1: (1×2) + (0×1) = 2 + 0 = 2

Row 2, Col 2: (1×0) + (0×3) = 0 + 0 = 0

Step 4: Calculate A(BC)

A(BC) = \(\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \begin{bmatrix} 1 & 3 \\ 2 & 0 \end{bmatrix}\)

Row 1, Col 1: (1×1) + (2×2) = 1 + 4 = 5

Row 1, Col 2: (1×3) + (2×0) = 3 + 0 = 3

Row 2, Col 1: (3×1) + (4×2) = 3 + 8 = 11

Row 2, Col 2: (3×3) + (4×0) = 9 + 0 = 9

(AB)C = A(BC) = \(\begin{bmatrix} 5 & 3 \\ 11 & 9 \end{bmatrix}\)
Final answer:

Associativity verified: (AB)C = A(BC)

Applied rules:

• Matrix multiplication: (AB)_{ij} = Σ A_{ik}B_{kj}

• Associativity: Order of grouping doesn't matter

• Dimension compatibility: A(m×n)B(n×p)C(p×q)

2 Distributive Property
Exercise 2
Verify the distributive property: A(B + C) = AB + AC for matrices
A = \(\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}\), B = \(\begin{bmatrix} 2 & 1 \\ 1 & 0 \end{bmatrix}\), C = \(\begin{bmatrix} 0 & 1 \\ 1 & 2 \end{bmatrix}\)
Definition:

Distributivity: A(B + C) = AB + AC and (A + B)C = AC + BC

Left side
A(B+C) = \(\begin{bmatrix} 4 & 5 \\ 2 & 3 \end{bmatrix}\)
Right side
AB + AC = \(\begin{bmatrix} 4 & 5 \\ 2 & 3 \end{bmatrix}\)
Step 1: Calculate B + C

B + C = \(\begin{bmatrix} 2 & 1 \\ 1 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 1 \\ 1 & 2 \end{bmatrix} = \begin{bmatrix} 2 & 2 \\ 2 & 2 \end{bmatrix}\)

Step 2: Calculate A(B + C)

A(B + C) = \(\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 2 & 2 \\ 2 & 2 \end{bmatrix}\)

Row 1, Col 1: (1×2) + (2×2) = 2 + 4 = 6

Wait, let me recalculate this correctly:

Row 1, Col 1: (1×2) + (2×2) = 2 + 4 = 6

Actually, Row 1, Col 1: (1×2) + (2×2) = 2 + 4 = 6

Let me recalculate carefully:

Row 1, Col 1: (1×2) + (2×2) = 2 + 4 = 6

Row 1, Col 2: (1×2) + (2×2) = 2 + 4 = 6

Row 2, Col 1: (0×2) + (1×2) = 0 + 2 = 2

Row 2, Col 2: (0×2) + (1×2) = 0 + 2 = 2

So A(B + C) = \(\begin{bmatrix} 6 & 6 \\ 2 & 2 \end{bmatrix}\)

Step 3: Calculate AB

AB = \(\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 2 & 1 \\ 1 & 0 \end{bmatrix}\)

Row 1, Col 1: (1×2) + (2×1) = 2 + 2 = 4

Row 1, Col 2: (1×1) + (2×0) = 1 + 0 = 1

Row 2, Col 1: (0×2) + (1×1) = 0 + 1 = 1

Row 2, Col 2: (0×1) + (1×0) = 0 + 0 = 0

So AB = \(\begin{bmatrix} 4 & 1 \\ 1 & 0 \end{bmatrix}\)

Step 4: Calculate AC

AC = \(\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 1 & 2 \end{bmatrix}\)

Row 1, Col 1: (1×0) + (2×1) = 0 + 2 = 2

Row 1, Col 2: (1×1) + (2×2) = 1 + 4 = 5

Row 2, Col 1: (0×0) + (1×1) = 0 + 1 = 1

Row 2, Col 2: (0×1) + (1×2) = 0 + 2 = 2

So AC = \(\begin{bmatrix} 2 & 5 \\ 1 & 2 \end{bmatrix}\)

Step 5: Calculate AB + AC

AB + AC = \(\begin{bmatrix} 4 & 1 \\ 1 & 0 \end{bmatrix} + \begin{bmatrix} 2 & 5 \\ 1 & 2 \end{bmatrix} = \begin{bmatrix} 6 & 6 \\ 2 & 2 \end{bmatrix}\)

A(B + C) = AB + AC = \(\begin{bmatrix} 6 & 6 \\ 2 & 2 \end{bmatrix}\)
Final answer:

Distributivity verified: A(B + C) = AB + AC

Applied rules:

• Distributivity: Matrix multiplication distributes over addition

• Matrix addition: Add corresponding elements

• Matrix multiplication: Standard algorithm

3 Scalar Multiplication Property
Exercise 3
Verify the scalar multiplication property: c(AB) = (cA)B = A(cB) for c = 3
A = \(\begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix}\), B = \(\begin{bmatrix} 0 & 2 \\ 1 & 1 \end{bmatrix}\)
Definition:

Scalar multiplication: c(AB) = (cA)B = A(cB) for scalar c

c(AB)
\(3 \times \begin{bmatrix} 0 & 2 \\ 1 & 5 \end{bmatrix} = \begin{bmatrix} 0 & 6 \\ 3 & 15 \end{bmatrix}\)
(cA)B
\(= \begin{bmatrix} 0 & 6 \\ 3 & 15 \end{bmatrix}\)
Step 1: Calculate AB

AB = \(\begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix} \begin{bmatrix} 0 & 2 \\ 1 & 1 \end{bmatrix}\)

Row 1, Col 1: (1×0) + (0×1) = 0

Row 1, Col 2: (1×2) + (0×1) = 2

Row 2, Col 1: (2×0) + (1×1) = 1

Row 2, Col 2: (2×2) + (1×1) = 5

So AB = \(\begin{bmatrix} 0 & 2 \\ 1 & 5 \end{bmatrix}\)

Step 2: Calculate c(AB)

c(AB) = 3 × \(\begin{bmatrix} 0 & 2 \\ 1 & 5 \end{bmatrix} = \begin{bmatrix} 0 & 6 \\ 3 & 15 \end{bmatrix}\)

Step 3: Calculate cA

cA = 3 × \(\begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix} = \begin{bmatrix} 3 & 0 \\ 6 & 3 \end{bmatrix}\)

Step 4: Calculate (cA)B

(cA)B = \(\begin{bmatrix} 3 & 0 \\ 6 & 3 \end{bmatrix} \begin{bmatrix} 0 & 2 \\ 1 & 1 \end{bmatrix}\)

Row 1, Col 1: (3×0) + (0×1) = 0

Row 1, Col 2: (3×2) + (0×1) = 6

Row 2, Col 1: (6×0) + (3×1) = 3

Row 2, Col 2: (6×2) + (3×1) = 15

So (cA)B = \(\begin{bmatrix} 0 & 6 \\ 3 & 15 \end{bmatrix}\)

Step 5: Calculate cB

cB = 3 × \(\begin{bmatrix} 0 & 2 \\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 0 & 6 \\ 3 & 3 \end{bmatrix}\)

Step 6: Calculate A(cB)

A(cB) = \(\begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix} \begin{bmatrix} 0 & 6 \\ 3 & 3 \end{bmatrix}\)

Row 1, Col 1: (1×0) + (0×3) = 0

Row 1, Col 2: (1×6) + (0×3) = 6

Row 2, Col 1: (2×0) + (1×3) = 3

Row 2, Col 2: (2×6) + (1×3) = 15

So A(cB) = \(\begin{bmatrix} 0 & 6 \\ 3 & 15 \end{bmatrix}\)

c(AB) = (cA)B = A(cB) = \(\begin{bmatrix} 0 & 6 \\ 3 & 15 \end{bmatrix}\)
Final answer:

Scalar multiplication property verified: c(AB) = (cA)B = A(cB)

Applied rules:

• Scalar multiplication: Multiply each element by the scalar

• Commutativity with scalars: Scalars can be moved freely

• Matrix multiplication: Standard algorithm

Matrix Multiplication Properties
(AB)C = A(BC)
Associativity
Property 1
A(B + C) = AB + AC
Left Distributivity
Property 2
(A + B)C = AC + BC
Right Distributivity
Property 3
c(AB) = (cA)B = A(cB)
Scalar Multiplication
Key Note: Matrix multiplication is NOT commutative: AB ≠ BA in general
Identity Matrix: AI = IA = A where I is the identity matrix
Zero Matrix: A0 = 0A = 0 where 0 is the zero matrix
Solution: Exercises 4 to 5
4 Identity Matrix Property
Exercise 4
Verify that AI = IA = A for matrix A = \(\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix}\) and identity matrix I
Definition:

Identity matrix: I = \(\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\), AI = IA = A for any square matrix A

AI
\(A \times I = A\)
IA
\(I \times A = A\)
Step 1: Calculate AI

AI = \(\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\)

Row 1, Col 1: (2×1) + (3×0) = 2

Row 1, Col 2: (2×0) + (3×1) = 3

Row 2, Col 1: (1×1) + (4×0) = 1

Row 2, Col 2: (1×0) + (4×1) = 4

So AI = \(\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix}\) = A ✓

Step 2: Calculate IA

IA = \(\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix}\)

Row 1, Col 1: (1×2) + (0×1) = 2

Row 1, Col 2: (1×3) + (0×4) = 3

Row 2, Col 1: (0×2) + (1×1) = 1

Row 2, Col 2: (0×3) + (1×4) = 4

So IA = \(\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix}\) = A ✓

Step 3: Verify the identity property

Both AI and IA equal the original matrix A, confirming the identity property

AI = IA = A = \(\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix}\)
Final answer:

Identity matrix property verified: AI = IA = A

Applied rules:

• Identity matrix: Acts as multiplicative identity

• Matrix multiplication: Standard algorithm

• Dimension compatibility: Identity matrix must match dimensions

5 Non-commutativity Example
Exercise 5
Show that AB ≠ BA for matrices A = \(\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}\) and B = \(\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\)
Definition:

Non-commutativity: In general, AB ≠ BA for matrices A and B

AB
\(= \begin{bmatrix} 2 & 1 \\ 1 & 0 \end{bmatrix}\)
BA
\(= \begin{bmatrix} 0 & 1 \\ 1 & 2 \end{bmatrix}\)
Step 1: Calculate AB

AB = \(\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\)

Row 1, Col 1: (1×0) + (2×1) = 0 + 2 = 2

Row 1, Col 2: (1×1) + (2×0) = 1 + 0 = 1

Row 2, Col 1: (0×0) + (1×1) = 0 + 1 = 1

Row 2, Col 2: (0×1) + (1×0) = 0 + 0 = 0

So AB = \(\begin{bmatrix} 2 & 1 \\ 1 & 0 \end{bmatrix}\)

Step 2: Calculate BA

BA = \(\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}\)

Row 1, Col 1: (0×1) + (1×0) = 0 + 0 = 0

Row 1, Col 2: (0×2) + (1×1) = 0 + 1 = 1

Row 2, Col 1: (1×1) + (0×0) = 1 + 0 = 1

Row 2, Col 2: (1×2) + (0×1) = 2 + 0 = 2

So BA = \(\begin{bmatrix} 0 & 1 \\ 1 & 2 \end{bmatrix}\)

Step 3: Compare AB and BA

AB = \(\begin{bmatrix} 2 & 1 \\ 1 & 0 \end{bmatrix}\) ≠ BA = \(\begin{bmatrix} 0 & 1 \\ 1 & 2 \end{bmatrix}\)

Since AB ≠ BA, matrix multiplication is not commutative

Step 4: Conclusion

This demonstrates that the order of matrix multiplication matters

AB ≠ BA: \(\begin{bmatrix} 2 & 1 \\ 1 & 0 \end{bmatrix}\) ≠ \(\begin{bmatrix} 0 & 1 \\ 1 & 2 \end{bmatrix}\)
Final answer:

Matrix multiplication is non-commutative: AB ≠ BA

Applied rules:

• Non-commutativity: Order matters in matrix multiplication

• Matrix multiplication: Standard algorithm

• Comparison: Check if matrices are equal element-wise

Matrix Multiplication: Properties, Rules, and Methods
(AB)_{ij} = Σ A_{ik}B_{kj}
Matrix Multiplication Formula
Key definitions:

Matrix multiplication: For A(m×n) and B(n×p), result C has dimension (m×p)

Associativity: (AB)C = A(BC) for compatible matrices

Distributivity: A(B + C) = AB + AC and (A + B)C = AC + BC

Complete methodology:
  1. Check dimensions: Verify A(m×n) and B(n×p) can be multiplied
  2. Apply formula: (AB)_{ij} = Σ A_{ik}B_{kj} for each element
  3. Verify properties: Check if associative, distributive, etc.
  4. Special cases: Consider identity, zero, and scalar matrices
Tip 1: Always verify dimensions before multiplication: inner dimensions must match.
Tip 2: Matrix multiplication is not commutative: AB ≠ BA in general.
Tip 3: The identity matrix I acts as a multiplicative identity: AI = IA = A.
Tip 4: Remember that (AB)ᵀ = BᵀAᵀ (transpose reverses order).
Common errors: Forgetting to check dimensions, assuming commutativity, incorrect element calculation.
Exam preparation: Practice all properties, memorize the multiplication algorithm, understand special matrices.
Properties to know by heart:

• Associativity: (AB)C = A(BC)

• Left distributivity: A(B + C) = AB + AC

• Right distributivity: (A + B)C = AC + BC

• Scalar multiplication: c(AB) = (cA)B = A(cB)

• Identity matrix: AI = IA = A

• Zero matrix: A0 = 0A = 0

• Not commutative: AB ≠ BA in general

Matrix Operations Visualization
Exercise 6: Matrix Properties Analysis
Visual analysis of matrix multiplication properties:
• Associativity: (AB)C vs A(BC)
• Distributivity: A(B + C) vs AB + AC
• Scalar multiplication: c(AB) vs (cA)B

Analysis: The visualization shows how different matrix operations behave under various properties.

  • Associativity maintains equality regardless of grouping
  • Distributivity allows distribution of multiplication over addition
  • Scalar multiplication can be applied to any factor

Questions & Answers

Question: I don't understand why matrix multiplication is not commutative. Can you explain why AB ≠ BA in general?

Answer: Great question! Matrix multiplication is not commutative because of how the operation is defined:

  • For A(m×n) and B(n×p), the product AB is defined and results in a (m×p) matrix
  • For BA to be defined, we need B(p×q) and A(q×m), which requires different dimensions
  • Even when both AB and BA are defined (when A and B are square matrices of the same size), the results are typically different

The fundamental reason is that the element (AB)_{ij} depends on the i-th row of A and j-th column of B, while (BA)_{ij} depends on the i-th row of B and j-th column of A. These are different computations.

Example: Let A = \(\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}\) and B = \(\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\)

AB = \(\begin{bmatrix} 2 & 1 \\ 1 & 0 \end{bmatrix}\) but BA = \(\begin{bmatrix} 0 & 1 \\ 1 & 2 \end{bmatrix}\)

As you can see, AB ≠ BA.

Question: How do I remember the matrix multiplication formula (AB)_{ij} = Σ A_{ik}B_{kj}?

Answer: Here are effective ways to remember the matrix multiplication formula:

  • "Row times Column": The (i,j)-entry of AB is the dot product of row i of A with column j of B
  • Mnemonic: "RiCj" - Row i of A times Column j of B
  • Visual pattern: Take row from first matrix and column from second matrix

The formula (AB)_{ij} = Σ A_{ik}B_{kj} means:

  • Take the i-th row of A: [A_{i1}, A_{i2}, ..., A_{in}]
  • Take the j-th column of B: [B_{1j}, B_{2j}, ..., B_{nj}]ᵀ
  • Multiply corresponding elements and sum: A_{i1}B_{1j} + A_{i2}B_{2j} + ... + A_{in}B_{nj}

Practice with small matrices until the pattern becomes intuitive!

Question: What are some practical applications of matrix multiplication properties in real-world scenarios?

Answer: Matrix multiplication properties have numerous practical applications:

  • Computer Graphics: Associativity allows chaining multiple transformations efficiently
  • Data Science: Distributivity helps in linear regression and machine learning algorithms
  • Physics: Non-commutativity represents the uncertainty principle in quantum mechanics
  • Economics: Matrix operations model input-output relationships in economic systems
  • Cryptography: Matrix properties are used in encryption algorithms

The associativity property is particularly important in computer graphics, where you might apply rotation, scaling, and translation transformations in sequence. Because of associativity, you can group these operations efficiently without changing the final result.

The distributivity property is crucial in optimization problems where you need to distribute matrix operations over sums of variables.