The Inverse of a 3 × 3 Matrix

Minors, then signs, then a transpose.

Four stages

The inverse of a 3 × 3 matrix is found in four stages. Find the minor of every entry. Give each minor the sign of its place, which makes it a cofactor. Transpose the matrix of cofactors, so that its rows become columns: the result is called the adjugate of A, written adj A. Last, divide the adjugate by the determinant of A.

This is the same recipe as for a 2 × 2 matrix. There the cofactors of (a b; c d) are d, −c, −b and a, the adjugate is (d −b; −c a), and dividing it by ad − bc gives the inverse.

The determinant first

Take A = (1 2 3; 0 1 4; 5 6 0). Expanding along row 1 with the signs plus, minus, plus gives det A = 1 × (1 × 0 − 4 × 6) − 2 × (0 × 0 − 4 × 5) + 3 × (0 × 6 − 1 × 5) = −24 + 40 − 15 = 1.

It is not 0, so A has an inverse. Working out the determinant first saves the rest of the work when it is 0, because then there is no inverse to find.

Nine minors

Every entry of A has a minor: delete the row and column through it and find the determinant of the 2 × 2 that is left. Row 1 gives three: the minor of the 1 is the determinant of (1 4; 6 0), which is 0 − 24 = −24; the minor of the 2 is that of (0 4; 5 0), which is 0 − 20 = −20; and the minor of the 3 is that of (0 1; 5 6), which is 0 − 5 = −5.

Row 2 gives three more. Deleting row 2 and column 1, through the 0, leaves (2 3; 6 0), with determinant 0 − 18 = −18. Through the 1 it leaves (1 3; 5 0), giving 0 − 15 = −15, and through the 4 it leaves (1 2; 5 6), giving 6 − 10 = −4.

Row 3 gives the last three. Through the 5 it leaves (2 3; 1 4), giving 8 − 3 = 5; through the 6 it leaves (1 3; 0 4), giving 4 − 0 = 4; and through the 0 it leaves (1 2; 0 1), giving 1 − 0 = 1.

A123014560

Row 2 and column 1 are deleted, through the 0. The four entries left in gold have determinant 2 × 0 − 3 × 6 = −18, the minor of that 0.

Signs make cofactors

The places of a 3 × 3 matrix carry signs that alternate like a chessboard: plus, minus, plus along row 1, then minus, plus, minus, then plus, minus, plus. A minor in a plus place keeps its sign, and a minor in a minus place has its sign changed. The result is the cofactor of that entry.

The minor of the 2 is −20, and its place, row 1, column 2, carries a minus, so its cofactor is 20. The minor of the 0 in row 2 is −18, in a minus place, so its cofactor is 18. The four minus places change sign and the five plus places do not.

minors−24−20−5−18−15−4541cofactors−2420−518−1545−41→

The minors on the left become the cofactors on the right. The four entries in minus places, −20, −18, −4 and 4, change sign, and the other five stay as they are.

Transposing to the adjugate

Reflect the matrix of cofactors in its main diagonal: row 1 becomes column 1, row 2 becomes column 2 and row 3 becomes column 3. The entries on the main diagonal stay where they are, and every other entry swaps with its partner across the diagonal.

The cofactors (−24 20 −5; 18 −15 4; 5 −4 1) become the adjugate (−24 18 5; 20 −15 −4; −5 4 1).

cofactors−2420−518−1545−41adj A−2418520−15−4−541→

Row 1 of the cofactors, −24, 20 and −5, becomes column 1 of the adjugate.

Dividing, then checking

The last stage divides every entry of the adjugate by det A. Here det A = 1, so the adjugate is already the inverse: the inverse of A is the matrix (−24 18 5; 20 −15 −4; −5 4 1).

Check it by multiplying A by it, row by column. Row 1 of A, which is 1, 2, 3, with column 1 of the inverse, which is −24, 20, −5, gives 1 × (−24) + 2 × 20 + 3 × (−5) = −24 + 40 − 15 = 1. Row 1 with column 2, which is 18, −15, 4, gives 18 − 30 + 12 = 0. Row 2, which is 0, 1, 4, with column 2 gives 0 − 15 + 16 = 1, and row 3, which is 5, 6, 0, with column 3, which is 5, −4, 1, gives 25 − 24 + 0 = 1. The other off-diagonal entries come to 0 in the same way, so the product is I.

A123014560A⁻¹−2418520−15−4−541×

Row 1 of A meets column 1 of the inverse: 1 × (−24) + 2 × 20 + 3 × (−5) = 1, the top left entry of the product, which is I.

Why it works

Row 1 of A times column 1 of the adjugate is 1 × (−24) + 2 × 20 + 3 × (−5): each entry of row 1 times its own cofactor. That is exactly the expansion of det A along row 1. The transpose is what lines each entry up with its own cofactor, so every diagonal entry of A times adj A is det A.

Row 1 of A times column 2 of the adjugate pairs the entries of row 1 with the cofactors of row 2. That is the expansion of a matrix whose rows 1 and 2 are both 1, 2, 3, and a matrix with two equal rows has determinant 0. So A times adj A is det A times I, and dividing by det A leaves I.

A determinant that is not 1

For B = (2 0 0; 0 1 1; 0 1 3), expanding along row 1 gives det B = 2 × (1 × 3 − 1 × 1) = 4. The cofactors are (2 0 0; 0 6 −2; 0 −2 2), and that matrix is its own transpose, so it is also the adjugate.

