Linear Algebra · Undergraduate

Determinants: Cofactor Expansion, Row Operations and Area

Quick answer

The determinant of a square matrix is a single number that is zero exactly when the matrix has no inverse. It can be computed by cofactor expansion along any row or column, or faster by row reducing to triangular form, where it is the product of the diagonal entries. Swapping two rows flips its sign, scaling a row scales it, and adding a multiple of one row to another leaves it unchanged. Geometrically, |det A| is the factor by which A scales areas or volumes, and det(AB) = det A · det B.

What you'll learn

  • Compute a determinant by cofactor expansion
  • Use row operations to compute a determinant
  • Interpret |det A| as an area or volume scale factor
  • Use det A ≠ 0 as a test for invertibility

One number that decides invertibility

The 2×22 \times 2 inverse formula divides by ad−bcad - bc, and the inverse exists exactly when that number is not zero. The number is the determinant:

det⁡[abcd]=ad−bc\det\begin{bmatrix} a & b\\ c & d \end{bmatrix} = ad - bc

Every square matrix has a determinant, and the same rule holds in any size: AA is invertible exactly when det⁡A≠0\det A \ne 0.

For a 3×33 \times 3 matrix, cofactor expansion along the first row reduces the problem to 2×22 \times 2 determinants. Each entry a1ja_{1j} multiplies the determinant of the matrix left after deleting row 11 and column jj, with signs alternating +, −, ++,\ -,\ +:

det⁡A=a11det⁡A11−a12det⁡A12+a13det⁡A13\det A = a_{11}\det A_{11} - a_{12}\det A_{12} + a_{13}\det A_{13}

The expansion works along any row or column, with signs following the checkerboard pattern that starts with ++ in the top-left corner. A row or column full of zeros is the best one to choose.

Why row reduction is the fast way

Cofactor expansion of an n×nn \times n matrix calls for nn smaller determinants, each calling for n−1n - 1 more, which grows faster than any computer can handle once nn reaches the twenties. Row operations change the determinant in three predictable ways:

Row operationEffect on det⁡\det
swap two rowsmultiplies it by −1-1
multiply a row by ccmultiplies it by cc
add a multiple of one row to anotherno change

And for a triangular matrix, expanding down the first column keeps a single term at every step, so the determinant is the product of the diagonal. Reduce to triangular form using mostly the third operation, which costs nothing, keep track of any swaps and scalings, and multiply the diagonal. That takes about n3n^3 steps instead of n!n!.

The determinant as area

The columns of AA are where AA sends e1\mathbf{e}_1 and e2\mathbf{e}_2, so AA turns the unit square into the parallelogram on its columns. That parallelogram has area ∣det⁡A∣|\det A|. In three dimensions the unit cube becomes a box of volume ∣det⁡A∣|\det A|. Since a linear map stretches every small square by the same factor, ∣det⁡A∣|\det A| is the factor by which AA multiplies every area. A negative determinant also flips orientation, as a mirror does.

The parallelogram on (3, 1) and (1, 2) has area 5 A parallelogram with corners (0, 0), (3, 1), (4, 3) and (1, 2), shaded, built on the vectors (3, 1) and (1, 2) drawn as arrows from the origin. Its area is |3·2 − 1·1| = 5. (3, 1) (1, 2) area 5 1234123xy
The parallelogram on (3, 1) and (1, 2) has area 5

This picture explains the product rule. Doing BB scales areas by ∣det⁡B∣|\det B|, and then AA scales them by ∣det⁡A∣|\det A|, so

det⁡(AB)=det⁡A⋅det⁡Bdet⁡(A−1)=1det⁡A\det(AB) = \det A \cdot \det B \qquad \det\left(A^{-1}\right) = \frac{1}{\det A}

and a matrix that flattens the plane onto a line, with zero area, cannot be undone.

Worked examples

Common mistakes

