24.6 Practice Problems

Problem 24.1. Let \(A=\begin {pmatrix}1&0&3\end {pmatrix}\) and \(B=\begin {pmatrix}1\\2\\4\end {pmatrix}\). Find \(AB\) and \(BA\).

Show solution

Solution. \(A\) is \(1\times 3\) and \(B\) is \(3\times 1\).

For \(AB\) the inner dimensions match (\(3\) and \(3\)), and the result is \(1\times 1\): \[AB=\begin {pmatrix}1(1)+0(2)+3(4)\end {pmatrix}=\begin {pmatrix}13\end {pmatrix}.\]

For \(BA\) the inner dimensions also match (\(1\) and \(1\)), and the result is \(3\times 3\): \[BA=\begin {pmatrix}1\\2\\4\end {pmatrix}\begin {pmatrix}1&0&3\end {pmatrix} =\begin {pmatrix}1&0&3\\2&0&6\\4&0&12\end {pmatrix}.\]

Note 24.11. This is the sharpest possible illustration that matrix multiplication does not commute: \(AB\) and \(BA\) are not merely different numbers, they are different sizes — a single number against a \(3\times 3\) array.

The rule behind it: an \(m\times n\) matrix times an \(n\times p\) matrix gives \(m\times p\). The two inner dimensions must agree and they vanish; the outer two survive. Here \((1\times 3)(3\times 1)\) leaves \(1\times 1\), and \((3\times 1)(1\times 3)\) leaves \(3\times 3\).

Note also that \(BA\) has a column of zeros and its rows are all multiples of \(\begin {pmatrix}1&0&3\end {pmatrix}\). Its determinant is therefore zero, so it has no inverse — a product of a column and a row can never be invertible for a matrix larger than \(1\times 1\).

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.