All lessons

The inverse of a matrix

Day
7 of 40
Length
2:31
Textbook
Lay §2.2
Syllabus
UM51A Lesson 10

A⁻¹ is the transformation that undoes A, and it exists exactly when A doesn't squash space flat.

On Day 5 a matrix became a motion of the whole plane, and on Day 6 two motions chained into a product. Today asks whether a motion can be run backwards. The answer matters for solving equations, because Ax=bA\mathbf x = \mathbf b asks which point AA moves onto b\mathbf b, and a matrix that runs AA backwards would carry b\mathbf b straight to that point.

Each section below opens with a problem. Try it before you open the walkthrough, even if you only get partway. Every problem uses only Day 6's product and ordinary equation solving.

Undoing a matrix

The matrix A=[2111]A = \begin{bmatrix} \green{2} & \red{1} \\ \green{1} & \red{1} \end{bmatrix} moved some point x\yellow{\mathbf x} onto (3,2)\teal{(3, 2)}. Which point was it?

Walk through the solution

We want the point that AA sends to (3,2)(3, 2), so we call it (p,q)(p, q) and write out A(p,q)A(p, q) with Day 4's column picture:

p[21]+q[11]=[2p+qp+q]=[32]p\begin{bmatrix} 2 \\ 1 \end{bmatrix} + q\begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 2p + q \\ p + q \end{bmatrix} = \begin{bmatrix} 3 \\ 2 \end{bmatrix}

That gives 2p+q=32p + q = 3 and p+q=2p + q = 2. Subtracting the second equation from the first removes qq and leaves p=1p = 1. Then q=2−1=1q = 2 - 1 = 1.

So x=(1,1)\yellow{\mathbf x} = (1, 1). Solving worked, but we would have to solve again for every new target. It would be better to have one matrix that runs AA backwards on any point.

Someone claims that C=[1−1−12]\pink{C} = \begin{bmatrix} 1 & -1 \\ -1 & 2 \end{bmatrix} runs AA backwards. Test the claim by computing CACA and ACAC. Enter CACA row by row.

Walk through the solution

If CC undoes AA, then doing AA and then CC should change nothing. By Day 6, "do AA, then CC" is the product CACA. We compute it with the row–column rule:

CA=[1−1−12][2111]=[2−11−1−2+2−1+2]=[1001]CA = \begin{bmatrix} 1 & -1 \\ -1 & 2 \end{bmatrix}\begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 2 - 1 & 1 - 1 \\ -2 + 2 & -1 + 2 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}

That is the identity II, the matrix that leaves every point where it is. The other order checks that doing CC first and then AA also changes nothing:

AC=[2111][1−1−12]=[2−1−2+21−1−1+2]=[1001]AC = \begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix}\begin{bmatrix} 1 & -1 \\ -1 & 2 \end{bmatrix} = \begin{bmatrix} 2 - 1 & -2 + 2 \\ 1 - 1 & -1 + 2 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}

Both products are II, so the claim holds. As a check, C(3,2)=(3−2,−3+4)=(1,1)C(3, 2) = (3 - 2, -3 + 4) = (1, 1), which is the point from Problem 1.

Left: the standard grid with the yellow arrow x = (1, 1). Right: the same grid after A, slanted into long parallelograms, with x carried to Ax = (3, 2) in teal. A white arrow labelled A points from left to right, and a pink arrow labelled A inverse points back.
Ax=[2111][11]=[32]A−1[32]=[1−1−12][32]=[11]\begin{aligned} A\yellow{\mathbf x} &= \begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix}\begin{bmatrix} 1 \\ 1 \end{bmatrix} = \teal{\begin{bmatrix} 3 \\ 2 \end{bmatrix}} \\ \pink{A^{-1}}\teal{\begin{bmatrix} 3 \\ 2 \end{bmatrix}} &= \begin{bmatrix} 1 & -1 \\ -1 & 2 \end{bmatrix}\begin{bmatrix} 3 \\ 2 \end{bmatrix} = \yellow{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} \end{aligned}

Invertible matrix

An n×nn \times n matrix AA is invertible if there is an n×nn \times n matrix CC with

