Matrix Operations

20 min
0/4 practice checks

A matrix is a rectangular grid of numbers, with a size written as (rows ×\times columns). We add matrices of the same size entry by entry, and multiply by a scalar entry by entry.

Matrix multiplication is different: to multiply AA (m×nm\times n) by BB (n×pn\times p), the inner dimensions must match. The entry in row ii, column jj of ABAB is the dot product of row ii of AA with column jj of BB. The result is m×pm\times p.

Worked example. With A=(1234)A=\begin{pmatrix}1&2\\3&4\end{pmatrix} and B=(56)B=\begin{pmatrix}5\\6\end{pmatrix} (a 2×22\times 2 times a 2×12\times 1), the product is 2×12\times 1:

AB=(15+2635+46)=(1739)AB = \begin{pmatrix}1\cdot 5 + 2\cdot 6\\ 3\cdot 5 + 4\cdot 6\end{pmatrix} = \begin{pmatrix}17\\39\end{pmatrix}

For general matrices AA and BB, which statement is true?

If AA is 2×32\times 3 and BB is 3×43\times 4, the product ABAB has size:

With A=(1234)A=\begin{pmatrix}1&2\\3&4\end{pmatrix} and B=(56)B=\begin{pmatrix}5\\6\end{pmatrix}, find the top entry of ABAB.

Let A=(2013)A=\begin{pmatrix}2&0\\1&3\end{pmatrix} and B=(1425)B=\begin{pmatrix}1&4\\2&5\end{pmatrix}. Find the entry in row 2, column 2 of ABAB.