Why Matrix Multiplication Needs Its Own Rules
In ordinary algebra the order of multiplying never matters. We write \( x \times y = xy \) and \( y \times x = yx \), and these are the same thing, so \( xy = yx \). Matrices do not behave like this. When two matrices are multiplied, each row of the first matrix is combined with each column of the second. Swap the two matrices and different rows meet different columns, so the answer usually changes.
Take \( A = \begin{pmatrix} 2 & -1 \\ 3 & 1 \end{pmatrix} \) and \( B = \begin{pmatrix} 1 & 2 \\ 0 & -1 \end{pmatrix} \). Multiplying A by B, row by column:
\[ \begin{aligned} AB &= \begin{pmatrix} 2 \times 1 + (-1) \times 0 & 2 \times 2 + (-1)(-1) \\ 3 \times 1 + 1 \times 0 & 3 \times 2 + 1 \times (-1) \end{pmatrix} \\ &= \begin{pmatrix} 2 & 5 \\ 3 & 5 \end{pmatrix} \end{aligned} \]
Now multiplying B by A, in the other order:
\[ \begin{aligned} BA &= \begin{pmatrix} 1 \times 2 + 2 \times 3 & 1 \times (-1) + 2 \times 1 \\ 0 \times 2 + (-1) \times 3 & 0 \times (-1) + (-1) \times 1 \end{pmatrix} \\ &= \begin{pmatrix} 8 & 1 \\ -3 & -1 \end{pmatrix} \end{aligned} \]
The two products are different matrices, so \( AB \neq BA \). We say that matrix multiplication is not commutative. A few special pairs do give the same answer both ways. A square matrix multiplied by itself is one example, and any square matrix multiplied by the identity matrix is another. But equality can never be assumed. It has to be checked.
Commutative property: a rule saying that the order of the two things being combined does not matter. Numbers obey it for multiplication (\( xy = yx \)), but matrices in general do not: \( AB \neq BA \).
Because the most familiar rule of multiplication fails, every other rule has to be tested again before we trust it for matrices. There are five that do hold: the associative property, the distributive property, the identity property, the rule for the transpose of a product, and the idempotent property of the identity matrix.
Never swap the order of two matrices inside a product to make a calculation easier. AB and BA are usually different matrices, and sometimes one of them does not even exist.
Associative Property
Only two matrices can be multiplied at a time. So when three matrices A, B and C stand in a row, there are two ways to find the product. We can multiply A and B first and then multiply the result by C, which is written \( (AB)C \). Or we can multiply B and C first and then multiply A by that result, which is written \( A(BC) \). The associative property says both routes arrive at the same matrix.
Associative property of matrix multiplication: for matrices A, B and C whose products are defined, \( (AB)C = A(BC) \). The grouping may change, but the order A, then B, then C stays the same.
Let us check this on three matrices: \( A = \begin{pmatrix} 2 & 1 \\ 1 & 3 \end{pmatrix} \), \( B = \begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix} \) and \( C = \begin{pmatrix} 0 & 1 \\ 1 & 2 \end{pmatrix} \).
Step 1: Multiplying A by B first:
\[ \begin{aligned} AB &= \begin{pmatrix} 2 \times 1 + 1 \times 2 & 2 \times 0 + 1 \times 1 \\ 1 \times 1 + 3 \times 2 & 1 \times 0 + 3 \times 1 \end{pmatrix} \\ &= \begin{pmatrix} 4 & 1 \\ 7 & 3 \end{pmatrix} \end{aligned} \]
Step 2: Multiplying the result AB by C:
\[ \begin{aligned} (AB)C &= \begin{pmatrix} 4 \times 0 + 1 \times 1 & 4 \times 1 + 1 \times 2 \\ 7 \times 0 + 3 \times 1 & 7 \times 1 + 3 \times 2 \end{pmatrix} \\ &= \begin{pmatrix} 1 & 6 \\ 3 & 13 \end{pmatrix} \quad \text{(i)} \end{aligned} \]
Step 3: Starting again, this time multiplying B by C first:
\[ \begin{aligned} BC &= \begin{pmatrix} 1 \times 0 + 0 \times 1 & 1 \times 1 + 0 \times 2 \\ 2 \times 0 + 1 \times 1 & 2 \times 1 + 1 \times 2 \end{pmatrix} \\ &= \begin{pmatrix} 0 & 1 \\ 1 & 4 \end{pmatrix} \end{aligned} \]
Step 4: Multiplying A by the result BC:
\[ \begin{aligned} A(BC) &= \begin{pmatrix} 2 \times 0 + 1 \times 1 & 2 \times 1 + 1 \times 4 \\ 1 \times 0 + 3 \times 1 & 1 \times 1 + 3 \times 4 \end{pmatrix} \\ &= \begin{pmatrix} 1 & 6 \\ 3 & 13 \end{pmatrix} \quad \text{(ii)} \end{aligned} \]
Step 5: Comparing results (i) and (ii), the two matrices are equal entry by entry:
\[ (AB)C = A(BC) \]
Multiplication of matrices is associative. Because the grouping does not change the answer, a product of three matrices can simply be written ABC, without brackets. What you may change is where the brackets go. What you may never change is the order of the letters.
Distributive Property
With numbers, multiplying a sum is the same as multiplying each part and adding: \( 3(4 + 5) = 3 \times 4 + 3 \times 5 = 27 \). Matrices obey the same rule, as long as each matrix stays on the side it started on. A matrix standing on the left of a bracket multiplies each term from the left, and a matrix standing on the right multiplies each term from the right.
Distributive property of matrix multiplication over addition: \( A(B + C) = AB + AC \) and \( (A + B)C = AC + BC \), whenever the sums and products are defined. The same holds for subtraction: \( A(B - C) = AB - AC \).
We check it with \( A = \begin{pmatrix} 2 & -1 \\ 3 & 1 \end{pmatrix} \), \( B = \begin{pmatrix} 1 & 2 \\ 0 & -1 \end{pmatrix} \) and \( C = \begin{pmatrix} 3 & 0 \\ 1 & 2 \end{pmatrix} \).
Step 1: Adding B and C, entry by entry:
\[ B + C = \begin{pmatrix} 1 + 3 & 2 + 0 \\ 0 + 1 & -1 + 2 \end{pmatrix} = \begin{pmatrix} 4 & 2 \\ 1 & 1 \end{pmatrix} \]
Step 2: Multiplying A by the sum B + C:
\[ \begin{aligned} A(B + C) &= \begin{pmatrix} 2 \times 4 + (-1) \times 1 & 2 \times 2 + (-1) \times 1 \\ 3 \times 4 + 1 \times 1 & 3 \times 2 + 1 \times 1 \end{pmatrix} \\ &= \begin{pmatrix} 7 & 3 \\ 13 & 7 \end{pmatrix} \quad \text{(i)} \end{aligned} \]
Step 3: Finding AB separately. It was worked out in the first section:
\[ AB = \begin{pmatrix} 2 & 5 \\ 3 & 5 \end{pmatrix} \]
Step 4: Finding AC, row of A by column of C:
\[ \begin{aligned} AC &= \begin{pmatrix} 2 \times 3 + (-1) \times 1 & 2 \times 0 + (-1) \times 2 \\ 3 \times 3 + 1 \times 1 & 3 \times 0 + 1 \times 2 \end{pmatrix} \\ &= \begin{pmatrix} 5 & -2 \\ 10 & 2 \end{pmatrix} \end{aligned} \]
Step 5: Adding the two products:
\[ AB + AC = \begin{pmatrix} 2 + 5 & 5 - 2 \\ 3 + 10 & 5 + 2 \end{pmatrix} = \begin{pmatrix} 7 & 3 \\ 13 & 7 \end{pmatrix} \quad \text{(ii)} \]
Step 6: From (i) and (ii):
\[ A(B + C) = AB + AC \]
The same three matrices also show the rule from the right. Here \( A + B = \begin{pmatrix} 3 & 1 \\ 3 & 0 \end{pmatrix} \), and multiplying it by C gives \( (A + B)C = \begin{pmatrix} 10 & 2 \\ 9 & 0 \end{pmatrix} \). Separately, \( BC = \begin{pmatrix} 5 & 4 \\ -1 & -2 \end{pmatrix} \), and adding it to AC gives \( AC + BC = \begin{pmatrix} 10 & 2 \\ 9 & 0 \end{pmatrix} \). The two answers match, so \( (A + B)C = AC + BC \).
Subtraction works in exactly the same way. Here \( B - C = \begin{pmatrix} -2 & 2 \\ -1 & -3 \end{pmatrix} \), and multiplying by A gives \( A(B - C) = \begin{pmatrix} -3 & 7 \\ -7 & 3 \end{pmatrix} \). Subtracting the products we already have, \( AB - AC = \begin{pmatrix} 2 - 5 & 5 + 2 \\ 3 - 10 & 5 - 2 \end{pmatrix} = \begin{pmatrix} -3 & 7 \\ -7 & 3 \end{pmatrix} \). So \( A(B - C) = AB - AC \).
\( A(B + C) \) equals \( AB + AC \), not \( AB + CA \). Since CA is usually different from AC, moving A to the other side of C gives a wrong answer.
The distributive property also tells us how to square a sum of matrices. Expanding one bracket at a time:
\[ \begin{aligned} (A + B)^2 &= (A + B)(A + B) \\ &= A(A + B) + B(A + B) \\ &= A^2 + AB + BA + B^2 \end{aligned} \]
For matrices, \( (A + B)^2 \) is not \( A^2 + 2AB + B^2 \). The middle terms are AB and BA, and they can only be joined into 2AB when AB and BA happen to be equal.
Identity Property
Among numbers, 1 is special: multiplying any number by 1 leaves it unchanged, so \( 1 \times a = a \times 1 = a \). Among square matrices, the identity matrix plays this part. An identity matrix, also called a unit matrix, is a square matrix with 1 in every place on the leading diagonal (top left to bottom right) and 0 everywhere else. The identity matrix of order \( 2 \times 2 \) is \( I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \).
Identity property of matrix multiplication: if A is a square matrix and I is the identity matrix of the same order, then \( AI = IA = A \).
Let \( A = \begin{pmatrix} 3 & -2 \\ 5 & 4 \end{pmatrix} \).
Step 1: Multiplying A by I on the right:
\[ \begin{aligned} AI &= \begin{pmatrix} 3 \times 1 + (-2) \times 0 & 3 \times 0 + (-2) \times 1 \\ 5 \times 1 + 4 \times 0 & 5 \times 0 + 4 \times 1 \end{pmatrix} \\ &= \begin{pmatrix} 3 & -2 \\ 5 & 4 \end{pmatrix} = A \quad \text{(i)} \end{aligned} \]
Step 2: Multiplying A by I on the left:
\[ \begin{aligned} IA &= \begin{pmatrix} 1 \times 3 + 0 \times 5 & 1 \times (-2) + 0 \times 4 \\ 0 \times 3 + 1 \times 5 & 0 \times (-2) + 1 \times 4 \end{pmatrix} \\ &= \begin{pmatrix} 3 & -2 \\ 5 & 4 \end{pmatrix} = A \quad \text{(ii)} \end{aligned} \]
Step 3: From (i) and (ii), \( AI = A = IA \). Each 0 in I wipes out one term of every sum, and each 1 keeps exactly one entry of A in its own place. That is why nothing changes.
The identity matrix exists in matrix multiplication, and it is one of the few matrices that gives the same product in either order with every square matrix of its size.
Transpose of a Product
The transpose of a matrix A, written \( A^T \), is the matrix formed by turning each row of A into a column. The first row becomes the first column, the second row becomes the second column, and so on. The question here is what happens when we transpose a product AB.
Property of transpose of a matrix product: the transpose of the product of two matrices equals the product of their transposes taken in the opposite order, \( (AB)^T = B^T A^T \).
Let \( A = \begin{pmatrix} 2 & 1 \\ 3 & 4 \end{pmatrix} \) and \( B = \begin{pmatrix} 1 & -1 \\ 2 & 0 \end{pmatrix} \).
Step 1: Finding the product AB:
\[ \begin{aligned} AB &= \begin{pmatrix} 2 \times 1 + 1 \times 2 & 2 \times (-1) + 1 \times 0 \\ 3 \times 1 + 4 \times 2 & 3 \times (-1) + 4 \times 0 \end{pmatrix} \\ &= \begin{pmatrix} 4 & -2 \\ 11 & -3 \end{pmatrix} \end{aligned} \]
Step 2: Transposing AB, so its rows become columns:
\[ (AB)^T = \begin{pmatrix} 4 & 11 \\ -2 & -3 \end{pmatrix} \quad \text{(i)} \]
Step 3: Writing the transposes of A and B:
\[ A^T = \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix} \]
\[ B^T = \begin{pmatrix} 1 & 2 \\ -1 & 0 \end{pmatrix} \]
Step 4: Multiplying the transposes in the reverse order, B first:
\[ \begin{aligned} B^T A^T &= \begin{pmatrix} 1 \times 2 + 2 \times 1 & 1 \times 3 + 2 \times 4 \\ (-1) \times 2 + 0 \times 1 & (-1) \times 3 + 0 \times 4 \end{pmatrix} \\ &= \begin{pmatrix} 4 & 11 \\ -2 & -3 \end{pmatrix} \quad \text{(ii)} \end{aligned} \]
Step 5: From (i) and (ii):
\[ (AB)^T = B^T A^T \]
\( (AB)^T \) is not \( A^T B^T \). With the same matrices, \( A^T B^T = \begin{pmatrix} -1 & 4 \\ -3 & 2 \end{pmatrix} \), which is a different matrix from \( (AB)^T \).
A simple way to remember the reversal is getting dressed. You put on socks first and shoes second. To undo it, you take off the shoes first and the socks second. Transposing a product undoes the order in the same way, so the last matrix comes out first.
Idempotent Property of the Identity Matrix
Powers of a matrix are repeated products: \( A^2 = A \times A \), \( A^3 = A^2 \times A \), and so on. A power can only be found for a square matrix, because A can be multiplied by A only when its number of columns equals its number of rows. The identity matrix behaves in a remarkable way when raised to a power.
Let \( I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \), the unit matrix of order \( 2 \times 2 \).
Step 1: Squaring I:
\[ \begin{aligned} I^2 &= \begin{pmatrix} 1 \times 1 + 0 \times 0 & 1 \times 0 + 0 \times 1 \\ 0 \times 1 + 1 \times 0 & 0 \times 0 + 1 \times 1 \end{pmatrix} \\ &= \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I \end{aligned} \]
Step 2: Finding the cube. Since \( I^2 = I \), the cube is just I multiplied by I again:
\[ I^3 = I^2 \times I = I \times I = I \]
Step 3: Each further power is the previous power, which is I, multiplied by I once more. That always gives I, so the pattern continues up to any power n:
\[ I = I^2 = I^3 = I^4 = \cdots = I^n \]
Idempotent property of the identity matrix: if I is a unit matrix, then \( I = I^2 = I^3 = \cdots = I^n \). Raising the identity matrix to any positive whole-number power leaves it unchanged.
Most matrices do not behave like this. For \( P = \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix} \), squaring gives \( P^2 = \begin{pmatrix} 2 & 2 \\ 2 & 2 \end{pmatrix} = 2P \), which is not P. So the idempotent property is a special feature of the identity matrix, not a rule for all matrices.
The Properties at a Glance
| Property | Statement | What to watch |
| Not commutative | \( AB \neq BA \) in general | Never swap the order |
| Associative | \( (AB)C = A(BC) \) | Brackets move, letters stay in order |
| Distributive | \( A(B + C) = AB + AC \), \( (A + B)C = AC + BC \) | A left factor stays on the left |
| Identity | \( AI = IA = A \) | I must be the same order as A |
| Transpose of a product | \( (AB)^T = B^T A^T \) | The order reverses |
| Idempotent (of I) | \( I = I^2 = I^3 = \cdots = I^n \) | True for I, not for every matrix |
The full lesson is waiting for you
The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.