Dividing every entry by 4 gives the inverse of B, drawn below. Check one entry: row 2 of B, which is 0, 1, 1, with column 2 of the inverse gives 0 + 3/2 − 1/2 = 1.

B⁻¹1/20003/2−1/20−1/21/2

The inverse of B is one quarter of its adjugate, because det B = 4: the 6 becomes 3/2 and each −2 becomes −1/2. Its column 2 is the one used in the check.

The usual mistakes

Taking the sign from the entry. The sign of a cofactor comes from its place in the chessboard pattern; the 2 in row 1 is positive, but its place is a minus.

Leaving a minor without its sign. In a minus place the minor −20 becomes the cofactor 20.

Giving the deleted entry as its minor. The minor is built from the four entries that are left, not from the entry that was crossed out.

Forgetting to transpose. The matrix of cofactors is not the inverse: its column 1, which is −24, 18, 5, with row 1 of A gives −24 + 36 + 15 = 27, not 1.

Forgetting to divide. When det A is not 1, the adjugate is det A times the inverse, so its entries are too big by that factor.

Three bouquets

In the application below, three bouquets of roses, lilies and tulips give three equations. Their matrix has determinant 1, its inverse is found from the cofactors, and multiplying the column of prices by the inverse gives the price of each flower.

Worked example: The Prices of Roses, Lilies and Tulips from Three Bouquets, Found with a 3 × 3 Inverse

Question A florist sells three bouquets. Bouquet P has 1 rose, 2 lilies and 1 tulip and costs $13; bouquet Q has 1 rose, 1 lily and 1 tulip and costs $9; bouquet R has 2 roses, 1 lily and 1 tulip and costs $12. A rose costs $x, a lily $y and a tulip $z. (a) Write this as Axyz = 13912, find det A by expanding along the first row, and find A−1. (b) Use A−1 to find the price of each flower.

  1. 1.The three bouquets give x + 2y + z = 13, x + y + z = 9 and 2x + y + z = 12, so A = 121111211.

    rosesliliestulipscost $P12113Q1119R21112A =121111211
    rosesliliestulipscost $P12113Q1119R21112A =121111211
    One row for each bouquet: A = 121111211, and Axyz = 13912.
  2. 2.Expand along the first row with the signs +, −, +: det A = 1 × (1 − 1) − 2 × (1 − 2) + 1 × (1 − 2) = 0 + 2 − 1 = 1. It is not 0, so A has an inverse.

    rosesliliestulipscost $P12113Q1119R211121 × (1 − 1) − 2 × (1 − 2) + 1 × (1 − 2)= 0 + 2 − 1 = 1
    rosesliliestulipscost $P12113Q1119R211121 × (1 − 1) − 2 × (1 − 2) + 1 × (1 − 2)= 0 + 2 − 1 = 1
    Expanding along the first row: det A = 1 × 0 − 2 × (−1) + 1 × (−1) = 1.
  3. 3.Find the minor of every entry, and give it the sign from the pattern +−+−+−+−+. For example, the minor of the 2 in row 1 is 1 × 1 − 1 × 2 = −1, and its place takes −, so its cofactor is 1. The cofactors are 01−1−1−1310−1.

    rosesliliestulipscost $P12113Q1119R21112signs+−+−+−+−+cofactors01−1−1−1310−1
    rosesliliestulipscost $P12113Q1119R21112signs+−+−+−+−+cofactors01−1−1−1310−1
    Each minor, given the sign from the pattern, is a cofactor: the cofactors are 01−1−1−1310−1.
  4. 4.(a) Transpose the cofactors, turning each row into a column, and divide by det A = 1: A−1 = 0−111−10−13−1.

    rosesliliestulipscost $P12113Q1119R21112A−1=0−111−10−13−1cofactors transposed, divided by 1
    rosesliliestulipscost $P12113Q1119R21112A−1=0−111−10−13−1cofactors transposed, divided by 1
    (a) Transposed and divided by det A = 1, the cofactors give A−1 = 0−111−10−13−1.
  5. 5.Multiply the column of prices by the inverse: xyz = A−113912 = 0 − 9 + 1213 − 9 + 0−13 + 27 − 12 = 342.

    rosesliliestulipscost $P12113Q1119R211120−111−10−13−1×13912=342
    rosesliliestulipscost $P12113Q1119R211120−111−10−13−1×13912=342
    A−113912 = 342.
  6. 6.(b) A rose costs $3, a lily $4 and a tulip $2. Check: bouquet P costs 3 + 8 + 2 = 13 dollars, Q costs 3 + 4 + 2 = 9 and R costs 6 + 4 + 2 = 12.

    rosesliliestulipscost $P12113Q1119R21112rose $3, lily $4, tulip $2check P: 3 + 2 × 4 + 2 = 13
    rosesliliestulipscost $P12113Q1119R21112rose $3, lily $4, tulip $2check P: 3 + 2 × 4 + 2 = 13
    (b) A rose costs $3, a lily $4 and a tulip $2.

Answer: (a) det A = 1 and A−1 = 0−111−10−13−1; (b) a rose costs $3, a lily $4 and a tulip $2

Common mistakes

  • Forgetting to transpose the cofactors. The matrix of cofactors is not the inverse: its first row times the column of prices gives 0 × 13 + 1 × 9 − 1 × 12 = −3, a negative price.
  • Using the minors without the signs of the pattern. The minors in the places marked − change sign; without that, A times the result is not I.

More determinants and inverses problems, worked step by step →

Practice The Inverse of a 3 × 3 Matrix in the app