πŸ“² Free Maths PDF app for iPhone and AndroidDownload β†’
Skip to content
Maths PDF – Otto the owl teaching maths: free lessons, worksheets, quizzes and tests

Matrices and determinants – university Year 1 maths lesson to download as PDF

University matrices and determinants revision notes – Otto the owl, Maths PDF
University Maths Year 1 – Lessons – PDF
Prefer a book?The same course as a ready-to-print PDF Β· Β£7.99See the book

This University matrices and determinants revision notes is written for pupils aged 18-19. In short, it shows you how to calculate with matrices, determinants and inverses. Before you start, it helps to revise sequences and series convergence and vectors and systems of linear equations, because this lesson builds on them.

University matrices and determinants revision notes: what you will learn

Matrices encode linear maps and systems of equations. This chapter covers their algebra, determinants, inverses and Cramer's rule.

Starter activity

Draw a unit square with corners \((0,0)\), \((1,0)\), \((1,1)\) and \((0,1)\) on squared paper. Apply the rule "\((x,y)\mapsto(2x+y,\,x+y)\)" to each corner and draw the new shape. What kind of quadrilateral is it? Count its area. Compare it with the number \(2\times1-1\times1\) built from the coefficients. What do you notice?

Matrices and their algebra

Definition: matrix and product

An \(m\times n\) matrix is a rectangular array with \(m\) rows and \(n\) columns. The product \(AB\) is defined when \(A\) is \(m\times n\) and \(B\) is \(n\times p\), with \((AB)_{ij}=\sum_kA_{ik}B_{kj}\) (row of \(A\) times column of \(B\)). The transpose \(A^T\) swaps rows and columns.

Property: rules of multiplication

Multiplication is associative and distributive but not commutative. Also \((AB)^T=B^TA^T\) and \(AI=IA=A\). It is possible that \(A^2=0\) with \(A\ne0\), for example \(A=\begin{pmatrix}0&1\\0&0\end{pmatrix}\).

Example 1

For \(A=\begin{pmatrix}1&2\\3&4\end{pmatrix}\) and \(B=\begin{pmatrix}0&1\\1&0\end{pmatrix}\), compare \(AB\) and \(BA\).

\(AB=\begin{pmatrix}2&1\\4&3\end{pmatrix}\) while \(BA=\begin{pmatrix}3&4\\1&2\end{pmatrix}\).

Determinants

Definition: determinant

For \(2\times2\), \(\det\begin{pmatrix}a&b\\c&d\end{pmatrix}=ad-bc\). For larger matrices expand along a row or column using cofactors: \(\det A=\sum_ja_{ij}C_{ij}\) with \(C_{ij}=(-1)^{i+j}M_{ij}\), where \(M_{ij}\) is the minor (the determinant after deleting row \(i\) and column \(j\)).

Property: rules for determinants

  • Swapping two rows changes the sign.
  • Multiplying a row by \(c\) multiplies \(\det\) by \(c\).
  • Adding a multiple of one row to another does not change \(\det\).
  • \(\det(AB)=\det A\det B\), \(\det A^T=\det A\), \(\det(cA)=c^n\det A\) for \(n\times n\).
  • The determinant of a triangular matrix is the product of its diagonal entries; proportional rows give \(\det=0\).

Example 2

Evaluate \(\det\begin{pmatrix}1&0&2\\3&1&0\\0&2&1\end{pmatrix}\).

Expand along row 1: \(1(1-0)-0+2(6-0)=13\).

Note: geometry

\(|\det A|\) is the factor by which \(\mathbf x\mapsto A\mathbf x\) scales area (or volume). The triangle with vertices \((0,0)\), \((x_1,y_1)\), \((x_2,y_2)\) has area \(\frac12|x_1y_2-x_2y_1|\).

Inverses

Definition: invertible matrix

A square matrix \(A\) is invertible if there is \(A^{-1}\) with \(AA^{-1}=A^{-1}A=I\). This happens exactly when \(\det A\ne0\).

Rule: finding an inverse

For \(2\times2\): \(\begin{pmatrix}a&b\\c&d\end{pmatrix}^{-1}=\frac1{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}\). In general \(A^{-1}=\frac1{\det A}\operatorname{adj}A\), or row-reduce \([A\mid I]\) to \([I\mid A^{-1}]\). Also \((AB)^{-1}=B^{-1}A^{-1}\) (the order reverses) and \((A^T)^{-1}=(A^{-1})^T\).

Method: inverse by row reduction

  1. Check \(\det A\ne0\).
  2. Write the augmented matrix \([A\mid I]\).
  3. Apply row operations until the left block is \(I\).
  4. The right block is now \(A^{-1}\); verify that \(AA^{-1}=I\).

Example 3

Check that \(\begin{pmatrix}1&2&3\\0&1&4\\5&6&0\end{pmatrix}\) has determinant 1 and inverse \(\begin{pmatrix}-24&18&5\\20&-15&-4\\-5&4&1\end{pmatrix}\).

\(\det=1(0-24)-2(0-20)+3(0-5)=-24+40-15=1\). Multiplying the first row of the matrix by the first column of the inverse: \(-24+40-15=1\); the second column gives \(18-30+12=0\), as required for \(AA^{-1}=I\).

