MATH-125 · Lesson 4 of 5 · 40 min

Determinants

Every square matrix has a single number attached to it, its determinant. That one number answers the most important question you can ask about a system of equations: does it have a unique solution? It also measures how a transformation scales areas and volumes, gives formulas for cross products and triple products, and turns up later in multivariable calculus (the Jacobian), in differential equations (the Wronskian) and in Lesson 5, where it is the key to finding eigenvalues.

This chapter defines the determinant, shows how to compute it efficiently by hand, explains its geometric meaning, and collects the properties that make it useful. Along the way you will compute the area of a surveyed lot and the volume of a box from its edge vectors.

The 2×2 determinant

For a 2×2 matrix the determinant is the product of the main diagonal minus the product of the other diagonal:

\[\det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc\]

You met this number in the 2×2 inverse formula in Lesson 3, where it appeared in the denominator. That is no accident: the inverse exists exactly when \(ad - bc \ne 0\).

What it measures

Place the two columns \((a, c)\) and \((b, d)\) tail to tail. They span a parallelogram, and the absolute value of the determinant is its area. The sign records orientation: positive if turning from the first column to the second is counterclockwise, negative if clockwise.

Left: columns (3, 1) and (1, 2) span a parallelogram of area 5 compared with the unit square. Right: columns (2, 1) and (4, 2) lie on the same line, so the parallelogram collapses to area 0.
The determinant is the signed area spanned by the columns. Parallel columns give zero.

Since the matrix sends the unit square (area 1) to this parallelogram, the determinant is the factor by which the transformation scales every area. A shape of area 3 becomes a shape of area \(3|\det A|\). A rotation has determinant 1 (areas are preserved); the stretch \(\begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}\) has determinant 2; a reflection has determinant \(-1\) (area preserved, orientation flipped).

If the determinant is zero, the columns are parallel and the parallelogram is flat. The transformation squashes the whole plane onto a line, and that is why it cannot be undone: many different vectors land on the same point, so there is no inverse.

Worked problem

Area of a triangle from coordinates

Find the area of the triangle with vertices \(P = (1, 1)\), \(Q = (4, 2)\) and \(R = (2, 5)\).

Show solution
  1. Edge vectors from \(P\): \(\overrightarrow{PQ} = (3, 1)\) and \(\overrightarrow{PR} = (1, 4)\).
  2. They span a parallelogram of area \(\left|\det\begin{pmatrix} 3 & 1 \\ 1 & 4 \end{pmatrix}\right| = |12 - 1| = 11\).
  3. The triangle is half the parallelogram.

Answer: 5.5 square units

The 3×3 determinant by cofactor expansion

For a 3×3 matrix, expand along the first row. Each entry multiplies the 2×2 determinant left when you cross out its row and column (its minor), with signs alternating \(+, -, +\):

