Inverse Matrices

The inverse of a matrix A, written A^{-1}, is the matrix that undoes A, so AA^{-1} = I, the identity matrix. For a 2 × 2 matrix, swap the two main diagonal entries, change the signs of the other two, and divide by the determinant. A matrix has an inverse only when its determinant is not 0.

Before this lesson: You should know Matrix Multiplication, Solving Systems with Augmented Matrices and Determinant of a Matrix.

What an Inverse Matrix Does

For numbers, the inverse of 5 is \frac{1}{5}, because 5 \cdot \frac{1}{5} = 1. Matrices work the same way. The number 1 is replaced by the identity matrix I, which has 1s on the main diagonal and 0s everywhere else.

If AA^{-1} = I and A^{-1}A = I, then A^{-1} is the inverse of A. Only square matrices can have inverses. A square matrix with a determinant of 0 has no inverse, and it is called singular.

Inverses let you undo a matrix the way division undoes multiplication. To solve AX = B, multiply both sides on the left by A^{-1}. This gives X = A^{-1}B. It is the same idea as inverse functions, where one function undoes another.

Inverse of a 2 × 2 Matrix Formula

A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} \quad \Rightarrow \quad A^{-1} = \frac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}
  1. Find the determinant, ad - bc. If it is 0, stop: there is no inverse.
  2. Swap a and d.
  3. Change the signs of b and c.
  4. Multiply every entry by \frac{1}{ad - bc}.
  5. Check: multiply A by your answer. You should get I.
A 2 by 2 matrix with rows 4, 7 and 2, 4. An arrow shows the 4s on the main diagonal trading places and the 7 and 2 changing sign, giving rows 4, -7 and -2, 4. A second arrow multiplies by one half, because the determinant is 2, giving the inverse with rows 2, -7/2 and -1, 2.
Swap a and d, change the signs of b and c, then divide by the determinant: here ad − bc = 2.

Inverse of a 3 × 3 Matrix

For larger matrices, use the row operations from solving systems with augmented matrices. Write A next to the identity matrix, as [A \mid I]. Then use row operations to turn the left side into I. The right side becomes A^{-1}.

[A \mid I] \;\longrightarrow\; [I \mid A^{-1}]

If a row of 0s appears on the left side, the matrix is singular and has no inverse.

Worked Examples

Example 1: Inverse of a 2 × 2 matrix

Find the inverse of A = \begin{bmatrix} 4 & 7 \\ 2 & 4 \end{bmatrix}.

ad - bc = 4 \cdot 4 - 7 \cdot 2

Write the determinant.

16 - 14

Multiply.

16 - 14 = 2

Subtract. This is not 0, so the inverse exists.

\begin{bmatrix} 4 & -7 \\ -2 & 4 \end{bmatrix}

Swap the 4s and change the signs of 7 and 2.

A^{-1} = \frac{1}{2}\begin{bmatrix} 4 & -7 \\ -2 & 4 \end{bmatrix}

Write the formula with the determinant.

A^{-1} = \begin{bmatrix} 2 & -\frac{7}{2} \\ -1 & 2 \end{bmatrix}

Multiply each entry by \frac{1}{2} (see multiplying and dividing fractions)

Answer: A^{-1} = \begin{bmatrix} 2 & -\frac{7}{2} \\ -1 & 2 \end{bmatrix}

Example 2: Negative entries, then check

Find the inverse of B = \begin{bmatrix} 3 & -2 \\ 5 & -4 \end{bmatrix}, and check that BB^{-1} = I.

3 \cdot (-4) - (-2) \cdot 5

Write the determinant.

-12 - (-10)

Multiply (see multiplying and dividing integers)

-12 + 10 = -2

Subtract a negative by adding.

\begin{bmatrix} -4 & 2 \\ -5 & 3 \end{bmatrix}

Swap 3 and −4, and change the signs of −2 and 5.

B^{-1} = \begin{bmatrix} 2 & -1 \\ \frac{5}{2} & -\frac{3}{2} \end{bmatrix}

Multiply each entry by \frac{1}{-2}.

Check row 1 times column 1: 3 \cdot 2 + (-2) \cdot \frac{5}{2} = 6 - 5 = 1

Check row 1 times column 2: 3 \cdot (-1) + (-2) \cdot (-\frac{3}{2}) = -3 + 3 = 0

Check row 2 times column 1: 5 \cdot 2 + (-4) \cdot \frac{5}{2} = 10 - 10 = 0

Check row 2 times column 2: 5 \cdot (-1) + (-4) \cdot (-\frac{3}{2}) = -5 + 6 = 1

Answer: B^{-1} = \begin{bmatrix} 2 & -1 \\ \frac{5}{2} & -\frac{3}{2} \end{bmatrix}, and the check gives I.

Example 3: A matrix with no inverse

