Skip to main content
Examonaut

Topic 3 · Lesson 1 of 4

Matrix algebra, determinants and inverses

Matrix arithmetic

An m×nm \times n matrix has mm rows and nn columns. You add or subtract matrices of the same size entry by entry, and multiply by a scalar by multiplying every entry.

To multiply AB\mathbf{AB}, the number of columns of A\mathbf{A} must equal the number of rows of B\mathbf{B} (the matrices are conformable). The entry in row ii, column jj of AB\mathbf{AB} is row ii of A\mathbf{A} times column jj of B\mathbf{B}: multiply matching entries and add. An m×nm \times n matrix times an n×pn \times p matrix is m×pm \times p.

(213−1)(1402)=(210310),(1402)(213−1)=(14−36−2)\begin{pmatrix} 2 & 1 \\ 3 & -1 \end{pmatrix}\begin{pmatrix} 1 & 4 \\ 0 & 2 \end{pmatrix} = \begin{pmatrix} 2 & 10 \\ 3 & 10 \end{pmatrix}, \qquad \begin{pmatrix} 1 & 4 \\ 0 & 2 \end{pmatrix}\begin{pmatrix} 2 & 1 \\ 3 & -1 \end{pmatrix} = \begin{pmatrix} 14 & -3 \\ 6 & -2 \end{pmatrix}

Matrix multiplication is not commutative: in general AB≠BA\mathbf{AB} \neq \mathbf{BA}. It is associative: (AB)C=A(BC)(\mathbf{AB})\mathbf{C} = \mathbf{A}(\mathbf{BC}), so a product of three matrices needs no brackets.

The identity matrix I\mathbf{I} has 1s on the leading diagonal and 0s elsewhere, and AI=IA=A\mathbf{AI} = \mathbf{IA} = \mathbf{A}. The zero matrix 0\mathbf{0} has every entry 0.

Determinants

The determinant of a 2×22 \times 2 matrix is

det⁡(abcd)=ad−bc\det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc

For a 3×33 \times 3 matrix, expand along the top row. Each entry multiplies the 2×22 \times 2 determinant left when you cover its row and column (its minor), with signs +,−,++, -, +:

∣abcdefghi∣=a∣efhi∣−b∣dfgi∣+c∣degh∣\begin{vmatrix} a & b & c \\ d & e & f \\ g & h & i \end{vmatrix} = a\begin{vmatrix} e & f \\ h & i \end{vmatrix} - b\begin{vmatrix} d & f \\ g & i \end{vmatrix} + c\begin{vmatrix} d & e \\ g & h \end{vmatrix}

For example, ∣21013−1024∣=2(12+2)−1(4−0)+0=24\begin{vmatrix} 2 & 1 & 0 \\ 1 & 3 & -1 \\ 0 & 2 & 4 \end{vmatrix} = 2(12 + 2) - 1(4 - 0) + 0 = 24.

A matrix with determinant 0 is singular; otherwise it is non-singular. Determinants multiply: det⁡(AB)=det⁡A×det⁡B\det(\mathbf{AB}) = \det\mathbf{A} \times \det\mathbf{B}.

Inverses

The inverse A−1\mathbf{A}^{-1} satisfies AA−1=A−1A=I\mathbf{AA}^{-1} = \mathbf{A}^{-1}\mathbf{A} = \mathbf{I}. Only non-singular square matrices have one. For a 2×22 \times 2 matrix: swap the leading diagonal, change the signs of the other two entries, and divide by the determinant.

(abcd)−1=1ad−bc(d−b−ca)\begin{pmatrix} a & b \\ c & d \end{pmatrix}^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}

For a 3×33 \times 3 matrix M\mathbf{M}:

  1. Find det⁡M\det\mathbf{M} (if it is 0, stop: there is no inverse).
  2. Replace each entry by its minor.
  3. Apply the sign pattern (+−+−+−+−+)\begin{pmatrix} + & - & + \\ - & + & - \\ + & - & + \end{pmatrix} to get the matrix of cofactors.
  4. Transpose (swap rows and columns) to get the adjugate.
  5. Divide by det⁡M\det\mathbf{M}.

The specification lets you use a calculator to find inverses, but you must understand this process, and "show that" questions will want to see it.

Worked example

A 3 by 3 inverse

Find the inverse of M=(120013201)\mathbf{M} = \begin{pmatrix} 1 & 2 & 0 \\ 0 & 1 & 3 \\ 2 & 0 & 1 \end{pmatrix}.

Show solution
  1. det⁡M=1(1−0)−2(0−6)+0=13\det\mathbf{M} = 1(1 - 0) - 2(0 - 6) + 0 = 13.
  2. Cofactors, row by row: 1,6,−21, 6, -2; −2,1,4-2, 1, 4; 6,−3,16, -3, 1.
  3. Transpose and divide by 13: M−1=113(1−2661−3−241)\mathbf{M}^{-1} = \frac{1}{13}\begin{pmatrix} 1 & -2 & 6 \\ 6 & 1 & -3 \\ -2 & 4 & 1 \end{pmatrix}.
  4. Check one entry of MM−1\mathbf{MM}^{-1}: row 1 of M\mathbf{M} times column 1 is 1+12+0=131 + 12 + 0 = 13, and 1313=1\frac{13}{13} = 1 ✓.

Properties of inverses

  • (AB)−1=B−1A−1(\mathbf{AB})^{-1} = \mathbf{B}^{-1}\mathbf{A}^{-1}: the order reverses, like taking off socks and shoes. Proof: (AB)(B−1A−1)=A(BB−1)A−1=AA−1=I(\mathbf{AB})(\mathbf{B}^{-1}\mathbf{A}^{-1}) = \mathbf{A}(\mathbf{BB}^{-1})\mathbf{A}^{-1} = \mathbf{AA}^{-1} = \mathbf{I}.
  • To solve AX=B\mathbf{AX} = \mathbf{B}, multiply on the left by A−1\mathbf{A}^{-1}: X=A−1B\mathbf{X} = \mathbf{A}^{-1}\mathbf{B}. For XA=B\mathbf{XA} = \mathbf{B}, multiply on the right: X=BA−1\mathbf{X} = \mathbf{BA}^{-1}.

Practise this topic

Both are part of Premium.