CA=IandAC=I.CA = I \quad\text{and}\quad AC = I.

Then CC is the inverse of AA, written A−1A^{-1}. A matrix with no inverse is called singular, and an invertible matrix is also called nonsingular.

A matrix has at most one inverse. If BB were a second one, then B=B(AC)=(BA)C=IC=CB = B(AC) = (BA)C = IC = C, using Day 6's rule that grouping does not matter.

The columns of A−1A^{-1} have a direct meaning, and the next problem finds it.

Find the point that A=[2111]A = \begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix} sends onto ı^=(1,0)\green{\hat\imath} = (1, 0). Compare your answer with the first column of CC in Problem 2.

Walk through the solution

Call the point (p,q)(p, q). We need 2p+q=12p + q = 1 and p+q=0p + q = 0. Subtracting the second equation from the first gives p=1p = 1, and then q=−1q = -1.

The point is (1,−1)(1, -1), which is exactly the first column of CC. That is no accident. The first column of A−1A^{-1} is A−1ı^A^{-1}\hat\imath, and A−1A^{-1} carries ı^\hat\imath back to the point that AA sent onto ı^\hat\imath.

The columns of an inverse

Column 1 of A−1A^{-1} is the point that AA sends onto ı^\hat\imath, and column 2 is the point that AA sends onto ȷ^\hat\jmath. So finding A−1A^{-1} is the same as solving Ax=ı^A\mathbf x = \hat\imath and Ax=ȷ^A\mathbf x = \hat\jmath.

Build A−1A^{-1} yourself below. Each pink column has to land on its ringed basis arrow.

Drag the pink columns of CC until AA sends the first onto ı^\hat\imath and the second onto ȷ^\hat\jmath. Then AC=IAC = I.
c₁c₂
A=[2111]A = \begin{bmatrix} \textcolor{#7BC96F}{2} & \textcolor{#F2665E}{1} \\ \textcolor{#7BC96F}{1} & \textcolor{#F2665E}{1} \end{bmatrix}
C=[1001]C = \begin{bmatrix} \textcolor{#F28AB2}{1} & \textcolor{#F28AB2}{0} \\ \textcolor{#F28AB2}{0} & \textcolor{#F28AB2}{1} \end{bmatrix}
AC=[2111]AC = \begin{bmatrix} \textcolor{#7BC96F}{2} & \textcolor{#F2665E}{1} \\ \textcolor{#7BC96F}{1} & \textcolor{#F2665E}{1} \end{bmatrix}

The formula for a 2 × 2 inverse

Solving two systems every time is slow. For 2×22 \times 2 matrices a short formula does the work, and the next problem shows where it comes from.

Let A=[4322]A = \begin{bmatrix} 4 & 3 \\ 2 & 2 \end{bmatrix}. Swap the two diagonal entries and flip the signs of the other two, which gives [2−3−24]\begin{bmatrix} 2 & -3 \\ -2 & 4 \end{bmatrix}. Multiply AA by this new matrix. What do you get, and how can you turn it into A−1A^{-1}?

Walk through the solution

We multiply with the row–column rule, one entry at a time:

[4322][2−3−24]=[8−6−12+124−4−6+8]=[2002]\begin{bmatrix} 4 & 3 \\ 2 & 2 \end{bmatrix}\begin{bmatrix} 2 & -3 \\ -2 & 4 \end{bmatrix} = \begin{bmatrix} 8 - 6 & -12 + 12 \\ 4 - 4 & -6 + 8 \end{bmatrix} = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}

The result is 2I2I, which is almost the identity. Dividing the new matrix by 22 divides the product by 22 and gives exactly II:

A−1=12[2−3−24]=[1−3/2−12]A^{-1} = \frac12\begin{bmatrix} 2 & -3 \\ -2 & 4 \end{bmatrix} = \begin{bmatrix} 1 & -3/2 \\ -1 & 2 \end{bmatrix}

The 22 we divided by is 4⋅2−3⋅24 \cdot 2 - 3 \cdot 2. The same swap and sign flip works for any 2×22 \times 2 matrix, and the leftover number is always ad−bcad - bc.

Theorem 4

Let A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}. If ad−bc≠0ad - bc \neq 0, then AA is invertible and

A−1=1ad−bc[d−b−ca].A^{-1} = \frac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}.