Does C = \begin{bmatrix} 6 & 4 \\ 9 & 6 \end{bmatrix} have an inverse?

6 \cdot 6 - 4 \cdot 9

Write the determinant.

36 - 36

Multiply.

36 - 36 = 0

Subtract.

The formula would divide by 0, so there is no inverse.

Answer: No. C is singular. Row 2 is 1.5 times row 1, because 1.5 \cdot 6 = 9 and 1.5 \cdot 4 = 6.

Example 4: Inverse of a 3 × 3 matrix

Find the inverse of D = \begin{bmatrix} 1 & 2 & 1 \\ 0 & 1 & 0 \\ 2 & 4 & 3 \end{bmatrix}.

\left[\begin{array}{ccc|ccc} 1 & 2 & 1 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 & 1 & 0 \\ 2 & 4 & 3 & 0 & 0 & 1 \end{array}\right]

Write [D \mid I].

[2 - 2 \;\; 4 - 4 \;\; 3 - 2 \mid 0 - 2 \;\; 0 - 0 \;\; 1 - 0] = [0 \;\; 0 \;\; 1 \mid -2 \;\; 0 \;\; 1]

Replace row 3 with R_3 - 2R_1.

[1 - 0 \;\; 2 - 2 \;\; 1 - 0 \mid 1 - 0 \;\; 0 - 2 \;\; 0 - 0] = [1 \;\; 0 \;\; 1 \mid 1 \;\; -2 \;\; 0]

Replace row 1 with R_1 - 2R_2.

[1 - 0 \;\; 0 - 0 \;\; 1 - 1 \mid 1 - (-2) \;\; -2 - 0 \;\; 0 - 1] = [1 \;\; 0 \;\; 0 \mid 3 \;\; -2 \;\; -1]

Replace row 1 with R_1 - R_3.

\left[\begin{array}{ccc|ccc} 1 & 0 & 0 & 3 & -2 & -1 \\ 0 & 1 & 0 & 0 & 1 & 0 \\ 0 & 0 & 1 & -2 & 0 & 1 \end{array}\right]

The left side is now I.

D^{-1} = \begin{bmatrix} 3 & -2 & -1 \\ 0 & 1 & 0 \\ -2 & 0 & 1 \end{bmatrix}

Read the right side.

Check row 1 of D times column 1 of D^{-1}: 1 \cdot 3 + 2 \cdot 0 + 1 \cdot (-2) = 3 + 0 - 2 = 1

Check row 3 of D times column 1 of D^{-1}: 2 \cdot 3 + 4 \cdot 0 + 3 \cdot (-2) = 6 + 0 - 6 = 0

Answer: D^{-1} = \begin{bmatrix} 3 & -2 & -1 \\ 0 & 1 & 0 \\ -2 & 0 & 1 \end{bmatrix}

Example 5: Word problem: solve a system with an inverse

A café sells muffins and coffees. An order of 2 muffins and 3 coffees costs $17.00. An order of 1 muffin and 2 coffees costs $10.50. Use an inverse matrix to find the price of each item.

Let m be the muffin price and c the coffee price: 2m + 3c = 17 and m + 2c = 10.5

\begin{bmatrix} 2 & 3 \\ 1 & 2 \end{bmatrix}\begin{bmatrix} m \\ c \end{bmatrix} = \begin{bmatrix} 17 \\ 10.5 \end{bmatrix}

Write the system as AX = B.

2 \cdot 2 - 3 \cdot 1 = 4 - 3 = 1

Find the determinant.

A^{-1} = \begin{bmatrix} 2 & -3 \\ -1 & 2 \end{bmatrix}

Swap the 2s, change the signs of 3 and 1, and divide by 1.

X = A^{-1}B = \begin{bmatrix} 2 & -3 \\ -1 & 2 \end{bmatrix}\begin{bmatrix} 17 \\ 10.5 \end{bmatrix}

Multiply both sides on the left by A^{-1}.

2 \cdot 17 + (-3) \cdot 10.5 = 34 - 31.5 = 2.5

Multiply the top row of the inverse by B.

-1 \cdot 17 + 2 \cdot 10.5 = -17 + 21 = 4

Multiply the bottom row of the inverse by B.

Check order 1: 2 \cdot 2.5 + 3 \cdot 4 = 5 + 12 = 17

Check order 2: 2.5 + 2 \cdot 4 = 2.5 + 8 = 10.5

Answer: A muffin costs $2.50 and a coffee costs $4.00.

Common Mistakes

