C6 - Inverse matrices

C6 - Inverse matrices

An inverse matrix reverses a matrix calculation, recovering the original input from its output. You will decide when an inverse exists, use its algebraic properties and calculate inverses of order 2 and 3. Checking both multiplication orders will distinguish a true inverse from an array that merely looks plausible.

Singular and non-singular matrices

Can every matrix calculation be undone? The rule (1224)\begin{pmatrix}1&2\\2&4\end{pmatrix} sends both (20)\begin{pmatrix}2\\0\end{pmatrix} and (01)\begin{pmatrix}0\\1\end{pmatrix} to (24)\begin{pmatrix}2\\4\end{pmatrix}. No reversing rule can know which input to recover. The lost information prevents an inverse.

Inverse matrix

For a square matrix A\mathbf{A}, its inverse is a matrix A−1\mathbf{A}^{-1} satisfying

AA−1=A−1A=I\mathbf{A}\mathbf{A}^{-1}=\mathbf{A}^{-1}\mathbf{A}=\mathbf{I}

A square matrix is non-singular when its determinant is non-zero; it has an inverse. It is singular when its determinant is zero; it has no inverse.

The inverse is not found by replacing each entry with its reciprocal. For example,

(2003)−1=(120013)\begin{pmatrix}2&0\\0&3\end{pmatrix}^{-1} =\begin{pmatrix}\tfrac12&0\\0&\tfrac13\end{pmatrix}

The zero entries stay zero: multiplying these two matrices in either order gives I2\mathbf{I}_2. A matrix need not have every entry non-zero to be invertible. Conversely, (1224)\begin{pmatrix}1&2\\2&4\end{pmatrix} has no zero entries but is singular because its determinant is zero.

For a parameter, state restrictions at the point where an inverse is used. The matrix (t002)\begin{pmatrix}t&0\\0&2\end{pmatrix} has determinant 2t2t, so it is non-singular exactly when t≠0t\ne0. Its inverse is then (1/t001/2)\begin{pmatrix}1/t&0\\0&1/2\end{pmatrix}. At t=0t=0, this formula is undefined and the map loses the input's first coordinate.

An inverse, if it exists, is unique. If C\mathbf{C} and D\mathbf{D} both invert A\mathbf{A}, then

C=CI=C(AD)=(CA)D=ID=D\mathbf{C}=\mathbf{C}\mathbf{I} =\mathbf{C}(\mathbf{A}\mathbf{D}) =(\mathbf{C}\mathbf{A})\mathbf{D} =\mathbf{I}\mathbf{D}=\mathbf{D}

Associativity moves the brackets without changing factor order. There cannot be two different reversing matrices for the same square matrix.

Watch out

A zero determinant does not mean “the inverse is zero”. It means the inverse does not exist. Multiplication by the zero matrix could not produce an identity matrix.

Identify the exceptional parameter value.

Properties of inverses

If B\mathbf{B} acts on an input first and A\mathbf{A} acts next, the combined output is A(Bx)=(AB)x\mathbf{A}(\mathbf{B}\mathbf{x})=(\mathbf{A}\mathbf{B})\mathbf{x}. To reverse the process, undo A\mathbf{A} first and then B\mathbf{B}. This reverses the order of the factors in the inverse.

Inverse of a product

For non-singular square matrices A,B\mathbf{A},\mathbf{B} of the same order,

(AB)−1=B−1A−1(\mathbf{A}\mathbf{B})^{-1}=\mathbf{B}^{-1}\mathbf{A}^{-1}

Both factors must be invertible. This rule is required knowledge; it is not in the formula booklet.

Verify both orders, keeping the factors fixed:

(AB)(B−1A−1)=A(BB−1)A−1=I(B−1A−1)(AB)=B−1(A−1A)B=I\begin{aligned} (\mathbf{A}\mathbf{B})(\mathbf{B}^{-1}\mathbf{A}^{-1}) &=\mathbf{A}(\mathbf{B}\mathbf{B}^{-1})\mathbf{A}^{-1}=\mathbf{I}\\ (\mathbf{B}^{-1}\mathbf{A}^{-1})(\mathbf{A}\mathbf{B}) &=\mathbf{B}^{-1}(\mathbf{A}^{-1}\mathbf{A})\mathbf{B}=\mathbf{I} \end{aligned}

