Matrix products and powers
Discover how matrices multiply in Year 12 VCE General Mathematics. Multiplying is not done element by element: each entry comes from a row times a column. That one rule lets a market stall in Daylesford turn a matrix of jars sold and a matrix of prices into its daily takings in a single step, and it drives everything from networks to population models.
You will practise deciding whether a product such as \(AB\) is defined, finding its order from the inner and outer numbers, and multiplying matrices with negatives. You will see why \(AB\) and \(BA\) usually differ, find powers like \(A^2\) and \(A^3\), and use summing matrices, ready for determinants and inverses next.
Theory
Multiplying matrices is the key to most matrix applications. This Year 12 General Mathematics guide for students in Victoria shows when a matrix product is defined, how to find its order, how to multiply row by column, how to find powers of a square matrix, and how products turn quantities and prices into totals.
The product \(AB\) is only defined when the number of columns of \(A\) equals the number of rows of \(B\). Write the orders side by side: for \((m \times n)(n \times p)\) the inner numbers match, and the outer numbers give the order of the product, \(m \times p\).
Each element of \(AB\) is found by multiplying a row of \(A\) by a column of \(B\): multiply the first elements, the second elements, and so on, then add. The element in row \(i\), column \(j\) of \(AB\) uses row \(i\) of \(A\) and column \(j\) of \(B\).
The order of multiplication matters: \(AB\) and \(BA\) are usually different, and one may be defined when the other is not. The identity matrix \(I\) acts like the number \(1\): \(AI = IA = A\). A power of a matrix is repeated multiplication, \(A^2 = AA\), \(A^3 = A^2A\), so only a square matrix has powers. For a diagonal matrix, each diagonal element is simply raised to the power.
Products are useful in practice. A quantity matrix times a price matrix (\(QP\)) gives totals in dollars, and a summing matrix such as \(\begin{bmatrix}1 & 1 & 1\end{bmatrix}\) adds up the elements of a column.
Condition and order:
Element in row \(i\), column \(j\) of \(C = AB\):
For \(2 \times 2\) matrices:
Identity and powers (square matrices):
Multiplying two matrices
- Write the orders side by side. If the inner numbers differ, the product is not defined.
- The outer numbers give the order of the answer: draw an empty matrix of that size.
- For each position (row \(i\), column \(j\)), multiply row \(i\) of the first matrix by column \(j\) of the second: pair up, multiply, add.
- Put negatives in brackets and check one or two elements again.
Powers and applications
- For \(A^3\), find \(A^2 = AA\) first, then \(A^3 = A^2A\). For a diagonal matrix, power each diagonal element.
- In a context, match the labels: the columns of the first matrix must describe the same things as the rows of the second (for example items, in both \(Q\) and \(P\)).
- Say what each element of the product means, with units.
Write the orders side by side. The inner numbers must match; the outer numbers give the order of the product.
| \(AB\) | \(:\) | \((3 \times 2)(2 \times 2)\;\to\; 3 \times 2\) |
| \(BA\) | \(:\) | \((2 \times 2)(3 \times 2)\;\; 2 \ne 3 \text{, not defined}\) |
| \(AC\) | \(:\) | \((3 \times 2)(2 \times 3)\;\to\; 3 \times 3\) |
| \(CA\) | \(:\) | \((2 \times 3)(3 \times 2)\;\to\; 2 \times 2\) |
| \(CB\) | \(:\) | \((2 \times 3)(2 \times 2)\;\; 3 \ne 2 \text{, not defined}\) |
\(AB\) is \(3 \times 2\), \(AC\) is \(3 \times 3\) and \(CA\) is \(2 \times 2\). \(BA\) and \(CB\) are not defined. Notice that \(AC\) and \(CA\) are both defined but have different orders.
Each element of \(AB\) is a row of \(A\) times a column of \(B\): multiply matching pairs and add.
| \(c_{11}\) | \(=\) | \(2 \times 5 + (-1) \times (-2) = 12\) |
| \(c_{12}\) | \(=\) | \(2 \times 0 + (-1) \times 1 = -1\) |
| \(c_{21}\) | \(=\) | \(3 \times 5 + 4 \times (-2) = 7\) |
| \(c_{22}\) | \(=\) | \(3 \times 0 + 4 \times 1 = 4\) |
| \(AB\) | \(=\) | \(\begin{bmatrix}12 & -1\\ 7 & 4\end{bmatrix}\) |
| \(BA\) | \(=\) | \(\begin{bmatrix}10 & -5\\ -1 & 6\end{bmatrix}\) |
(i) \(AB = \begin{bmatrix}12 & -1\\ 7 & 4\end{bmatrix}\). (ii) \(BA = \begin{bmatrix}10 & -5\\ -1 & 6\end{bmatrix}\), which is different: the order of multiplication matters, so \(AB \ne BA\) in general.
\(A^2 = AA\) and \(A^3 = A^2A\). For a diagonal matrix, raise each diagonal element to the power.
| \(A^2\) | \(=\) | \(\begin{bmatrix}1 & 2\\ 0 & 3\end{bmatrix}\begin{bmatrix}1 & 2\\ 0 & 3\end{bmatrix}\) |
| \(\) | \(=\) | \(\begin{bmatrix}1 + 0 & 2 + 6\\ 0 + 0 & 0 + 9\end{bmatrix}\) |
| \(\) | \(=\) | \(\begin{bmatrix}1 & 8\\ 0 & 9\end{bmatrix}\) |
| \(A^3\) | \(=\) | \(\begin{bmatrix}1 & 8\\ 0 & 9\end{bmatrix}\begin{bmatrix}1 & 2\\ 0 & 3\end{bmatrix}\) |
| \(\) | \(=\) | \(\begin{bmatrix}1 + 0 & 2 + 24\\ 0 + 0 & 0 + 27\end{bmatrix}\) |
| \(\) | \(=\) | \(\begin{bmatrix}1 & 26\\ 0 & 27\end{bmatrix}\) |
| \(D^4\) | \(=\) | \(\begin{bmatrix}2^4 & 0\\ 0 & (-3)^4\end{bmatrix}\) |
| \(\) | \(=\) | \(\begin{bmatrix}16 & 0\\ 0 & 81\end{bmatrix}\) |
(i) \(A^2 = \begin{bmatrix}1 & 8\\ 0 & 9\end{bmatrix}\) and \(A^3 = \begin{bmatrix}1 & 26\\ 0 & 27\end{bmatrix}\). Squaring each element would give the wrong answer. (ii) \(D^4 = \begin{bmatrix}16 & 0\\ 0 & 81\end{bmatrix}\).
\(Q\) is \(2 \times 3\) and \(P\) is \(3 \times 1\): the inner numbers match.
| \((2 \times 3)(3 \times 1)\) | \(\to\) | \(2 \times 1\) |
| \(t_{11}\) | \(=\) | \(12 \times 7 + 8 \times 9 + 15 \times 6 = 246\) |
| \(t_{21}\) | \(=\) | \(20 \times 7 + 14 \times 9 + 9 \times 6 = 320\) |
| \(QP\) | \(=\) | \(\begin{bmatrix}246\\ 320\end{bmatrix}\) |
| \(\begin{bmatrix}1 & 1\end{bmatrix}QP\) | \(=\) | \(1 \times 246 + 1 \times 320\) |
| \(\) | \(=\) | \(\begin{bmatrix}566\end{bmatrix}\) |
(i) \(Q\) has \(3\) columns and \(P\) has \(3\) rows, so \(QP\) is defined and is \(2 \times 1\). (ii) \(QP = \begin{bmatrix}246\\ 320\end{bmatrix}\): the stall took \(\$246\) on Saturday and \(\$320\) on Sunday. (iii) The summing matrix adds the two days: \(\begin{bmatrix}566\end{bmatrix}\), so the weekend takings were \(\$566\).
Common pitfalls
Frequently asked questions
When can two matrices be multiplied?
The product AB is defined only when the number of columns of A equals the number of rows of B. Write the orders side by side and check that the inner numbers match.
How do you find the order of a matrix product?
Use the outer numbers. A 4 x 2 matrix times a 2 x 3 matrix gives a 4 x 3 matrix.
How do you multiply two matrices?
Each element of the answer is a row of the first matrix times a column of the second. Multiply the matching pairs of numbers and add the results.
Is AB equal to BA for matrices?
Usually not. The two products often have different values, different orders, or one may not be defined at all.
How do you square a matrix?
Multiply the matrix by itself, row by column: A squared means A times A. Only square matrices can be squared. Do not square each element, unless the matrix is diagonal.