Subject: Class 12 Mathematics Chapter: Matrix Multiplication Topic: 3.6 Matrix Multiplication – Perform matrix multiplication correctly
Matrix multiplication is the most important and the most delicate operation in matrix algebra, and it differs sharply from addition and scalar multiplication. Two matrices A and B can be multiplied only when the number of columns of A equals the number of rows of B, a condition called conformability. The product AB is then a new matrix whose element in row i and column j is obtained by multiplying the corresponding entries of row i of A and column j of B and adding the products, an operation known as taking the dot product.
Unlike ordinary multiplication of numbers, matrix multiplication is not commutative in general. Even when both AB and BA are defined, they usually produce different matrices, and often one product exists while the other does not. This surprising behaviour explains many of the difficulties that students face, and it is the reason why the order of factors in matrix products must be respected absolutely. Careful notation and a rigid row-by-column procedure are essential.
Despite its complexity, matrix multiplication has a profound interpretation: it describes the composition of transformations and the combination of linear processes. For example, if a matrix transforms coordinates and another matrix transforms the result, their product performs both transformations in one step. In examination work, however, the emphasis is on performing the multiplication correctly and applying its algebraic properties, which is exactly what this chapter develops step by step.
Let A be a matrix of order m by n and B a matrix of order n by p. The product AB is defined exactly when the number of columns of A, namely n, equals the number of rows of B, also n. In that case the product AB is a matrix of order m by p, whose number of rows is taken from A and whose number of columns is taken from B. If the inner dimensions do not match, the product is not defined.
The phrase inner dimensions refers to the shared number n. The outer dimensions m and p determine the size of the answer. For example, if A is 2 by 3 and B is 3 by 4, the inner dimension 3 matches, and AB has order 2 by 4. If A is 2 by 3 and B is 4 by 2, the inner dimensions 3 and 4 differ, so AB does not exist. Note that BA may behave differently: with A of order 2 by 3 and B of order 3 by 2, both AB of order 2 by 2 and BA of order 3 by 3 are defined, yet they are different matrices.
Worked Example 1. If A has order 2 by 3 and B has order 3 by 4, state the order of AB and decide whether BA is defined.
Worked Example 2. If A is 2 by 3 and B is 3 by 2, find the orders of AB and BA.
To compute the element of AB in row i and column j, take row i of A and column j of B, multiply the first elements together, add the product of the second elements, and continue for all n pairs, summing the results. This sum is called the dot product of the two lists. The entire product is built by repeating this calculation for every row of A and every column of B.
The procedure is best performed systematically. Start with the element in row 1 column 1 of AB, which uses row 1 of A and column 1 of B. Then move across to row 1 column 2, using row 1 of A and column 2 of B, and so on across the entire first row before moving to the second row of A. Recording the aligned pairs carefully prevents the most common errors in matrix multiplication.
Worked Example 3. If A has rows 1, 2 and 3, 4 and B has rows 5, 6 and 7, 8, compute AB.
Worked Example 4. If A has rows 1, 0, 2 and B has rows 3 and 1, find AB.
Matrix multiplication is associative, so A times BC equals AB times C whenever the products are defined, and it distributes over addition from both sides, with A times the sum B plus C equal to AB plus AC and the sum B plus C times A equal to BA plus CA. The identity matrix I acts as the multiplicative identity, giving I times A equals A and A times I equals A whenever the orders agree.
However, matrix multiplication is not commutative. In general AB is not equal to BA, and one of the products may fail to exist. Additionally, the cancellation law fails for matrices: AB equals AC does not imply B equals C, and AB equal to the zero matrix does not imply that A or B is the zero matrix. These failures distinguish matrix algebra sharply from the algebra of numbers and are favourite points in examinations.
Worked Example 5. Verify associativity for A with rows 1, 0 and 0, 1, B with rows 2, 1 and 0, 3, and C with rows 1, 1 and 1, 0.
Worked Example 6. Show that AB need not equal BA when A has rows 0, 1 and 1, 0 and B has rows 1, 2 and 3, 4.
| Quantity | Rule | Example |
|---|---|---|
| Conformability | Columns of A must equal rows of B | A 2 by 3 times B 3 by 4 works |
| Order of AB | Rows of A by columns of B | 2 by 3 times 3 by 4 gives 2 by 4 |
| Element of AB | Dot product of row i of A with column j of B | Sum of products |
| Undefined product | Inner dimensions differ | A 2 by 3 times B 4 by 2 fails |
| Property | Statement | Status |
|---|---|---|
| Associative | A(BC) = (AB)C | Always true |
| Distributive | A(B plus C) = AB plus AC | Always true |
| Identity | IA = A and AI = A | Always true |
| Commutative | AB = BA | Generally false |
| Cancellation | AB = AC implies B = C | Generally false |
| Zero product | AB = O implies A = O or B = O | Generally false |
flowchart TD
A[Matrix Multiplication] --> B[Conformability]
A --> C[Computing the Product]
A --> D[Properties]
B --> E[Columns of A equal rows of B]
B --> F[Order is rows of A by columns of B]
C --> G[Row of A with column of B]
C --> H[Multiply pairs and add]
C --> I[Repeat for all rows and columns]
D --> J[Associative]
D --> K[Distributive]
D --> L[Not commutative]
D --> M[No cancellation law]
Matrix multiplication is defined only when the number of columns of the first matrix equals the number of rows of the second, and the product then has order given by the rows of the first matrix and the columns of the second, with every entry formed as the dot product of a row of the first matrix with a column of the second. The operation is associative and distributive, and the identity matrix acts as its multiplicative identity, but multiplication is not commutative and the cancellation law does not hold, so the order of factors must be respected and zero products can occur without a zero factor. Mastery of this operation, with its precise alignment of rows and columns and its non-obvious properties, is the central skill of matrix algebra and the foundation for the concepts of transpose and inverse that follow.