The adjacent inverse pairs cancel. Writing A−1B−1\mathbf{A}^{-1}\mathbf{B}^{-1} would generally leave non-adjacent factors that cannot be cancelled.

Worked example 1: reversing a product

Question. The matrices and their inverses are

A=(1101),A−1=(1−101),B=(2001),B−1=(12001)\mathbf{A}=\begin{pmatrix}1&1\\0&1\end{pmatrix},\quad \mathbf{A}^{-1}=\begin{pmatrix}1&-1\\0&1\end{pmatrix},\quad \mathbf{B}=\begin{pmatrix}2&0\\0&1\end{pmatrix},\quad \mathbf{B}^{-1}=\begin{pmatrix}\tfrac12&0\\0&1\end{pmatrix}

Find (AB)−1(\mathbf{A}\mathbf{B})^{-1}.

Plan. Multiply the given inverses in reverse order.

(AB)−1=B−1A−1=(12001)(1−101)=(12−1201)(\mathbf{A}\mathbf{B})^{-1} =\mathbf{B}^{-1}\mathbf{A}^{-1} =\begin{pmatrix}\tfrac12&0\\0&1\end{pmatrix} \begin{pmatrix}1&-1\\0&1\end{pmatrix} =\begin{pmatrix}\tfrac12&-\tfrac12\\0&1\end{pmatrix}

Answer. (12−1201)\begin{pmatrix}\tfrac12&-\tfrac12\\0&1\end{pmatrix}.

Check. Directly, AB=(2101)\mathbf{A}\mathbf{B}=\begin{pmatrix}2&1\\0&1\end{pmatrix}. Multiplying this by the answer in either order gives (1001)\begin{pmatrix}1&0\\0&1\end{pmatrix}: the top-right sums are −1+1-1+1 and 12−12\tfrac12-\tfrac12.

Keep both matrices unchanged and reverse only the product being inverted. This tests whether the order rule is being used rather than memorised as a fixed arrangement.

Worked example 2: reversing the original factor order

Question. For the same matrices, find (BA)−1(\mathbf{B}\mathbf{A})^{-1}.

Plan. Reverse the new factor order, giving A−1B−1\mathbf{A}^{-1}\mathbf{B}^{-1}.

(BA)−1=(1−101)(12001)=(12−101)(\mathbf{B}\mathbf{A})^{-1} =\begin{pmatrix}1&-1\\0&1\end{pmatrix} \begin{pmatrix}\tfrac12&0\\0&1\end{pmatrix} =\begin{pmatrix}\tfrac12&-1\\0&1\end{pmatrix}

Answer. (12−101)\begin{pmatrix}\tfrac12&-1\\0&1\end{pmatrix}, different from Worked example 1.

Check. Here BA=(2201)\mathbf{B}\mathbf{A}=\begin{pmatrix}2&2\\0&1\end{pmatrix}. The product with the proposed inverse in either order is I2\mathbf{I}_2; the top-right sums are −2+2-2+2 and 1−11-1.

Several related properties follow from the definition. For non-singular A\mathbf{A},

(A−1)−1=A,(An)−1=(A−1)n(n a positive integer),(kA)−1=1kA−1(k≠0)(\mathbf{A}^{-1})^{-1}=\mathbf{A},\qquad (\mathbf{A}^n)^{-1}=(\mathbf{A}^{-1})^n\quad(n\text{ a positive integer}),\qquad (k\mathbf{A})^{-1}=\frac1k\mathbf{A}^{-1}\quad(k\ne0)

In each case, multiplying by the original object gives I\mathbf{I}. Define A−n=(A−1)n\mathbf{A}^{-n}=(\mathbf{A}^{-1})^n only when A\mathbf{A} is invertible. Also, det⁡(AB)=det⁡Adet⁡B\det(\mathbf{A}\mathbf{B})=\det\mathbf{A}\det\mathbf{B}, so taking determinants of AA−1=I\mathbf{A}\mathbf{A}^{-1}=\mathbf{I} gives det⁡(A−1)=1/det⁡A\det(\mathbf{A}^{-1})=1/\det\mathbf{A}.

There is no general inverse-of-a-sum rule: inverses reverse multiplication, not addition. For example, (I+I)−1=12I(\mathbf{I}+\mathbf{I})^{-1}=\tfrac12\mathbf{I}, whereas I−1+I−1=2I\mathbf{I}^{-1}+\mathbf{I}^{-1}=2\mathbf{I}.