MistakeExample of the errorFix
Swapping the wrong pairFor \begin{bmatrix} 4 & 7 \\ 2 & 4 \end{bmatrix}, writing \begin{bmatrix} 4 & 2 \\ 7 & 4 \end{bmatrix}Swap the main diagonal, a and d. Only change the signs of b and c.
Forgetting the determinantGiving \begin{bmatrix} 4 & -7 \\ -2 & 4 \end{bmatrix} as the inverseMultiply every entry by \frac{1}{ad - bc}, here \frac{1}{2}.
Sign error in the determinant3 \cdot (-4) - (-2) \cdot 5 = -12 - 10 = -22Subtracting a negative adds: -12 - (-10) = -12 + 10 = -2.
Multiplying in the wrong orderSolving AX = B with X = BA^{-1}Matrix multiplication is not commutative. Use X = A^{-1}B.
Inverting a singular matrixWriting an inverse for a matrix whose determinant is 0Find the determinant first. If it is 0, there is no inverse.
Inverting each entryWriting the inverse of \begin{bmatrix} 2 & 4 \\ 1 & 5 \end{bmatrix} as \begin{bmatrix} \frac{1}{2} & \frac{1}{4} \\ 1 & \frac{1}{5} \end{bmatrix}A matrix inverse does not work entry by entry. Use the formula or [A \mid I].

Related Methods

Solving a 3 × 3 system with an inverse

A system of three equations, like those in systems of equations in three variables, can also be written as AX = B. Find A^{-1} with [A \mid I], then multiply to get X = A^{-1}B. This pays off when you must solve several systems with the same coefficients.

Using a graphing calculator

Enter the matrix in the matrix menu, then press the x^{-1} key to get A^{-1}. If the calculator shows a singular matrix error, the determinant is 0. Show the determinant and the inverse on tests unless your teacher says otherwise.

Useful properties

The inverse of an inverse is the original matrix: (A^{-1})^{-1} = A. For a product, the order flips: (AB)^{-1} = B^{-1}A^{-1}. The next lesson, Cramer’s Rule, solves the same kind of system using determinants only.

Practice Problems

  1. Find the inverse of \begin{bmatrix} 3 & 1 \\ 5 & 2 \end{bmatrix}.
  2. Find the inverse of \begin{bmatrix} 2 & 5 \\ 1 & 3 \end{bmatrix}.
  3. Find the inverse of \begin{bmatrix} 4 & 2 \\ 6 & 4 \end{bmatrix}.
  4. Find the inverse of \begin{bmatrix} -1 & 3 \\ 2 & -5 \end{bmatrix}.
  5. Does \begin{bmatrix} 8 & 4 \\ 6 & 3 \end{bmatrix} have an inverse? Explain.
  6. Find the value of k that makes \begin{bmatrix} k & 6 \\ 3 & 9 \end{bmatrix} singular.
  7. Are \begin{bmatrix} 5 & 3 \\ 3 & 2 \end{bmatrix} and \begin{bmatrix} 2 & -3 \\ -3 & 5 \end{bmatrix} inverses of each other?
  8. Use an inverse matrix to solve 3x + y = 11 and 5x + 2y = 19. (Hint: use your answer to Problem 1.)
  9. Find the inverse of \begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 2 & 1 \end{bmatrix}.
  10. A museum group pays $31 for 2 adult tickets and 1 student ticket. Another group pays $50 for 3 adult tickets and 2 student tickets. Use an inverse matrix to find the price of each ticket.
Show answers

1.

3 \cdot 2 - 1 \cdot 5 = 6 - 5 = 1

Find the determinant.

\begin{bmatrix} 2 & -1 \\ -5 & 3 \end{bmatrix}

Swap 3 and 2, and change the signs of 1 and 5.

Divide by 1, which changes nothing
Answer: \begin{bmatrix} 2 & -1 \\ -5 & 3 \end{bmatrix}

2.

2 \cdot 3 - 5 \cdot 1 = 6 - 5 = 1

Find the determinant.

\begin{bmatrix} 3 & -5 \\ -1 & 2 \end{bmatrix}

Swap 2 and 3, and change the signs of 5 and 1.

Divide by 1, which changes nothing
Answer: \begin{bmatrix} 3 & -5 \\ -1 & 2 \end{bmatrix}

3.

4 \cdot 4 - 2 \cdot 6 = 16 - 12 = 4

Find the determinant.

\begin{bmatrix} 4 & -2 \\ -6 & 4 \end{bmatrix}

Swap the 4s, and change the signs of 2 and 6.

\begin{bmatrix} 1 & -\frac{1}{2} \\ -\frac{3}{2} & 1 \end{bmatrix}

Multiply each entry by \frac{1}{4}.

Answer: \begin{bmatrix} 1 & -\frac{1}{2} \\ -\frac{3}{2} & 1 \end{bmatrix}

4.

(-1) \cdot (-5) - 3 \cdot 2 = 5 - 6 = -1

Find the determinant.

\begin{bmatrix} -5 & -3 \\ -2 & -1 \end{bmatrix}

Swap −1 and −5, and change the signs of 3 and 2.

\begin{bmatrix} 5 & 3 \\ 2 & 1 \end{bmatrix}