If ad−bc=0ad - bc = 0, then AA is not invertible. The number ad−bcad - bc is the determinant of AA, written det⁡A\det A.

The general formula for the inverse of a 2 by 2 matrix. Below it, the formula applied to A = [2 1; 1 1]: the diagonal entries have swapped places, the off-diagonal entries have flipped sign, and the fraction 1 over 2·1 − 1·1 gives A inverse = [1 −1; −1 2] in pink.

The recipe works because multiplying out gives [abcd][d−b−ca]=(ad−bc) I\begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix} = (ad - bc)\,I, just as Problem 4 gave 2I2I. The determinant comes back on Day 25, which shows that it measures how much AA scales area. Larger matrices have no recipe this short, so Day 8 computes their inverses by row reduction.

Which matrix is the inverse of [3152]\begin{bmatrix} 3 & 1 \\ 5 & 2 \end{bmatrix}?

Solving with the inverse

Use A−1=[1−1−12]A^{-1} = \begin{bmatrix} 1 & -1 \\ -1 & 2 \end{bmatrix} from Problem 2 to solve the system 2x1+x2=42x_1 + x_2 = 4 and x1+x2=3x_1 + x_2 = 3.

Walk through the solution

The system is Ax=bA\mathbf x = \mathbf b with A=[2111]A = \begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix} and b=(4,3)\teal{\mathbf b} = (4, 3). We want x\mathbf x alone, so we multiply both sides on the left by A−1A^{-1}, which cancels the AA:

A−1Ax=A−1b⟹Ix=A−1bA^{-1}A\mathbf x = A^{-1}\mathbf b \quad\Longrightarrow\quad I\mathbf x = A^{-1}\mathbf b

Now compute the right side:

x=[1−1−12][43]=[4−3−4+6]=[12]\yellow{\mathbf x} = \begin{bmatrix} 1 & -1 \\ -1 & 2 \end{bmatrix}\begin{bmatrix} 4 \\ 3 \end{bmatrix} = \begin{bmatrix} 4 - 3 \\ -4 + 6 \end{bmatrix} = \yellow{\begin{bmatrix} 1 \\ 2 \end{bmatrix}}

Check: 2(1)+2=42(1) + 2 = 4 and 1+2=31 + 2 = 3.

Theorem 5

If AA is an invertible n×nn \times n matrix, then for each b\mathbf b in Rn\mathbb{R}^n the equation Ax=bA\mathbf x = \mathbf b has exactly one solution, x=A−1b\mathbf x = A^{-1}\mathbf b.

The vector A−1bA^{-1}\mathbf b works because A(A−1b)=Ib=bA(A^{-1}\mathbf b) = I\mathbf b = \mathbf b. It is the only solution, because any u\mathbf u with Au=bA\mathbf u = \mathbf b gives u=A−1Au=A−1b\mathbf u = A^{-1}A\mathbf u = A^{-1}\mathbf b after multiplying both sides by A−1A^{-1} on the left. For large systems, row reduction is faster than finding A−1A^{-1} first, and Day 9 explains why.

Find the solution by hand below. There is exactly one spot where x\mathbf x works.