Calculating and verifying inverses

For order 2, an explicit formula produces a matrix that you can check by multiplication. Start by finding the determinant: it tells you whether the calculation is allowed.

Inverse of order 2

If A=(abcd)\mathbf{A}=\begin{pmatrix}a&b\\c&d\end{pmatrix} and ad−bc≠0ad-bc\ne0, then

A−1=1ad−bc(d−b−ca)\mathbf{A}^{-1}=\frac1{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}

Swap the diagonal entries, negate the off-diagonal entries and divide the whole matrix by its determinant. Not in the formula booklet.

Why this arrangement? Multiplying A\mathbf{A} by the numerator matrix in either order gives (ad−bc00ad−bc)\begin{pmatrix}ad-bc&0\\0&ad-bc\end{pmatrix}. Dividing by the non-zero determinant therefore gives the identity.

Worked example 3: an integer inverse

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

Plan. Check the determinant, then apply the order-2 formula.

det⁡A=2(1)−1(1)=1,A−1=11(1−1−12)\det\mathbf{A}=2(1)-1(1)=1,\qquad \mathbf{A}^{-1}=\frac11\begin{pmatrix}1&-1\\-1&2\end{pmatrix}

Answer. (1−1−12)\begin{pmatrix}1&-1\\-1&2\end{pmatrix}.

Check. Both products are identities:

(2111)(1−1−12)=(1001),(1−1−12)(2111)=(1001)\begin{pmatrix}2&1\\1&1\end{pmatrix}\begin{pmatrix}1&-1\\-1&2\end{pmatrix} =\begin{pmatrix}1&0\\0&1\end{pmatrix},\qquad \begin{pmatrix}1&-1\\-1&2\end{pmatrix}\begin{pmatrix}2&1\\1&1\end{pmatrix} =\begin{pmatrix}1&0\\0&1\end{pmatrix}

Change only the bottom-right entry from 1 to 2. The determinant is no longer 1, so the outside scalar now matters.

Worked example 4: a fractional inverse

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

Plan. Find the new determinant and apply its reciprocal to every entry.

det⁡B=4−1=3,B−1=13(2−1−12)\det\mathbf{B}=4-1=3,\qquad \mathbf{B}^{-1}=\frac13\begin{pmatrix}2&-1\\-1&2\end{pmatrix}

Answer. 13(2−1−12)\frac13\begin{pmatrix}2&-1\\-1&2\end{pmatrix}.

Check. In either multiplication order, the product before dividing by 3 is (3003)\begin{pmatrix}3&0\\0&3\end{pmatrix}. Thus BB−1=B−1B=I2\mathbf{B}\mathbf{B}^{-1}=\mathbf{B}^{-1}\mathbf{B}=\mathbf{I}_2. Omitting the scalar would produce 3I23\mathbf{I}_2, not an inverse.

For order 3, use signed minors from the determinants lesson. Form the cofactor matrix C\mathbf{C}. Then transpose it: rows become columns, so the entry in position (i,j)(i,j) moves to (j,i)(j,i). Write the transpose as CT\mathbf{C}^{\mathsf T}. For example,

(123456)T=(142536)\begin{pmatrix}1&2&3\\4&5&6\end{pmatrix}^{\mathsf T} =\begin{pmatrix}1&4\\2&5\\3&6\end{pmatrix}

The transpose of the cofactor matrix is called the adjugate. It is not the same operation as taking an inverse.

Cofactor inverse

For a non-singular square matrix M\mathbf{M},

M−1=1det⁡MCT\mathbf{M}^{-1}=\frac1{\det\mathbf{M}}\mathbf{C}^{\mathsf T}

where CijC_{ij} is the signed minor of entry MijM_{ij}. The same formula works for orders 2 and 3. Not in the formula booklet.

The transpose is essential. In MCT\mathbf{M}\mathbf{C}^{\mathsf T}, each diagonal entry is a cofactor expansion of det⁡M\det\mathbf{M}. An off-diagonal entry is the expansion of a determinant with two identical rows, so it is zero. Therefore MCT=(det⁡M)I\mathbf{M}\mathbf{C}^{\mathsf T}=(\det\mathbf{M})\mathbf{I}; the reverse product has the same property using columns.

