1.4 - Determinants and inverses of three-by-three matrices

1.4 - Determinants and inverses of three-by-three matrices

A three-by-three inverse uses the same idea as a two-by-two inverse: build a matrix whose product with the original is a multiple of the identity. Learn to evaluate determinants using cofactors, construct the inverse, and identify parameter values for which reversal is impossible.

Minors and cofactors

Can the inverse method still work with three inputs and three outputs? Consider A=(120011201)\mathbf A=\begin{pmatrix}1&2&0\\0&1&1\\2&0&1\end{pmatrix}. There are nine entries, but each step can be reduced to a two-by-two determinant you already know.

Delete row 1 and column 2. The remaining array is (0121)\begin{pmatrix}0&1\\2&1\end{pmatrix}, with determinant −2-2. This is a minor. A cofactor also attaches a sign according to the deleted position.

Minor and cofactor

The minor MijM_{ij} of entry aija_{ij} is the determinant left after deleting row ii and column jj. The cofactor is Cij=(−1)i+jMijC_{ij}=(-1)^{i+j}M_{ij}. The sign pattern is

(+−+−+−+−+).\begin{pmatrix}+&-&+\\-&+&-\\+&-&+\end{pmatrix}.

Thus the cofactor in position (1,2)(1,2) of A\mathbf A is −(−2)=2-(-2)=2.

Keep the minor's own sign separate from the sign in the pattern. A negative-position cofactor need not have a negative value.

Cofactor expansion

Expand along any one row ii:

det⁡A=ai1Ci1+ai2Ci2+ai3Ci3.\det\mathbf A=a_{i1}C_{i1}+a_{i2}C_{i2}+a_{i3}C_{i3}.

Equally, expand along one column jj: det⁡A=a1jC1j+a2jC2j+a3jC3j\det\mathbf A=a_{1j}C_{1j}+a_{2j}C_{2j}+a_{3j}C_{3j}. Choose a row or column with zeros to reduce work. Not in the formula booklet: learn it.

For a first-row expansion, this is

a11∣a22a23a32a33∣−a12∣a21a23a31a33∣+a13∣a21a22a31a32∣.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}.

This generalises ad−bcad-bc; the vertical bars here denote determinants, each a scalar.

Worked example 1: expanding a determinant

Question. Find det⁡A\det\mathbf A for A=(120011201)\mathbf A=\begin{pmatrix}1&2&0\\0&1&1\\2&0&1\end{pmatrix}.

Plan. Expand along row 1, whose zero removes the third term.

det⁡A=1(1(1)−1(0))−2(0(1)−1(2))=1−2(−2)=5.\begin{aligned} \det\mathbf A &=1\bigl(1(1)-1(0)\bigr)-2\bigl(0(1)-1(2)\bigr)\\ &=1-2(-2)=5. \end{aligned}

The minus sign before the second minor comes from its position, not from its entries.

Answer. det⁡A=5\det\mathbf A=5, so A\mathbf A is non-singular.

Check. Expand along column 1 instead: C11=1C_{11}=1, C31=∣2011∣=2C_{31}=\begin{vmatrix}2&0\\1&1\end{vmatrix}=2. Hence 1(1)+0+2(2)=51(1)+0+2(2)=5, an independent expansion.

Change only the bottom-right entry from 11 to 22. Recalculate the affected minors; the cofactor sign pattern stays fixed.

Worked example 2: changing one entry

Question. Find the determinant of B=(120011202)\mathbf B=\begin{pmatrix}1&2&0\\0&1&1\\2&0&2\end{pmatrix}.

Plan. Use the same first-row expansion.

det⁡B=1(1(2)−1(0))−2(0(2)−1(2))=2+4=6.\det\mathbf B=1\bigl(1(2)-1(0)\bigr)-2\bigl(0(2)-1(2)\bigr)=2+4=6.

Answer. det⁡B=6\det\mathbf B=6, so B\mathbf B is non-singular.

Check. Expand along row 2. Its two nonzero entries give 1∣1022∣−1∣1220∣=2−(−4)=61\begin{vmatrix}1&0\\2&2\end{vmatrix}-1\begin{vmatrix}1&2\\2&0\end{vmatrix}=2-(-4)=6.

The two calculations demonstrate why a fresh expansion is a strong sign check. Expanding along a different row must give the same scalar.

Watch out

If you use signed cofactors CijC_{ij}, add the entry-cofactor products. Do not apply the alternating signs a second time: they are already included in CijC_{ij}.

Choose an efficient expansion for this matrix.

The inverse from cofactors

Cofactors supply all nine entries needed for an inverse, but they must be transposed before division by the determinant.

The transpose exchanges rows and columns: entry (i,j)(i,j) moves to (j,i)(j,i). For example, the first row (1,2,−2)(1,2,-2) becomes the first column. The diagonal entries stay in place.