Drag x\mathbf x until its image T(x)=AxT(\mathbf x) = A\mathbf x lands on the ringed point b=(4,3)\mathbf b = (4, 3). Count steps along the blue grid.
xT(x)
[2111][10]=[21]\begin{bmatrix} \textcolor{#7BC96F}{2} & \textcolor{#F2665E}{1} \\ \textcolor{#7BC96F}{1} & \textcolor{#F2665E}{1} \end{bmatrix}\textcolor{#FFD447}{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} = \textcolor{#3DD6B5}{\begin{bmatrix} 2 \\ 1 \end{bmatrix}}
=1[21]+0[11]= 1\textcolor{#7BC96F}{\begin{bmatrix} 2 \\ 1 \end{bmatrix}} + 0\textcolor{#F2665E}{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}

Matrix equations

The same move solves equations whose unknown is a whole matrix. The only new care is the side you multiply on, because Day 6 showed that A−1BA^{-1}B and BA−1BA^{-1} are usually different.

AA is invertible, and XX is an unknown matrix with XA=BXA = B. Solve for XX.

Walk through the solution

We want to remove the AA that sits on the right of XX. Multiplying on the left would put A−1A^{-1} in front of XX, where it cancels nothing. So we multiply both sides on the right by A−1A^{-1}:

XAA−1=BA−1⟹XI=BA−1⟹X=BA−1XAA^{-1} = BA^{-1} \quad\Longrightarrow\quad XI = BA^{-1} \quad\Longrightarrow\quad X = BA^{-1}

The inverse has to go on the same side as the AA it cancels, and it has to go on that side of both equations.

AA is invertible and AX=BAX = B. What is XX?

This also repairs Day 6's failed cancellation. If AA is invertible and AB=ACAB = AC, multiplying on the left by A−1A^{-1} gives B=CB = C. Cancelling failed on Day 6 only because the matrix there was singular.

The inverse of a product

Day 8 builds an inverse by undoing a chain of row operations, so it needs to know how to undo a product.

The shear S=[1101]S = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} followed by the quarter turn R=[0−110]R = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} is RS=[0−111]RS = \begin{bmatrix} 0 & -1 \\ 1 & 1 \end{bmatrix}. Find (RS)−1(RS)^{-1} with the formula, enter it row by row, and then decide whether it equals S−1R−1S^{-1}R^{-1} or R−1S−1R^{-1}S^{-1}.

Walk through the solution

The determinant of RSRS is 0⋅1−(−1)(1)=10 \cdot 1 - (-1)(1) = 1. Swapping the diagonal and flipping the other signs gives

(RS)−1=[11−10].(RS)^{-1} = \begin{bmatrix} 1 & 1 \\ -1 & 0 \end{bmatrix}.

Now the two candidates. The formula gives S−1=[1−101]S^{-1} = \begin{bmatrix} 1 & -1 \\ 0 & 1 \end{bmatrix} and R−1=[01−10]R^{-1} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}.

  1. 1

    S−1R−1=[1−101][01−10]=[0+11+00−10+0]=[11−10]S^{-1}R^{-1} = \begin{bmatrix} 1 & -1 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} = \begin{bmatrix} 0 + 1 & 1 + 0 \\ 0 - 1 & 0 + 0 \end{bmatrix} = \begin{bmatrix} 1 & 1 \\ -1 & 0 \end{bmatrix}. This matches.

  2. 2

So (RS)−1=S−1R−1(RS)^{-1} = S^{-1}R^{-1}. Read right to left, it undoes the turn first and the shear second. The turn was the last move made, so it has to be the first move undone, just as you take off your shoes before your socks.

Three small grids in a row: the standard grid, the grid after the shear S, and the grid after the shear and then the quarter turn R. White arrows labelled S and R point forward between them, and pink arrows labelled S inverse and R inverse point back.
This grid was sheared by SS and then turned by RR. Undo both moves so the yellow arrow returns to its ring.
 (RS)=[0−111]\,(RS) = \begin{bmatrix} \textcolor{#7BC96F}{0} & \textcolor{#F2665E}{-1} \\ \textcolor{#7BC96F}{1} & \textcolor{#F2665E}{1} \end{bmatrix}

That order leaves the grid skewed. The last move made has to be the first one undone.

Theorem 6

If AA and BB are invertible n×nn \times n matrices, then

(a) A−1A^{-1} is invertible and (A−1)−1=A(A^{-1})^{-1} = A,

(b) ABAB is invertible and (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1},

(c) ATA^T is invertible and (AT)−1=(A−1)T(A^T)^{-1} = (A^{-1})^T.

Each part is proved by checking the definition. For (b), the middle of the product collapses first:

(AB)(B−1A−1)=A(BB−1)A−1=AIA−1=AA−1=I,(AB)(B^{-1}A^{-1}) = A(BB^{-1})A^{-1} = AIA^{-1} = AA^{-1} = I,

and (B−1A−1)(AB)=I(B^{-1}A^{-1})(AB) = I collapses the same way. The guess A−1B−1A^{-1}B^{-1} fails because BB and A−1A^{-1} never sit next to each other, so nothing cancels. The same reasoning with three factors gives (ABC)−1=C−1B−1A−1(ABC)^{-1} = C^{-1}B^{-1}A^{-1}.

Singular matrices

The formula divides by ad−bcad - bc, so it breaks when ad−bc=0ad - bc = 0. The next problem shows what goes wrong in the picture.

Let M=[1224]M = \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}. Compute M[10]M\begin{bmatrix} 1 \\ 0 \end{bmatrix}, M[−11]M\begin{bmatrix} -1 \\ 1 \end{bmatrix} and M[3−1]M\begin{bmatrix} 3 \\ -1 \end{bmatrix}. Could any matrix undo MM?