Practice problems

  1. Find det⁡[5234]\det\begin{bmatrix} 5 & 2\\ 3 & 4 \end{bmatrix}.

    Answer

    1414

    Full solution

    5⋅4−2⋅3=20−65 \cdot 4 - 2 \cdot 3 = 20 - 6.

  2. Find det⁡[142031205]\det\begin{bmatrix} 1 & 4 & 2\\ 0 & 3 & 1\\ 2 & 0 & 5 \end{bmatrix}.

    Answer

    1111

    Full solution

    Expand down the first column, which has a 00: 1(15−0)−0+2(4−6)=15−4=111(15 - 0) - 0 + 2(4 - 6) = 15 - 4 = 11.

  3. Find det⁡[200730145]\det\begin{bmatrix} 2 & 0 & 0\\ 7 & 3 & 0\\ 1 & 4 & 5 \end{bmatrix}.

    Answer

    3030

    Full solution

    Lower triangular, so multiply the diagonal: 2⋅3⋅52 \cdot 3 \cdot 5.

  4. Show that det⁡[201132111]=0\det\begin{bmatrix} 2 & 0 & 1\\ 1 & 3 & 2\\ 1 & 1 & 1 \end{bmatrix} = 0. What does that say about the columns?

    Answer

    2(3−2)+(1−3)=02(3 - 2) + (1 - 3) = 0; the columns are dependent.

    Full solution

    Expand along the first row. A zero determinant means the matrix is not invertible, so by the Invertible Matrix Theorem its columns are linearly dependent.

  5. A 3×33 \times 3 matrix has det⁡A=5\det A = 5. Find det⁡(2A)\det(2A) and det⁡(A−1)\det\left(A^{-1}\right).

    Answer

    4040 and 15\tfrac{1}{5}

    Full solution

    2A2A doubles each of three rows, multiplying the determinant by 23=82^3 = 8. And det⁡A⋅det⁡A−1=det⁡I=1\det A \cdot \det A^{-1} = \det I = 1.

  6. Swapping two rows of AA gives BB, and det⁡A=7\det A = 7. Find det⁡B\det B.

    Answer

    −7-7

    Full solution

    A swap flips the sign.

  7. Find the area of the triangle with corners (0,0)(0, 0), (4,1)(4, 1) and (1,3)(1, 3).

    Answer

    5.55.5

    Full solution

    The parallelogram on (4,1)(4, 1) and (1,3)(1, 3) has area ∣12−1∣=11|12 - 1| = 11, and the triangle is half of it.

  8. For which kk is [k28k]\begin{bmatrix} k & 2\\ 8 & k \end{bmatrix} not invertible?

    Answer

    k=4k = 4 or k=−4k = -4

    Full solution

    det⁡=k2−16\det = k^2 - 16, which is zero at k=±4k = \pm 4.

  9. AA and BB are 3×33 \times 3 with det⁡A=2\det A = 2 and det⁡B=−3\det B = -3. Find det⁡(AB)\det(AB) and det⁡(BA)\det(BA).

    Answer

    Both are −6-6.

    Full solution

    Each is the product of the two determinants. Even when AB≠BAAB \ne BA, their determinants agree.

  10. A student computes det⁡[2413]\det\begin{bmatrix} 2 & 4\\ 1 & 3 \end{bmatrix} by first dividing the top row by 22, getting det⁡[1213]=1\det\begin{bmatrix} 1 & 2\\ 1 & 3 \end{bmatrix} = 1, and reports 11. What went wrong?

    Hint

    What does scaling a row do to the determinant?

    Answer

    Dividing a row by 22 divided the determinant by 22. The answer is 2⋅1=22 \cdot 1 = 2.

    Full solution

    Directly, 2⋅3−4⋅1=22 \cdot 3 - 4 \cdot 1 = 2. Scaling a row scales the determinant, so any row scaling has to be undone at the end: factoring 22 out of the top row gives det⁡=2⋅det⁡[1213]=2\det = 2 \cdot \det\begin{bmatrix} 1 & 2\\ 1 & 3 \end{bmatrix} = 2.

Frequently asked questions

How do you compute a 3 × 3 determinant?

Expand along a row: each entry times the determinant of the 2 × 2 matrix left after deleting its row and column, with signs alternating +, −, +.

How do row operations change a determinant?

Swapping two rows multiplies it by −1. Multiplying a row by c multiplies it by c. Adding a multiple of one row to another leaves it unchanged.

What is the determinant of a triangular matrix?

The product of its diagonal entries, since cofactor expansion down the first column keeps only one term at each step.

What does a determinant of zero mean?

The matrix is not invertible. Its columns are dependent, and the transformation flattens space into a lower dimension, giving zero area or volume.

What does the determinant measure geometrically?

|det A| is the factor by which A multiplies areas in ℝ² or volumes in ℝ³. A negative sign means A reverses orientation, like a mirror.

What to learn next