[DIAGRAM: asset_name: Cofactors become an adjugate; asset_slug: cam9231-cofactor-transpose; caption: Transpose the cofactor matrix before dividing by the determinant; description: Exact cofactor matrix with rows 1 2 minus 2, minus 2 1 4, 2 minus 1 1, next to its transpose with rows 1 minus 2 2, 2 1 minus 1, minus 2 4 1. The first cofactor row is highlighted blue and the corresponding first adjugate column is highlighted blue. A labelled arrow says rows become columns, and a final line shows A times adj A equals 5I.]
Transpose the cofactor matrix before dividing by the determinant

Adjugate

The adjugate adj⁡A\operatorname{adj}\mathbf A is the transpose of the cofactor matrix:

adj⁡A=(C11C21C31C12C22C32C13C23C33).\operatorname{adj}\mathbf A=\begin{pmatrix}C_{11}&C_{21}&C_{31}\\C_{12}&C_{22}&C_{32}\\C_{13}&C_{23}&C_{33}\end{pmatrix}.

Why transpose? The first diagonal entry of Aadj⁡A\mathbf A\operatorname{adj}\mathbf A becomes a11C11+a12C12+a13C13=det⁡Aa_{11}C_{11}+a_{12}C_{12}+a_{13}C_{13}=\det\mathbf A. Each other diagonal entry is another expansion of the same determinant. An off-diagonal entry uses one row's entries with a different row's cofactors: this equals a determinant with two equal rows, which is zero because its expansion terms cancel in pairs. The transpose places the cofactors in precisely these positions. The reverse product works in the same way using columns.

Three-by-three inverse

For a non-singular square matrix,

Aadj⁡A=adj⁡A A=(det⁡A)I,A−1=1det⁡Aadj⁡A.\mathbf A\operatorname{adj}\mathbf A=\operatorname{adj}\mathbf A\,\mathbf A=(\det\mathbf A)\mathbf I, \qquad \mathbf A^{-1}=\frac1{\det\mathbf A}\operatorname{adj}\mathbf A.

Compute minors, apply signs, transpose, then divide by the nonzero determinant. Not in the formula booklet: learn it.

A common scalar outside the answer keeps this sequence visible. To make the arithmetic inspectable, show the cofactor matrix as well as the final inverse.

Worked example 3: constructing all nine entries

Question. Find the inverse of A=(120011201)\mathbf A=\begin{pmatrix}1&2&0\\0&1&1\\2&0&1\end{pmatrix}.

Plan. Use det⁡A=5\det\mathbf A=5, calculate its cofactors, then transpose and divide.

Delete the indicated row and column, then apply the position sign:

CofactorSigned minor calculation
C11C_{11}1(1)−1(0)=11(1)-1(0)=1
C12C_{12}−(0(1)−1(2))=2-\bigl(0(1)-1(2)\bigr)=2
C13C_{13}0(0)−1(2)=−20(0)-1(2)=-2
C21C_{21}−(2(1)−0(0))=−2-\bigl(2(1)-0(0)\bigr)=-2
C22C_{22}1(1)−0(2)=11(1)-0(2)=1
C23C_{23}−(1(0)−2(2))=4-\bigl(1(0)-2(2)\bigr)=4
C31C_{31}2(1)−0(1)=22(1)-0(1)=2
C32C_{32}−(1(1)−0(0))=−1-\bigl(1(1)-0(0)\bigr)=-1
C33C_{33}1(1)−2(0)=11(1)-2(0)=1

Therefore the cofactor matrix is (12−2−2142−11)\begin{pmatrix}1&2&-2\\-2&1&4\\2&-1&1\end{pmatrix}.
Transposing gives adj⁡A=(1−2221−1−241)\operatorname{adj}\mathbf A=\begin{pmatrix}1&-2&2\\2&1&-1\\-2&4&1\end{pmatrix}.

Answer. A−1=15(1−2221−1−241)\mathbf A^{-1}=\tfrac15\begin{pmatrix}1&-2&2\\2&1&-1\\-2&4&1\end{pmatrix}.

Check. Multiply the original by the integer numerator:

(120011201)(1−2221−1−241)=(500050005).\begin{pmatrix}1&2&0\\0&1&1\\2&0&1\end{pmatrix} \begin{pmatrix}1&-2&2\\2&1&-1\\-2&4&1\end{pmatrix} =\begin{pmatrix}5&0&0\\0&5&0\\0&0&5\end{pmatrix}.

The factor 15\tfrac15 therefore gives I\mathbf I, independently checking every cofactor's contribution.

Change only the bottom-right entry, as in the preceding part. Its determinant is now 66, and some cofactors change while others do not.

Worked example 4: updating the cofactor construction

Question. Find the inverse of B=(120011202)\mathbf B=\begin{pmatrix}1&2&0\\0&1&1\\2&0&2\end{pmatrix}.

Plan. Recalculate the cofactors using the changed entry, then transpose and divide by 66.

For example, C11=1(2)−1(0)=2C_{11}=1(2)-1(0)=2, C12=−(0(2)−1(2))=2C_{12}=-\bigl(0(2)-1(2)\bigr)=2 and C21=−(2(2)−0(0))=−4C_{21}=-\bigl(2(2)-0(0)\bigr)=-4. Completing the same deletions gives

