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

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

An inverse matrix reverses a matrix calculation, but some matrices cannot be reversed. Use the determinant to distinguish these cases, derive the two-by-two inverse formula, and solve matrix equations by multiplying on the correct side.

The determinant

Can the two totals u=2x+yu=2x+y and v=3x+2yv=3x+2y recover the original x,yx,y? Compare them with u=2x+yu=2x+y and v=4x+2yv=4x+2y: in the second pair, v=2uv=2u, so the second total contains no new information.

For example, both (x,y)=(0,0)(x,y)=(0,0) and (1,−2)(1,-2) give (u,v)=(0,0)(u,v)=(0,0) in that second pair. A single reverse rule cannot recover two different inputs from the same output.

Two-by-two determinant

For M=(abcd)\mathbf M=\begin{pmatrix}a&b\\c&d\end{pmatrix},

det⁡M=ad−bc.\det\mathbf M=ad-bc.

The determinant is a number, not a matrix. Not in the formula booklet: learn it.

The two products use opposite diagonals, with the main-diagonal product first. We will see in the next part why their difference decides whether an inverse exists.

Singular and non-singular

A square matrix is singular if it has no inverse, and non-singular if it has an inverse. For two-by-two and three-by-three matrices, it is singular exactly when its determinant is zero.

A nonzero matrix can be singular. Conversely, a negative determinant does not prevent an inverse; only zero does.

Worked example 1: deciding whether reversal is possible

Question. Determine whether M=(2132)\mathbf M=\begin{pmatrix}2&1\\3&2\end{pmatrix} is singular.

Plan. Calculate the determinant and compare it with zero.

det⁡M=2(2)−1(3)=1.\det\mathbf M=2(2)-1(3)=1.

Because 1≠01\ne0, M\mathbf M is non-singular.

Answer. It has an inverse.

Check. Eliminating yy from 2x+y=u2x+y=u, 3x+2y=v3x+2y=v gives x=2u−vx=2u-v, then y=−3u+2vy=-3u+2v. Every output has one recovered input.

Change only the bottom-right entry from 22 to 32\tfrac32. This makes the second row a multiple of the first.

Worked example 2: the singular boundary

Question. Determine whether N=(21332)\mathbf N=\begin{pmatrix}2&1\\3&\tfrac32\end{pmatrix} is singular.

Plan. Evaluate the same two diagonal products.

det⁡N=2(32)−1(3)=0.\det\mathbf N=2\left(\frac32\right)-1(3)=0.

Answer. N\mathbf N is singular and has no inverse.

Check. N(1−2)=(00)\mathbf N\begin{pmatrix}1\\-2\end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix}, as does the zero input. Two distinct inputs share an output, confirming that reversal is impossible.

When an entry depends on a parameter, the same test gives an equation for the singular values.

Watch out

Do not use ad+bcad+bc, and do not decide from the signs of the entries. Compute ad−bcad-bc and test whether that number is zero.

Find the boundary in another matrix.

The inverse matrix

The inverse is a matrix that multiplies the original matrix to give the identity on either side.

To discover it, multiply a general matrix by one with its diagonal entries exchanged and its other entries negated:

(abcd)(d−b−ca)=(ad−bc00ad−bc).\begin{pmatrix}a&b\\c&d\end{pmatrix} \begin{pmatrix}d&-b\\-c&a\end{pmatrix} =\begin{pmatrix}ad-bc&0\\0&ad-bc\end{pmatrix}.

The off-diagonal terms cancel: −ab+ba=0-ab+ba=0 and cd−dc=0cd-dc=0, where these are ordinary numbers. The reverse product gives the same result. Dividing every entry by the nonzero determinant turns this into I\mathbf I.

Two-by-two inverse

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

M−1=1ad−bc(d−b−ca),MM−1=M−1M=I.\mathbf M^{-1}=\frac1{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}, \qquad \mathbf M\mathbf M^{-1}=\mathbf M^{-1}\mathbf M=\mathbf I.

If the determinant is zero, this division is impossible and the matrix is singular. Not in the formula booklet: learn it.

The superscript −1-1 denotes the inverse of the whole matrix; it does not ask for reciprocals of individual entries.

Worked example 3: an inverse with integer entries

Question. Find the inverse of M=(2132)\mathbf M=\begin{pmatrix}2&1\\3&2\end{pmatrix}.

Plan. Find the determinant, exchange the diagonal entries and negate the other two.

det⁡M=4−3=1,M−1=11(2−1−32).\det\mathbf M=4-3=1,\qquad \mathbf M^{-1}=\frac11\begin{pmatrix}2&-1\\-3&2\end{pmatrix}.

Answer. M−1=(2−1−32)\mathbf M^{-1}=\begin{pmatrix}2&-1\\-3&2\end{pmatrix}.

Check. Multiplication gives

MM−1=(4−3−2+26−6−3+4)=I.\mathbf M\mathbf M^{-1}=\begin{pmatrix}4-3&-2+2\\6-6&-3+4\end{pmatrix}=\mathbf I.

The reverse product gives (4−32−2−6+6−3+4)=I\begin{pmatrix}4-3&2-2\\-6+6&-3+4\end{pmatrix}=\mathbf I too.

Change only the bottom-right entry to 11. The determinant changes sign; carry that sign through the whole inverse.

Worked example 4: a negative determinant