Multiply each entry by \frac{1}{-1} = -1.

Answer: \begin{bmatrix} 5 & 3 \\ 2 & 1 \end{bmatrix}

5.

8 \cdot 3 - 4 \cdot 6 = 24 - 24 = 0

Find the determinant.

The determinant is 0, so the formula would divide by 0
Answer: No. The matrix is singular.

6.

9k - 6 \cdot 3 = 0

Set the determinant equal to 0.

9k - 18 = 0

Multiply.

9k = 18

Add 18 to both sides.

k = 2

Divide both sides by 9.

Answer: k = 2

7.

5 \cdot 2 + 3 \cdot (-3) = 10 - 9 = 1

Row 1 times column 1.

5 \cdot (-3) + 3 \cdot 5 = -15 + 15 = 0

Row 1 times column 2.

3 \cdot 2 + 2 \cdot (-3) = 6 - 6 = 0

Row 2 times column 1.

3 \cdot (-3) + 2 \cdot 5 = -9 + 10 = 1

Row 2 times column 2.

Answer: Yes. Their product is I.

8.

Write AX = B with A = \begin{bmatrix} 3 & 1 \\ 5 & 2 \end{bmatrix} and B = \begin{bmatrix} 11 \\ 19 \end{bmatrix}

A^{-1} = \begin{bmatrix} 2 & -1 \\ -5 & 3 \end{bmatrix}

From Problem 1.

2 \cdot 11 + (-1) \cdot 19 = 22 - 19 = 3

Top row of A^{-1}B.

-5 \cdot 11 + 3 \cdot 19 = -55 + 57 = 2

Multiply the bottom row of the inverse by B.

Check: 3 \cdot 3 + 2 = 11 and 5 \cdot 3 + 2 \cdot 2 = 19
Answer: x = 3, y = 2

9.

Write [A \mid I] with rows [1 \;\; 1 \;\; 0 \mid 1 \;\; 0 \;\; 0], [0 \;\; 1 \;\; 0 \mid 0 \;\; 1 \;\; 0] and [0 \;\; 2 \;\; 1 \mid 0 \;\; 0 \;\; 1]
R_3 - 2R_2: [0 - 0 \;\; 2 - 2 \;\; 1 - 0 \mid 0 - 0 \;\; 0 - 2 \;\; 1 - 0] = [0 \;\; 0 \;\; 1 \mid 0 \;\; -2 \;\; 1]
R_1 - R_2: [1 - 0 \;\; 1 - 1 \;\; 0 - 0 \mid 1 - 0 \;\; 0 - 1 \;\; 0 - 0] = [1 \;\; 0 \;\; 0 \mid 1 \;\; -1 \;\; 0]
The left side is now I; read the right side
Answer: \begin{bmatrix} 1 & -1 & 0 \\ 0 & 1 & 0 \\ 0 & -2 & 1 \end{bmatrix}

10.

Let a be the adult price and s the student price: 2a + s = 31 and 3a + 2s = 50

2 \cdot 2 - 1 \cdot 3 = 4 - 3 = 1

Find the determinant.

\begin{bmatrix} 2 & -1 \\ -3 & 2 \end{bmatrix}

Write the inverse.

2 \cdot 31 + (-1) \cdot 50 = 62 - 50 = 12

Multiply the top row of the inverse by B.

-3 \cdot 31 + 2 \cdot 50 = -93 + 100 = 7

Multiply the bottom row of the inverse by B.

Check: 2 \cdot 12 + 7 = 31 and 3 \cdot 12 + 2 \cdot 7 = 50
Answer: An adult ticket costs $12 and a student ticket costs $7.

FAQ

How do you find the inverse of a 2 × 2 matrix?

Find the determinant ad - bc. Swap a and d, change the signs of b and c, and multiply every entry by \frac{1}{ad - bc}.

How do you know if a matrix has an inverse?

A square matrix has an inverse exactly when its determinant is not 0. If the determinant is 0, the matrix is singular.

How do you find the inverse of a 3 × 3 matrix?

Write the matrix next to the identity matrix as [A \mid I]. Use row operations until the left side is I; the right side is then A^{-1}.

Can a non-square matrix have an inverse?

No. An inverse must work on both sides, AA^{-1} = A^{-1}A = I, and that is only possible for square matrices.

Summary

  • The inverse A^{-1} undoes A: AA^{-1} = A^{-1}A = I.
  • For a 2 × 2 matrix, A^{-1} = \frac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}.
  • A matrix with determinant 0 is singular and has no inverse.
  • For a 3 × 3 matrix, row-reduce [A \mid I] to [I \mid A^{-1}].
  • To solve AX = B, use X = A^{-1}B, with A^{-1} on the left.

Previous lesson: Determinant of a Matrix

Next lesson: Cramer’s Rule

Back to the Precalculus Index