Walk through the solution

Use the entries as weights on the columns (1,2)(1, 2) and (2,4)(2, 4):

M(1,0)=1(1,2)+0(2,4)=(1,2)M(−1,1)=−1(1,2)+1(2,4)=(1,2)M(3,−1)=3(1,2)−1(2,4)=(1,2)\begin{aligned} M(1, 0) &= 1(1, 2) + 0(2, 4) = (1, 2) \\ M(-1, 1) &= -1(1, 2) + 1(2, 4) = (1, 2) \\ M(3, -1) &= 3(1, 2) - 1(2, 4) = (1, 2) \end{aligned}

All three points land on (1,2)(1, 2). A matrix that undoes MM would have to send (1,2)(1, 2) back to all three of them at once, and a matrix sends each input to only one output. So no inverse exists. Its determinant confirms this: 1⋅4−2⋅2=01 \cdot 4 - 2 \cdot 2 = 0.

The three inputs differ by multiples of (−2,1)(-2, 1), and M(−2,1)=−2(1,2)+1(2,4)=0M(-2, 1) = -2(1, 2) + 1(2, 4) = \mathbf 0. Adding a vector that lands on 0\mathbf 0 never changes where a point lands.

Drag the three yellow points to three different places so that MM sends every one of them onto the ringed point [12]\begin{bmatrix} 1 \\ 2 \end{bmatrix}.
M=[1224]M = \begin{bmatrix} \textcolor{#7BC96F}{1} & \textcolor{#F2665E}{2} \\ \textcolor{#7BC96F}{2} & \textcolor{#F2665E}{4} \end{bmatrix}
Mx1=[00]M\mathbf x_1 = \textcolor{#3DD6B5}{\begin{bmatrix} 0 \\ 0 \end{bmatrix}}
Mx2=[36]M\mathbf x_2 = \textcolor{#3DD6B5}{\begin{bmatrix} 3 \\ 6 \end{bmatrix}}
Mx3=[−2−4]M\mathbf x_3 = \textcolor{#3DD6B5}{\begin{bmatrix} -2 \\ -4 \end{bmatrix}}
The matrix M = [1 2; 2 4] sends the three yellow points (−1, 1), (1, 0) and (3, −1), which lie on a dotted line, to the single point (1, 2). Orange dotted arrows run from each point to (1, 2), which sits on the teal line y = 2x where the whole plane lands.

Zero determinant means the plane is flattened

When ad−bc=0ad - bc = 0, the two columns of AA lie on one line through the origin, and AA squashes the whole plane onto that line. The vector x=(−b,a)\mathbf x = (-b, a) always gives Ax=(ab−ba,  ad−bc)A\mathbf x = (ab - ba,\; ad - bc). The first entry is always 00 and the second is the determinant, so when the determinant is zero some nonzero vector lands on 0\mathbf 0. Then many points share each landing spot, and no inverse can exist.

For which value of hh is [h142]\begin{bmatrix} h & 1 \\ 4 & 2 \end{bmatrix} singular?

h=h =
Walk through the solution

The matrix is singular exactly when its determinant is zero, so we compute the determinant with hh left as a letter: 2h−1⋅4=2h−42h - 1 \cdot 4 = 2h - 4. Setting 2h−4=02h - 4 = 0 gives h=2h = 2.

At h=2h = 2 the columns are (2,4)(2, 4) and (1,2)(1, 2). The first is twice the second, so they lie on one line. For every other hh, the columns point in different directions, and the matrix is invertible.

Slide hh until the parallelogram built from the two columns has no area left.
A=[−2142]A = \begin{bmatrix} \textcolor{#FF8A3D}{-2} & 1 \\ 4 & 2 \end{bmatrix}
ad−bc=2(−2)−1(4)=−8\begin{aligned} ad - bc &= 2(\textcolor{#FF8A3D}{-2}) - 1(4) \\ &= -8 \end{aligned}

Drag both columns below to find another flat matrix of your own.

Drag ı^\hat\imath and ȷ^\hat\jmath until ad−bc=0ad - bc = 0, keeping the green column away from the origin.
A=[2112]A = \begin{bmatrix} \textcolor{#7BC96F}{2} & \textcolor{#F2665E}{1} \\ \textcolor{#7BC96F}{1} & \textcolor{#F2665E}{2} \end{bmatrix}
ad−bc=3ad - bc = 3
A−1=13[2−1−12]A^{-1} = \frac{1}{3}\begin{bmatrix} \textcolor{#E8ECF1}{2} & \textcolor{#E8ECF1}{-1} \\ \textcolor{#E8ECF1}{-1} & \textcolor{#E8ECF1}{2} \end{bmatrix}

Day 19 gathers many other tests for whether a square matrix flattens space and shows they all agree with this one.

Practice

Warm-up

Compute the determinant of [3−241]\begin{bmatrix} 3 & -2 \\ 4 & 1 \end{bmatrix}. Is the matrix invertible?

det⁡=\det =
Show the solution

det⁡=3⋅1−(−2)⋅4=3+8=11\det = 3 \cdot 1 - (-2) \cdot 4 = 3 + 8 = 11. It is not zero, so the matrix is invertible.

Let A=[2153]A = \begin{bmatrix} 2 & 1 \\ 5 & 3 \end{bmatrix} and C=[3−1−52]C = \begin{bmatrix} 3 & -1 \\ -5 & 2 \end{bmatrix}. Compute ACAC, entering it row by row. Is C=A−1C = A^{-1}? (Modeled on Lay §2.2, Example 1.)

Show the solution
AC=[6−5−2+215−15−5+6]=[1001]AC = \begin{bmatrix} 6 - 5 & -2 + 2 \\ 15 - 15 & -5 + 6 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}

The other order gives CA=[6−53−3−10+10−5+6]=ICA = \begin{bmatrix} 6 - 5 & 3 - 3 \\ -10 + 10 & -5 + 6 \end{bmatrix} = I as well, so C=A−1C = A^{-1}.

Find the inverse of [1031]\begin{bmatrix} 1 & 0 \\ 3 & 1 \end{bmatrix}, row by row.

Show the solution

The determinant is 1⋅1−0⋅3=11 \cdot 1 - 0 \cdot 3 = 1. Swap the diagonal entries (both 11) and flip the signs of 00 and 33: [10−31]\begin{bmatrix} 1 & 0 \\ -3 & 1 \end{bmatrix}. The matrix adds 33 times the first coordinate to the second, and its inverse subtracts it again.

Core

Find the inverse of [5273]\begin{bmatrix} 5 & 2 \\ 7 & 3 \end{bmatrix} and use it to solve 5x1+2x2=45x_1 + 2x_2 = 4, 7x1+3x2=57x_1 + 3x_2 = 5. (Modeled on Lay §2.2 #1 and #5.)

Show a hint

Find the determinant first. Then x=A−1b\mathbf x = A^{-1}\mathbf b with b=(4,5)\mathbf b = (4, 5).

Show the solution
det⁡A=5⋅3−2⋅7=1A−1=[3−2−75]x=A−1b=[3−2−75][45]=[12−10−28+25]=[2−3]\begin{aligned} \det A &= 5 \cdot 3 - 2 \cdot 7 = 1 \\ A^{-1} &= \begin{bmatrix} 3 & -2 \\ -7 & 5 \end{bmatrix} \\ \mathbf x = A^{-1}\mathbf b &= \begin{bmatrix} 3 & -2 \\ -7 & 5 \end{bmatrix}\begin{bmatrix} 4 \\ 5 \end{bmatrix} = \begin{bmatrix} 12 - 10 \\ -28 + 25 \end{bmatrix} = \begin{bmatrix} 2 \\ -3 \end{bmatrix} \end{aligned}

Check: 5(2)+2(−3)=45(2) + 2(-3) = 4 and 7(2)+3(−3)=57(2) + 3(-3) = 5.

Find the inverse of [4635]\begin{bmatrix} 4 & 6 \\ 3 & 5 \end{bmatrix}, row by row. You can type fractions such as 5/2. (Modeled on Lay §2.2 #1.)

Show a hint

This time the determinant is not 11, so every entry of the swapped matrix gets divided by it.

Show the solution
det⁡A=4⋅5−6⋅3=2A−1=12[5−6−34]=[5/2−3−3/22]\begin{aligned} \det A &= 4 \cdot 5 - 6 \cdot 3 = 2 \\ A^{-1} &= \frac12\begin{bmatrix} 5 & -6 \\ -3 & 4 \end{bmatrix} = \begin{bmatrix} 5/2 & -3 \\ -3/2 & 2 \end{bmatrix} \end{aligned}

Check the first row of AA−1AA^{-1}: 4⋅52+6⋅(−32)=10−9=14 \cdot \tfrac52 + 6 \cdot (-\tfrac32) = 10 - 9 = 1 and 4(−3)+6(2)=04(-3) + 6(2) = 0.

For which value of hh is [h346]\begin{bmatrix} h & 3 \\ 4 & 6 \end{bmatrix} singular? (Modeled on Lay §2.2 #10(c).)

h=h =
Show a hint

Write the determinant with hh as a letter and set it equal to zero.

Show the solution

The determinant is 6h−3⋅4=6h−126h - 3 \cdot 4 = 6h - 12, which is zero exactly when h=2h = 2. Then the columns (2,4)(2, 4) and (3,6)(3, 6) both lie on the line y=2xy = 2x, and the matrix squashes the whole plane onto that line.

Let P=[1237]P = \begin{bmatrix} 1 & 2 \\ 3 & 7 \end{bmatrix} and Q=[2111]Q = \begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix}. Find (PQ)−1(PQ)^{-1} as Q−1P−1Q^{-1}P^{-1}, and enter it row by row. (Modeled on Lay §2.2 #15.)

Show a hint

Invert PP and QQ separately with the formula. Then multiply them in the reverse order.

Show the solution

Both determinants equal 11, so

P−1=[7−2−31],Q−1=[1−1−12]Q−1P−1=[7+3−2−1−7−62+2]=[10−3−134]\begin{aligned} P^{-1} &= \begin{bmatrix} 7 & -2 \\ -3 & 1 \end{bmatrix}, \qquad Q^{-1} = \begin{bmatrix} 1 & -1 \\ -1 & 2 \end{bmatrix} \\ Q^{-1}P^{-1} &= \begin{bmatrix} 7 + 3 & -2 - 1 \\ -7 - 6 & 2 + 2 \end{bmatrix} = \begin{bmatrix} 10 & -3 \\ -13 & 4 \end{bmatrix} \end{aligned}

The wrong order gives P−1Q−1=[9−11−45]P^{-1}Q^{-1} = \begin{bmatrix} 9 & -11 \\ -4 & 5 \end{bmatrix}, which is a different matrix. You can confirm the right answer by multiplying it by PQ=[431310]PQ = \begin{bmatrix} 4 & 3 \\ 13 & 10 \end{bmatrix} and getting II.

Let A=[1237]A = \begin{bmatrix} 1 & 2 \\ 3 & 7 \end{bmatrix}. Use one inverse to solve both Ax=(3,10)A\mathbf x = (3, 10) and Ay=(0,1)A\mathbf y = (0, 1). Enter x\mathbf x and then y\mathbf y. (Modeled on Lay §2.2 #7.)

Show a hint

Find A−1A^{-1} once, then multiply it by each right side.

Show the solution

det⁡A=7−6=1\det A = 7 - 6 = 1, so A−1=[7−2−31]A^{-1} = \begin{bmatrix} 7 & -2 \\ -3 & 1 \end{bmatrix}. Then

x=[7−2−31][310]=[21−20−9+10]=[11]y=[7−2−31][01]=[−21]\begin{aligned} \mathbf x &= \begin{bmatrix} 7 & -2 \\ -3 & 1 \end{bmatrix}\begin{bmatrix} 3 \\ 10 \end{bmatrix} = \begin{bmatrix} 21 - 20 \\ -9 + 10 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \end{bmatrix} \\ \mathbf y &= \begin{bmatrix} 7 & -2 \\ -3 & 1 \end{bmatrix}\begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} -2 \\ 1 \end{bmatrix} \end{aligned}

The second answer is just column 2 of A−1A^{-1}, because (0,1)=ȷ^(0, 1) = \hat\jmath.

Challenge

PP is invertible and A=PBP−1A = PBP^{-1}. Which expression equals BB?

Show a hint

The PP on the left of BB needs a P−1P^{-1} on its left, and the P−1P^{-1} on the right of BB needs a PP on its right.

Show the solution
P−1AP=P−1(PBP−1)P=(P−1P)B(P−1P)=BP^{-1}AP = P^{-1}(PBP^{-1})P = (P^{-1}P)B(P^{-1}P) = B

The matrix A=[2−6−13]A = \begin{bmatrix} 2 & -6 \\ -1 & 3 \end{bmatrix} has determinant 00. Find the vector x\mathbf x with first entry 33 and Ax=0A\mathbf x = \mathbf 0. (Modeled on Lay §2.2 #25.)

Show a hint

The vector (−b,a)(-b, a) always works when det⁡A=0\det A = 0. Scale it so its first entry is 33.

Show the solution

Here (−b,a)=(6,2)(-b, a) = (6, 2), and A(6,2)=(12−12,−6+6)=(0,0)A(6, 2) = (12 - 12, -6 + 6) = (0, 0). Half of it is (3,1)(3, 1), and A(3,1)=3(2,−1)+1(−6,3)=(0,0)A(3, 1) = 3(2, -1) + 1(-6, 3) = (0, 0) as well. Since a nonzero vector lands on 0\mathbf 0, the equation Ax=0A\mathbf x = \mathbf 0 has two different solutions, 0\mathbf 0 and (3,1)(3, 1). Theorem 5 says an invertible matrix gives exactly one, so AA is singular.

Let A=[2153]A = \begin{bmatrix} 2 & 1 \\ 5 & 3 \end{bmatrix}. Find (AT)−1(A^T)^{-1}, row by row, without inverting ATA^T directly.

Show a hint

Theorem 6(c) says (AT)−1=(A−1)T(A^T)^{-1} = (A^{-1})^T. Invert AA, then flip.

Show the solution

det⁡A=6−5=1\det A = 6 - 5 = 1, so A−1=[3−1−52]A^{-1} = \begin{bmatrix} 3 & -1 \\ -5 & 2 \end{bmatrix}. Its transpose is [3−5−12]\begin{bmatrix} 3 & -5 \\ -1 & 2 \end{bmatrix}.

Check: AT=[2513]A^T = \begin{bmatrix} 2 & 5 \\ 1 & 3 \end{bmatrix}, and [2513][3−5−12]=[6−5−10+103−3−5+6]=I\begin{bmatrix} 2 & 5 \\ 1 & 3 \end{bmatrix}\begin{bmatrix} 3 & -5 \\ -1 & 2 \end{bmatrix} = \begin{bmatrix} 6 - 5 & -10 + 10 \\ 3 - 3 & -5 + 6 \end{bmatrix} = I.

Tomorrow each row operation becomes a matrix, and a chain of them that reduces AA to II multiplies out to A−1A^{-1}.