Question. Find the inverse of N=(2131)\mathbf N=\begin{pmatrix}2&1\\3&1\end{pmatrix}.

Plan. Use the signed determinant as the divisor of the entire adjusted matrix.

det⁡N=2−3=−1,N−1=−(1−1−32)=(−113−2).\det\mathbf N=2-3=-1,\qquad \mathbf N^{-1}=-\begin{pmatrix}1&-1\\-3&2\end{pmatrix} =\begin{pmatrix}-1&1\\3&-2\end{pmatrix}.

Answer. N−1=(−113−2)\mathbf N^{-1}=\begin{pmatrix}-1&1\\3&-2\end{pmatrix}.

Check. Solving 2x+y=u2x+y=u, 3x+y=v3x+y=v by subtraction gives x=v−ux=v-u and y=3u−2vy=3u-2v, exactly the two rows of the proposed inverse. Direct multiplication also gives I\mathbf I.

For a determinant other than 11 or −1-1, leave a common fraction outside if that keeps the entries clear. It still multiplies every entry.

Watch out

The adjusted matrix alone is usually not the inverse. Its product with the original is (det⁡M)I(\det\mathbf M)\mathbf I; the determinant divisor is essential.

Use a determinant whose magnitude is greater than one.

Solving matrix equations

An inverse lets you remove a non-singular factor, provided that it is placed next to the factor it must cancel.

For AX=C\mathbf{AX}=\mathbf C, multiply on the left: A−1AX=A−1C\mathbf A^{-1}\mathbf{AX}=\mathbf A^{-1}\mathbf C, so X=A−1C\mathbf X=\mathbf A^{-1}\mathbf C. For XA=C\mathbf{XA}=\mathbf C, multiply on the right, giving X=CA−1\mathbf X=\mathbf C\mathbf A^{-1}. Reversing these answers generally changes them.

You already know

Matrix multiplication is associative but usually not commutative. You may regroup A−1(AX)\mathbf A^{-1}(\mathbf{AX}) as (A−1A)X(\mathbf A^{-1}\mathbf A)\mathbf X, but you may not move A−1\mathbf A^{-1} through X\mathbf X.

This is why we say “multiply by the inverse on the left” rather than “divide by the matrix”.

Worked example 5: an unknown on the right

Question. Solve AX=C\mathbf{AX}=\mathbf C, where A=(2132)\mathbf A=\begin{pmatrix}2&1\\3&2\end{pmatrix} and C=(12−13)\mathbf C=\begin{pmatrix}1&2\\-1&3\end{pmatrix}.

Plan. Use the known inverse of A\mathbf A on the left of both sides.

X=A−1C=(2−1−32)(12−13)=(31−50).\begin{aligned} \mathbf X&=\mathbf A^{-1}\mathbf C\\ &=\begin{pmatrix}2&-1\\-3&2\end{pmatrix}\begin{pmatrix}1&2\\-1&3\end{pmatrix}\\ &=\begin{pmatrix}3&1\\-5&0\end{pmatrix}. \end{aligned}

Answer. X=(31−50)\mathbf X=\begin{pmatrix}3&1\\-5&0\end{pmatrix}.

Check. Substitute into the original order:
AX=(6−529−103)=(12−13)=C\mathbf{AX}=\begin{pmatrix}6-5&2\\9-10&3\end{pmatrix}=\begin{pmatrix}1&2\\-1&3\end{pmatrix}=\mathbf C.

Change only the position of the unknown in the equation. The given matrices stay the same, but the inverse must move to the other side.

Worked example 6: an unknown on the left

Question. For the same A\mathbf A and C\mathbf C, solve XA=C\mathbf{XA}=\mathbf C.

Plan. Multiply both sides on the right by A−1\mathbf A^{-1}.

X=CA−1=(12−13)(2−1−32)=(−43−117).\begin{aligned} \mathbf X&=\mathbf C\mathbf A^{-1}\\ &=\begin{pmatrix}1&2\\-1&3\end{pmatrix}\begin{pmatrix}2&-1\\-3&2\end{pmatrix}\\ &=\begin{pmatrix}-4&3\\-11&7\end{pmatrix}. \end{aligned}

Answer. X=(−43−117)\mathbf X=\begin{pmatrix}-4&3\\-11&7\end{pmatrix}.

Check. XA=(−8+9−4+6−22+21−11+14)=C\mathbf{XA}=\begin{pmatrix}-8+9&-4+6\\-22+21&-11+14\end{pmatrix}=\mathbf C. This checks the equation actually asked, not the different equation in the preceding example.

The opening totals came from the non-singular matrix (2132)\begin{pmatrix}2&1\\3&2\end{pmatrix}, so they can indeed recover the input by its inverse. For a singular matrix the inverse method is unavailable; it does not follow that every associated equation has no solution. For example, OX=O\mathbf O\mathbf X=\mathbf O has many solutions.

Problem-solving

Keep the unknown's position visible while rearranging. Check the final matrix by substitution into the original equation in its original order.

Use a fresh equation with a non-singular left factor.

Quick Recap

  • Calculate det⁡M=ad−bc\det\mathbf M=ad-bc for a two-by-two matrix.
  • A zero determinant means singular; a nonzero determinant permits an inverse.
  • Exchange the diagonal entries, negate the other entries, then divide the whole matrix by its determinant.
  • Remove a factor by multiplying by its inverse on the correct side.

The opening pair of independent totals can be reversed; a pair containing the same information twice cannot.