C=(22−2−4242−11),CT=(2−4222−1−241).\mathbf C=\begin{pmatrix}2&2&-2\\-4&2&4\\2&-1&1\end{pmatrix},\qquad \mathbf C^{\mathsf T}=\begin{pmatrix}2&-4&2\\2&2&-1\\-2&4&1\end{pmatrix}.

Answer. B−1=16(2−4222−1−241)\mathbf B^{-1}=\tfrac16\begin{pmatrix}2&-4&2\\2&2&-1\\-2&4&1\end{pmatrix}.

Check. A product in the reverse order gives

(2−4222−1−241)(120011202)=(600060006).\begin{pmatrix}2&-4&2\\2&2&-1\\-2&4&1\end{pmatrix} \begin{pmatrix}1&2&0\\0&1&1\\2&0&2\end{pmatrix} =\begin{pmatrix}6&0&0\\0&6&0\\0&0&6\end{pmatrix}.

Dividing by 66 gives I\mathbf I.

A check using the original matrix tests signs, transposition and the scalar divisor together. If the product is not a scalar identity, fix the construction before changing the divisor.

Watch out

A−1=C/det⁡A\mathbf A^{-1}=\mathbf C/\det\mathbf A is generally wrong when C\mathbf C is the cofactor matrix. The required matrix is CT/det⁡A\mathbf C^{\mathsf T}/\det\mathbf A.

Construct another inverse from its cofactors.

Parameters and singularity

A parameter can make a three-by-three matrix cross between singular and non-singular cases, so determine the determinant before attempting an inverse.

For a parameter kk, a determinant is an expression in kk. Solve det⁡M=0\det\mathbf M=0 to identify excluded values. A formula containing a zero denominator is not an inverse at that value; it is a warning that the inverse does not exist.

Worked example 5: one excluded parameter value

Question. For M(k)=(1100k1101)\mathbf M(k)=\begin{pmatrix}1&1&0\\0&k&1\\1&0&1\end{pmatrix}, find the singular value of kk. Find and verify the inverse when k=1k=1.

Plan. Expand the determinant in terms of kk, then use cofactors only at the requested non-singular value.

det⁡M=k−(−1)=k+1.\det\mathbf M=k-(-1)=k+1.

Thus it is singular when k=−1k=-1. At k=1k=1, the determinant is 22. The cofactor matrix is
(11−1−1111−11)\begin{pmatrix}1&1&-1\\-1&1&1\\1&-1&1\end{pmatrix}.

Answer. The only singular value is k=−1k=-1, and

M(1)−1=12(1−1111−1−111).\mathbf M(1)^{-1}=\frac12\begin{pmatrix}1&-1&1\\1&1&-1\\-1&1&1\end{pmatrix}.

Check. The product of M(1)\mathbf M(1) and the integer numerator is (200020002)\begin{pmatrix}2&0&0\\0&2&0\\0&0&2\end{pmatrix}. At the excluded value, M(−1)(1−1−1)=0\mathbf M(-1)\begin{pmatrix}1\\-1\\-1\end{pmatrix}=\mathbf0, confirming that a nonzero input is lost.

Change only the bottom-left entry from 11 to 22. Track how that one change affects both the singular boundary and the inverse divisor.

Worked example 6: moving the singular boundary

Question. For N(k)=(1100k1201)\mathbf N(k)=\begin{pmatrix}1&1&0\\0&k&1\\2&0&1\end{pmatrix}, find the singular value of kk. Find and verify the inverse when k=1k=1.

Plan. Repeat the determinant and cofactor steps with the changed entry.

det⁡N=k−(−2)=k+2.\det\mathbf N=k-(-2)=k+2.

It is singular when k=−2k=-2. At k=1k=1, the determinant is 33, and the cofactor matrix is (12−2−1121−11)\begin{pmatrix}1&2&-2\\-1&1&2\\1&-1&1\end{pmatrix}.

Answer. The only singular value is k=−2k=-2, and

N(1)−1=13(1−1121−1−221).\mathbf N(1)^{-1}=\frac13\begin{pmatrix}1&-1&1\\2&1&-1\\-2&2&1\end{pmatrix}.

Check. The original times the integer numerator is (300030003)\begin{pmatrix}3&0&0\\0&3&0\\0&0&3\end{pmatrix}. At k=−2k=-2, N(−2)(1−1−2)=0\mathbf N(-2)\begin{pmatrix}1\\-1\\-2\end{pmatrix}=\mathbf0, independently confirming singularity.

The original matrix in the opening question has determinant 55, so its three inputs can be recovered by the inverse we constructed. The size of the matrix increased, but the essential condition stayed the same: a nonzero determinant.

Problem-solving

For a parameter matrix, write the non-singular condition alongside any inverse. At a singular value, report that no inverse exists instead of substituting into a formula with a zero divisor.

Find another singular boundary.

Quick Recap

  • A minor is a two-by-two determinant; a cofactor includes the alternating position sign.
  • Expand along one row or column, preferably one containing zeros.
  • Transpose the cofactor matrix to form the adjugate, then divide by the nonzero determinant.
  • Find parameter exclusions before using an inverse and verify the result by a product.

Three input quantities can be recovered whenever the determinant is nonzero, just as in the two-by-two case.