Worked example 5: an inverse of order 3

Question. Find the inverse of T=(110011001)\mathbf{T}=\begin{pmatrix}1&1&0\\0&1&1\\0&0&1\end{pmatrix}.

Plan. Find the determinant, calculate all nine signed minors, transpose and divide.

det⁡T=1,C=(100−1101−11)\det\mathbf{T}=1,\qquad \mathbf{C}=\begin{pmatrix}1&0&0\\-1&1&0\\1&-1&1\end{pmatrix}

For example, C21=−∣1001∣=−1C_{21}=-\begin{vmatrix}1&0\\0&1\end{vmatrix}=-1, while C31=+∣1011∣=1C_{31}=+\begin{vmatrix}1&0\\1&1\end{vmatrix}=1. The other entries follow the same sign pattern.

T−1=CT=(1−1101−1001)\mathbf{T}^{-1}=\mathbf{C}^{\mathsf T} =\begin{pmatrix}1&-1&1\\0&1&-1\\0&0&1\end{pmatrix}

Answer. (1−1101−1001)\begin{pmatrix}1&-1&1\\0&1&-1\\0&0&1\end{pmatrix}.

Check. Let this answer be G\mathbf{G}. Direct row-column multiplication gives

TG=(1−1+11−101−1+1001)=I3,GT=(11−1−1+1011−1001)=I3\mathbf{T}\mathbf{G} =\begin{pmatrix}1&-1+1&1-1\\0&1&-1+1\\0&0&1\end{pmatrix} =\mathbf{I}_3,\qquad \mathbf{G}\mathbf{T} =\begin{pmatrix}1&1-1&-1+1\\0&1&1-1\\0&0&1\end{pmatrix} =\mathbf{I}_3

Change only the bottom-right entry to 2. Both the determinant and several cofactors change, so reuse the method rather than the previous answer.

Worked example 6: retaining the determinant factor

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

Plan. Calculate the new signed minors, transpose their matrix and divide by the new determinant.

det⁡U=2,C=(200−2201−11)\det\mathbf{U}=2,\qquad \mathbf{C}=\begin{pmatrix}2&0&0\\-2&2&0\\1&-1&1\end{pmatrix}

For example, C21=−∣1002∣=−2C_{21}=-\begin{vmatrix}1&0\\0&2\end{vmatrix}=-2, while C31=1C_{31}=1 is unchanged.

U−1=12(2−2102−1001)=(1−11201−120012)\mathbf{U}^{-1}=\frac12\begin{pmatrix}2&-2&1\\0&2&-1\\0&0&1\end{pmatrix} =\begin{pmatrix}1&-1&\tfrac12\\0&1&-\tfrac12\\0&0&\tfrac12\end{pmatrix}

Answer. 12(2−2102−1001)\frac12\begin{pmatrix}2&-2&1\\0&2&-1\\0&0&1\end{pmatrix}.

Check. With H\mathbf{H} equal to the numerator matrix,

UH=(200020002),HU=(200020002)\mathbf{U}\mathbf{H}=\begin{pmatrix}2&0&0\\0&2&0\\0&0&2\end{pmatrix},\qquad \mathbf{H}\mathbf{U}=\begin{pmatrix}2&0&0\\0&2&0\\0&0&2\end{pmatrix}

Multiplying each by 12\tfrac12 verifies both inverse products. As another check, its determinant is 12=1/det⁡U\tfrac12=1/\det\mathbf{U}.

The opening question now has a precise answer: a square matrix calculation can be undone exactly when its determinant is non-zero. A calculator can help with arithmetic, but the determinant condition, cofactor signs and transpose explain the result.

Watch out

For a cofactor inverse: calculate signed minors, transpose, then divide the whole matrix by its determinant. Forgetting the transpose or scaling only one entry will usually fail the identity check.

Use the same method on a new matrix.

Quick Recap

  • A square matrix has an inverse exactly when its determinant is non-zero.
  • An inverse multiplies to the identity in both orders; it is not entrywise reciprocation.
  • Reverse factor order when inverting a product.
  • For order 2 use the diagonal/off-diagonal rule; for order 3 transpose the signed-minor matrix and divide by the determinant.

A singular map has already lost information, so no inverse can recover every original input.