Solving systems and Cramer’s rule

Rule: Cramer's rule

If \(A\) is invertible then \(A\mathbf x=\mathbf b\) has the unique solution \(\mathbf x=A^{-1}\mathbf b\). Cramer's rule gives \(x_i=\dfrac{\det A_i}{\det A}\), where \(A_i\) is \(A\) with column \(i\) replaced by \(\mathbf b\). When \(\det A=0\) there is either no solution or infinitely many.

Example 4

Solve \(2x+y=5\), \(x+3y=10\).

\(\det A=5\), so \(x=\frac{15-10}5=1\) and \(y=\frac{20-5}5=3\).

Note: efficiency

Cramer's rule is elegant, but row reduction is far more efficient for large systems.

Special matrices and linear maps

Definition: symmetric, diagonal, orthogonal

A matrix is symmetric if \(A^T=A\), diagonal if all off-diagonal entries vanish (then \(A^n\) raises each diagonal entry to the power \(n\)), and orthogonal if \(A^TA=I\).

Property: rotation matrices

\(R(\theta)=\begin{pmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{pmatrix}\) is orthogonal with \(\det R=1\), so \(R^{-1}=R^T=R(-\theta)\). Composing linear maps corresponds to multiplying matrices, with the right-most map acting first.

Example 5

What does \(R(90^\circ)\) do to \((1,0)\)?

\(\begin{pmatrix}0&-1\\1&0\end{pmatrix}\binom10=\binom01\), a rotation to \((0,1)\).

Watch out

  • Assuming \(AB=BA\).
  • Writing \((AB)^{-1}=A^{-1}B^{-1}\).
  • Using \(\det(A+B)=\det A+\det B\); it is false.
  • Forgetting the alternating signs in cofactor expansion, or claiming \(\det(2A)=2\det A\) for a \(3\times3\) matrix (it is \(8\det A\)).

Computing with matrices

Key fact: what the determinant measures

The determinant of a \(2\times2\) matrix is the signed area scale factor of the transformation it represents: the unit square becomes a parallelogram of area \(|\det A|\). In three dimensions the determinant is the signed volume scale factor, and it equals the volume of the parallelepiped whose edges are the columns (or rows) of the matrix. A determinant of zero means that the transformation flattens space onto a line or a plane, which is why such a matrix cannot be reversed. A negative determinant means that orientation is reversed, as in a reflection. This geometric picture explains the algebraic rule \(\det(AB)=\det A\det B\): first \(B\) scales areas by \(\det B\), then \(A\) scales them by \(\det A\).

Method: calculating an inverse by row reduction

  1. Write the augmented matrix \([A\,|\,I]\).
  2. Use row operations to turn the left-hand block into the identity, applying exactly the same operations to the right-hand block.
  3. When the left block is \(I\), the right block is \(A^{-1}\).
  4. If a row of zeros appears on the left, the matrix is singular and there is no inverse.
  5. Check by multiplying: \(AA^{-1}\) should equal \(I\).

Worked example 6: Inverse of a 3 by 3 matrix

Find the inverse of \(A=\) \(\begin{pmatrix}1&2&1\\0&1&3\\2&5&8\end{pmatrix}\).

Compute the determinant: \(1(8-15)-2(0-6)+1(0-2)=-7+12-2=3\). Because it is non-zero, the inverse exists. Row reduce \([A\,|\,I]\): subtract \(2R_1\) from \(R_3\) to get \((0,1,6\,|\,-2,0,1)\), then subtract \(R_2\) to get \((0,0,3\,|\,-2,-1,1)\), and continue until the left block is the identity. The result is \(A^{-1}=\dfrac13\)\(\begin{pmatrix}-7&-11&5\\6&6&-3\\-2&-1&1\end{pmatrix}\). Always multiply \(AA^{-1}\) to confirm that you obtain the identity matrix; here the first row of \(A\) times the first column gives \(-7+12-2=3\), and dividing by 3 gives 1.

Worked example 7: Using the determinant to test independence

Are the vectors \((1,2,3)\), \((0,1,4)\) and \((5,6,0)\) linearly independent?

Place the vectors as the rows of a matrix. Its determinant is \(1(0-24)-2(0-20)+3(0-5)=-24+40-15=1\). Since the determinant is non-zero, the vectors are linearly independent: none of them is a combination of the other two. If the determinant had been zero, the three vectors would lie in one plane through the origin.

Worked example 8: Powers of a diagonal matrix

Find \(D^n\) for \(D=\) \(\begin{pmatrix}2&0\\0&3\end{pmatrix}\).

Multiplying diagonal matrices multiplies the diagonal entries separately, so \(D^2=\) \(\begin{pmatrix}4&0\\0&9\end{pmatrix}\) and in general \(D^n=\) \(\begin{pmatrix}2^n&0\\0&3^n\end{pmatrix}\). This is the reason diagonal matrices are so convenient: powers, inverses and even exponentials are found entry by entry. The next chapter shows how to change basis so that many matrices become diagonal.

Worked example 9: A matrix equation with unknown matrix

Solve \(AX=C\) for the matrix \(X\), where \(A=\) \(\begin{pmatrix}2&1\\1&1\end{pmatrix}\) and \(C=\) \(\begin{pmatrix}3&5\\2&3\end{pmatrix}\).

Since \(\det A=2-1=1\), the inverse is \(A^{-1}=\) \(\begin{pmatrix}1&-1\\-1&2\end{pmatrix}\). Multiply both sides on the left (the order matters): \(X=A^{-1}C=\) \(\begin{pmatrix}1&-1\\-1&2\end{pmatrix}\)\(\begin{pmatrix}3&5\\2&3\end{pmatrix}\)\(=\) \(\begin{pmatrix}1&2\\1&1\end{pmatrix}\). Check: \(AX=\) \(\begin{pmatrix}2&1\\1&1\end{pmatrix}\)\(\begin{pmatrix}1&2\\1&1\end{pmatrix}\)\(=\) \(\begin{pmatrix}3&5\\2&3\end{pmatrix}\)\(=C\).

Worked example 10: Orthogonal matrices

Show that the rotation matrix \(R(\theta)=\) \(\begin{pmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{pmatrix}\) satisfies \(R^TR=I\).

The transpose is \(R^T=\) \(\begin{pmatrix}\cos\theta&\sin\theta\\-\sin\theta&\cos\theta\end{pmatrix}\). Multiplying, the top-left entry of \(R^TR\) is \(\cos^2\theta+\sin^2\theta=1\), the top-right is \(-\cos\theta\sin\theta+\sin\theta\cos\theta=0\), and the bottom-right is again \(1\). Therefore \(R^TR=I\) and \(R^{-1}=R^T\). Matrices with this property are called orthogonal: they preserve lengths and angles, and their determinant is \(\pm1\).

Key fact: when does a system have a solution?

A square system \(A\mathbf x=\mathbf b\) has exactly one solution when \(\det A\ne0\). When \(\det A=0\) the rows of \(A\) are dependent, and two things can happen. If the right-hand side respects the same dependence, the equations repeat each other and there are infinitely many solutions; if it contradicts the dependence, the equations are inconsistent and there is no solution at all. Geometrically, in two dimensions the equations describe lines: they cross at one point, or they coincide, or they are parallel. In three dimensions the equations describe planes, and the possibilities are a single point, a line, a whole plane, or no common point. Gaussian elimination reveals which case you are in, because a row of zeros on the left with a non-zero number on the right signals inconsistency.

Key fact: elementary row operations

There are three row operations: swap two rows, multiply a row by a non-zero number, and add a multiple of one row to another. Each one corresponds to multiplying on the left by an invertible elementary matrix. They have predictable effects on the determinant: swapping two rows changes its sign, multiplying a row by \(k\) multiplies the determinant by \(k\), and adding a multiple of one row to another leaves it unchanged. This gives an efficient way to compute a determinant: reduce to a triangular matrix, then multiply the diagonal entries and correct for any swaps or scalings. For large matrices this takes far fewer operations than cofactor expansion.

Note: efficiency of the methods

Cramer's rule is elegant and useful for \(2\times2\) systems and for formulas with parameters, but it requires many determinants and becomes slow for large systems. Gaussian elimination is far more efficient: it takes about \(n^3/3\) operations for an \(n\times n\) system. Computers never compute inverses explicitly when they only need to solve \(A\mathbf x=\mathbf b\); they factorise \(A\) into triangular matrices and then substitute. The inverse matrix is a theoretical tool as much as a computational one.

Watch out: order and sign

  • Matrix multiplication is not commutative: \(AB\) and \(BA\) are usually different, and \((AB)^{-1}=B^{-1}A^{-1}\) reverses the order.
  • \(\det(A+B)\ne\det A+\det B\) in general, and \(\det(kA)=k^n\det A\) for an \(n\times n\) matrix.
  • In a cofactor expansion the signs alternate in a chessboard pattern \(+-+,\,-+-,\,+-+\).
  • You can only invert a square matrix with a non-zero determinant.

Did you know?

Matrices were named by James Sylvester in 1850, and Arthur Cayley developed their algebra in 1858. Today matrices power Google's PageRank, 3D computer graphics, machine learning and the error-correcting codes in your phone. A modern film such as an animated feature multiplies billions of matrices for every second of footage.

Otto’s tip

Check an inverse by multiplying it with the original. You should obtain the identity.

How to use this University matrices and determinants revision notes

First, read the key points so that you know where the University matrices and determinants revision notes is going. Then work through each definition and worked example, and cover the solution before you read it. After that, practise with the matrices and determinants worksheet and check every question with the worksheet answers. When you feel ready, test yourself with the multiple choice questions or the quick quiz. Finally, sit the matrices and determinants test and mark it with the test answers.

Also, the starters are a good warm-up, so you can keep the key facts fresh. Moreover, all the pages of this chapter work together, so you can move between them at any time. For example, many pupils read the lesson on Monday, practise on Wednesday and test themselves on Friday. In short, this University matrices and determinants revision notes gives you everything you need for the chapter.