\[\begin{vmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{vmatrix} = a_{11}\begin{vmatrix} a_{22} & a_{23} \\ a_{32} & a_{33} \end{vmatrix} - a_{12}\begin{vmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{vmatrix} + a_{13}\begin{vmatrix} a_{21} & a_{22} \\ a_{31} & a_{32} \end{vmatrix}\]

A minor with its sign attached is called a cofactor. You can expand along any row or any column, not just the first, as long as you use the checkerboard of signs:

\[\begin{pmatrix} + & - & + \\ - & + & - \\ + & - & + \end{pmatrix}\]

Choose the row or column with the most zeros, since each zero kills a whole term.

Worked problem

Expanding along the first row

Find \(\det\begin{pmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 1 & 0 & 6 \end{pmatrix}\).

Show solution
  1. First term: \(1 \times \begin{vmatrix} 4 & 5 \\ 0 & 6 \end{vmatrix} = 1 \times (24 - 0) = 24\).
  2. Second term: \(-2 \times \begin{vmatrix} 0 & 5 \\ 1 & 6 \end{vmatrix} = -2 \times (0 - 5) = 10\).
  3. Third term: \(3 \times \begin{vmatrix} 0 & 4 \\ 1 & 0 \end{vmatrix} = 3 \times (0 - 4) = -12\).
  4. Sum: \(24 + 10 - 12 = 22\).
  5. Check by expanding down column 1 instead (it has a zero): \(1(24 - 0) - 0 + 1(2 \cdot 5 - 3 \cdot 4) = 24 - 2 = 22\).

Answer: 22

For a 3×3 matrix the absolute value of the determinant is the volume of the box (parallelepiped) spanned by the three columns, and it is the factor by which the transformation scales volumes. It equals the scalar triple product from Lesson 1: \(\det[\mathbf{a}\;\mathbf{b}\;\mathbf{c}] = \mathbf{a}\cdot(\mathbf{b}\times\mathbf{c})\). The cross product formula written as a determinant with \(\mathbf{i}, \mathbf{j}, \mathbf{k}\) in the top row is the same cofactor expansion.

Worked problem

Volume of a box

A crystal unit cell has edge vectors \((1, 0, 0)\), \((0, 2, 0)\) and \((1, 1, 3)\) (in nanometres). Find its volume.

Show solution
  1. Put the vectors in as rows (the transpose has the same determinant, as shown below):
  2. \[\begin{vmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 1 & 1 & 3 \end{vmatrix}\]
  3. Expand along the first row: only the first term survives. \(1 \times (2 \cdot 3 - 0 \cdot 1) = 6\).

Answer: 6 nm³

Properties of determinants

Cofactor expansion of an \(n \times n\) matrix needs roughly \(n!\) multiplications. For \(n = 10\) that is over three million, and for \(n = 25\) a computer doing a billion operations per second would need hundreds of millions of years. The properties below lead to a far faster method, and they are useful in their own right.

Row operations

Each of the three row operations from Lesson 2 has a predictable effect:

  • Swapping two rows multiplies the determinant by \(-1\).
  • Multiplying a row by \(c\) multiplies the determinant by \(c\).
  • Adding a multiple of one row to another leaves the determinant unchanged.

Two consequences follow at once. A matrix with a row of zeros, or with two equal or proportional rows, has determinant zero. And multiplying the whole \(n \times n\) matrix by \(c\) scales every row, so \(\det(cA) = c^n\det A\), not \(c\det A\).

Triangular matrices

The determinant of a triangular matrix (upper or lower) is the product of its diagonal entries. Expanding down the first column repeatedly leaves only that product. This includes diagonal matrices and the identity, whose determinant is 1.

Products, transposes and inverses

\[\det(AB) = \det A\,\det B, \qquad \det(A^T) = \det A, \qquad \det(A^{-1}) = \frac{1}{\det A}\]

The product rule matches the geometry: doing transformation \(B\) and then \(A\) scales areas by \(\det B\) and then by \(\det A\). For example, \(\det\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} = -2\) and \(\det\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} = -1\), and their product \(\begin{pmatrix} 2 & 1 \\ 4 & 3 \end{pmatrix}\) has determinant \(6 - 4 = 2 = (-2)(-1)\). There is no such rule for sums: \(\det(A + B)\) is generally not \(\det A + \det B\).

Because \(\det(A^T) = \det A\), everything said about rows is also true of columns.

Computing determinants by row reduction

Reduce the matrix to triangular form with row operations, keeping track of swaps and scalings, then multiply the diagonal entries. This needs about \(n^3/3\) operations, the same as elimination, and it is how software computes determinants.

Worked problem

Factoring out a row

Find \(\det\begin{pmatrix} 2 & 4 & 6 \\ 1 & 3 & 5 \\ 1 & 1 & 4 \end{pmatrix}\).

Show solution
  1. Row 1 has a common factor 2. Take it out: \(\det = 2\det\begin{pmatrix} 1 & 2 & 3 \\ 1 & 3 & 5 \\ 1 & 1 & 4 \end{pmatrix}\).
  2. \(R_2 \to R_2 - R_1\) and \(R_3 \to R_3 - R_1\) (no change to the determinant): rows become \((0, 1, 2)\) and \((0, -1, 1)\).
  3. \(R_3 \to R_3 + R_2\): row 3 becomes \((0, 0, 3)\). The matrix is now upper triangular with diagonal 1, 1, 3.
  4. \(\det = 2 \times (1 \times 1 \times 3) = 6\).

Answer: 6

Worked problem

A 4×4 determinant

Find \(\det\begin{pmatrix} 1 & 2 & 0 & 1 \\ 2 & 5 & 1 & 3 \\ 0 & 1 & 3 & 2 \\ 1 & 3 & 2 & 4 \end{pmatrix}\).

Show solution
  1. Clear column 1: \(R_2 \to R_2 - 2R_1\) gives \((0, 1, 1, 1)\); \(R_4 \to R_4 - R_1\) gives \((0, 1, 2, 3)\). Row 3 already starts with 0.
  2. Clear column 2 using row 2: \(R_3 \to R_3 - R_2\) gives \((0, 0, 2, 1)\); \(R_4 \to R_4 - R_2\) gives \((0, 0, 1, 2)\).
  3. Clear column 3: \(R_4 \to R_4 - \tfrac12 R_3\) gives \((0, 0, 0, 1.5)\).
  4. No swaps or scalings were used, so the determinant is the product of the diagonal: \(1 \times 1 \times 2 \times 1.5\).

Answer: 3. By cofactor expansion this would have taken four 3×3 determinants

Determinants and invertibility

Everything so far comes together in one theorem. For a square matrix \(A\), the following statements are all equivalent. If one is true, they all are:

  • \(\det A \ne 0\).
  • \(A\) is invertible.
  • \(A\mathbf{x} = \mathbf{b}\) has exactly one solution for every \(\mathbf{b}\).
  • \(A\mathbf{x} = \mathbf{0}\) has only the solution \(\mathbf{x} = \mathbf{0}\).
  • Elimination gives a pivot in every column (the rank is \(n\)).
  • The columns of \(A\) do not lie in a common line, plane or lower-dimensional space.

So the determinant is a one-number test for whether a system is well posed. In design work it is common to look for parameter values that make a determinant zero, because those are the values where something goes wrong: a mechanism locks or becomes free to move, a structure buckles, a control system loses the ability to steer a state.

Worked problem

Finding the singular value of a parameter

For which value of \(k\) is \(\begin{pmatrix} 1 & 2 & 1 \\ 0 & 1 & k \\ 2 & 1 & 1 \end{pmatrix}\) singular?

Show solution
  1. Expand along the first row: \(1(1 \cdot 1 - k \cdot 1) - 2(0 \cdot 1 - k \cdot 2) + 1(0 \cdot 1 - 1 \cdot 2)\).
  2. Simplify: \((1 - k) + 4k - 2 = 3k - 1\).
  3. Singular when \(3k - 1 = 0\).

Answer: k = 1/3. For every other k, the matrix is invertible

Cramer's rule

For a system \(A\mathbf{x} = \mathbf{b}\) with \(\det A \ne 0\), each unknown is a ratio of determinants:

\[x_i = \frac{\det A_i}{\det A}\]

where \(A_i\) is \(A\) with its \(i\)-th column replaced by \(\mathbf{b}\).

Worked problem

Cramer's rule in 2×2

Solve \(3x + 2y = 7\), \(x + 4y = 9\).

Show solution
  1. \(\det A = \begin{vmatrix} 3 & 2 \\ 1 & 4 \end{vmatrix} = 12 - 2 = 10\).
  2. Replace column 1 by \(\mathbf{b}\): \(\begin{vmatrix} 7 & 2 \\ 9 & 4 \end{vmatrix} = 28 - 18 = 10\), so \(x = 10/10 = 1\).
  3. Replace column 2 by \(\mathbf{b}\): \(\begin{vmatrix} 3 & 7 \\ 1 & 9 \end{vmatrix} = 27 - 7 = 20\), so \(y = 20/10 = 2\).

Answer: x = 1, y = 2

Cramer's rule is elegant and handy for 2×2 systems, for finding just one unknown, or for getting a formula in terms of symbols (as in circuit transfer functions). For numerical work beyond 3×3 it is far slower than elimination. As a check, for the 3×3 system solved in Lesson 2, \(\det A = 7\) and replacing column 1 by \((6, 3, 2)\) also gives 7, so \(x = 1\), agreeing with elimination.

Application: areas from survey coordinates

Surveyors find the area of a lot from the coordinates of its corners using the shoelace formula, which is a sum of 2×2 determinants. For vertices \((x_1, y_1), \dots, (x_n, y_n)\) listed in order around the boundary:

\[\text{Area} = \frac12\left|\sum_{i=1}^{n} \begin{vmatrix} x_i & x_{i+1} \\ y_i & y_{i+1} \end{vmatrix}\right| = \frac12\left|\sum_{i=1}^{n} (x_i y_{i+1} - x_{i+1} y_i)\right|\]

with \((x_{n+1}, y_{n+1}) = (x_1, y_1)\). Each term is twice the signed area of the triangle from the origin to one edge. Triangles outside the shape are counted once positive and once negative, so they cancel.

A four-sided lot with corners A (0, 0), B (40, 0), C (50, 30) and D (10, 25) in metres. Area 1075 square metres.
A surveyed lot. The corners are listed counterclockwise.

Worked problem

Area of a lot

Find the area of the lot with corners \(A(0, 0)\), \(B(40, 0)\), \(C(50, 30)\) and \(D(10, 25)\), in metres.

Show solution
  1. A to B: \(0 \cdot 0 - 40 \cdot 0 = 0\).
  2. B to C: \(40 \cdot 30 - 50 \cdot 0 = 1200\).
  3. C to D: \(50 \cdot 25 - 10 \cdot 30 = 950\).
  4. D to A: \(10 \cdot 0 - 0 \cdot 25 = 0\).
  5. Area \(= \tfrac12(0 + 1200 + 950 + 0) = 1075\) m².

Answer: 1075 m² (about 0.11 ha)

The same formula is how CAD programs and GIS software compute polygon areas, and in Calculus III it reappears as Green's theorem.

Looking ahead: the Jacobian

Because the determinant is the local area-scaling factor of a transformation, it appears whenever you change variables in a multiple integral. Switching to polar coordinates, the small rectangle \(dr\,d\theta\) maps to a curved patch of area \(r\,dr\,d\theta\). That factor \(r\) is the determinant of the matrix of partial derivatives, called the Jacobian. You will use it in Calculus III to find masses, centroids and moments of inertia of circular and spherical parts.

Common mistakes

  • MistakeForgetting the alternating signs in cofactor expansion, especially the minus on the middle term of a 3×3.

    InsteadUse the checkerboard + − + / − + − / + − +, and attach the sign to each cofactor.

  • MistakeWriting det(2A) = 2 det A for a 3×3 matrix.

    InsteadEach of the n rows is scaled, so det(cA) = cⁿ det A. For 3×3, det(2A) = 8 det A.

  • MistakeAssuming det(A + B) = det A + det B.

    InsteadOnly products split: det(AB) = det A det B.

  • MistakeSwapping rows during reduction and forgetting to change the sign.

    InsteadEvery swap multiplies the determinant by −1. Keep a running count.

  • MistakeUsing the diagonal shortcut on a 4×4 matrix.

    InsteadThe shortcut works only for 3×3. Use row reduction or cofactors.

  • MistakeListing shoelace vertices in a criss-cross order.

    InsteadGo around the boundary in order, either direction, and close the loop back to the first vertex.

Summary and key terms

  • det of a 2×2 is ad − bc. Its absolute value is the area spanned by the columns and the area-scaling factor of the transformation.
  • Larger determinants expand along any row or column with checkerboard signs; pick the line with most zeros.
  • Row swaps change the sign, scaling a row scales the determinant, and adding a multiple of a row changes nothing. Triangular determinants are the product of the diagonal.
  • det(AB) = det A det B, det Aᵀ = det A, det A⁻¹ = 1/det A, and det(cA) = cⁿ det A.
  • A is invertible exactly when det A ≠ 0, which is exactly when Ax = b has a unique solution.
  • Cramer's rule gives xᵢ = det Aᵢ / det A; useful for small or symbolic systems.
  • The shoelace formula computes polygon areas from corner coordinates.
Determinant
A number attached to a square matrix; the signed area or volume scaling factor.
Minor
The determinant left after deleting one row and one column.
Cofactor
A minor multiplied by its checkerboard sign.
Cofactor expansion
Computing a determinant from the entries and cofactors of one row or column.
Singular matrix
A square matrix with determinant zero; it has no inverse.
Cramer's rule
Solving a system with ratios of determinants.
Shoelace formula
Polygon area from vertex coordinates as a sum of 2×2 determinants.
Jacobian
The determinant of a matrix of partial derivatives; the area factor in a change of variables.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Find \(\det\begin{pmatrix} 5 & -2 \\ 3 & 4 \end{pmatrix}\) and the area of the parallelogram spanned by its columns.

    Show answer

    20 − (−6) = 26. Area 26.

  2. Evaluate \(\det\begin{pmatrix} 2 & 1 & 3 \\ 0 & -1 & 4 \\ 1 & 2 & 0 \end{pmatrix}\) by expanding down column 1.

    Show answer

    2[(−1)(0) − (4)(2)] − 0 + 1[(1)(4) − (3)(−1)] = 2(−8) + 7 = −9.

  3. If \(A\) is 3×3 with \(\det A = 4\), find \(\det(2A)\), \(\det(A^{-1})\), \(\det(A^T)\) and \(\det(A^2)\).

    Show answer

    2³ × 4 = 32; 1/4; 4; 4 × 4 = 16.

  4. Without expanding, explain why \(\det\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 2 & 4 & 6 \end{pmatrix} = 0\).

    Show answer

    Row 3 is twice row 1. Subtracting 2R₁ from R₃ gives a zero row without changing the determinant.

  5. Find the determinant of \(\begin{pmatrix} 3 & 7 & -1 & 2 \\ 0 & 2 & 5 & 1 \\ 0 & 0 & -4 & 6 \\ 0 & 0 & 0 & 0.5 \end{pmatrix}\).

    Show answer

    Upper triangular: 3 × 2 × (−4) × 0.5 = −12.

  6. For which \(\lambda\) is \(\begin{pmatrix} 4 - \lambda & 2 \\ 1 & 3 - \lambda \end{pmatrix}\) singular?

    Show answer

    (4 − λ)(3 − λ) − 2 = λ² − 7λ + 10 = (λ − 2)(λ − 5). Singular at λ = 2 and λ = 5. (These are the eigenvalues you will meet in Lesson 5.)

  7. Use Cramer's rule to solve \(2x + y = 5\), \(x + 3y = 10\).

    Show answer

    det A = 5. x = (15 − 10)/5 = 1. y = (20 − 5)/5 = 3.

  8. Find the volume of the box with edges \((2, 0, 0)\), \((1, 3, 0)\) and \((1, 1, 4)\).

    Show answer

    The matrix with these as rows is lower triangular: 2 × 3 × 4 = 24.

  9. Find the area of the triangle with vertices \((0, 0)\), \((6, 1)\) and \((2, 5)\).

    Show answer

    ½|6 × 5 − 2 × 1| = ½ × 28 = 14.

  10. A building footprint has corners \((0, 0)\), \((20, 0)\), \((20, 12)\), \((8, 18)\) and \((0, 12)\) metres. Find its area.

    Show answer

    Terms: 0; (20)(12) − (20)(0) = 240; (20)(18) − (8)(12) = 264; (8)(12) − (0)(18) = 96; 0. Area = ½ × 600 = 300 m². Check: a 20 × 12 rectangle (240) plus a triangle with base 20 and height 6 (60).

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz