Lesson 6 · Inverse Matrix

Inverse Matrix

Optional MathematicsSubject
8 minEstimated read

Matrices That Undo Each Other

With ordinary numbers, every number except zero has a partner that brings it back to 1. The partner of 5 is \( \frac{1}{5} \), because \( 5 \times \frac{1}{5} = 1 \). The partner of \( -4 \) is \( -\frac{1}{4} \). This partner is called the reciprocal, or the multiplicative inverse. The number 1 is special because multiplying by it changes nothing.

Matrices also have something that behaves exactly like the number 1. It is the identity matrix.

Definition

Identity matrix (unit matrix): a square matrix in which every entry on the main diagonal is 1 and every other entry is 0. The 2 × 2 identity matrix is written \( I \) or \( I_{2 \times 2} \), and for any 2 × 2 matrix A, \( AI = IA = A \).

\[ I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \]

So the natural question is this: for a given matrix A, is there a matrix B that multiplies with A to give I? Take the two matrices below and find out by multiplying them in both orders.

\[ A = \begin{bmatrix} 3 & 1 \\ 5 & 2 \end{bmatrix}, \quad B = \begin{bmatrix} 2 & -1 \\ -5 & 3 \end{bmatrix} \]

Step 1: Multiplying A by B, row by column. The first entry is row 1 of A times column 1 of B, that is \( 3 \times 2 + 1 \times (-5) \), and the other three entries are found the same way:

\[ AB = \begin{bmatrix} 6 - 5 & -3 + 3 \\ 10 - 10 & -5 + 6 \end{bmatrix} \]

Step 2: Simplifying each entry:

\[ AB = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = I \]

Step 3: Multiplying in the other order, B by A, row by column:

\[ BA = \begin{bmatrix} 6 - 5 & 2 - 2 \\ -15 + 15 & -5 + 6 \end{bmatrix} \]

Step 4: Simplifying each entry:

\[ BA = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = I \]

Both products are the identity matrix. Whatever A does, B undoes, and whatever B does, A undoes. A pair like this is the matrix version of 5 and \( \frac{1}{5} \).

What an Inverse Matrix Is

Definition

Inverse matrix: if A is a square matrix and B is another square matrix of the same order such that \( AB = BA = I \), where I is the identity matrix, then A and B are inverse matrices of each other. We write \( B = A^{-1} \) and \( A = B^{-1} \).

The symbol \( A^{-1} \) is read "A inverse". In the pair above, \( B = A^{-1} \), and at the same time \( A = B^{-1} \). The relationship always works in both directions.

Careful with this notation

\( A^{-1} \) does not mean \( \frac{1}{A} \). There is no such thing as dividing by a matrix. The small \( -1 \) is only a name for the matrix that multiplies with A to give I.

Not every matrix has an inverse. Two conditions must hold. First, the matrix must be square, because AB and BA must both exist and both be equal to the same identity matrix. Second, its determinant must not be zero. Two words describe this second condition.

Definition

Singular matrix: a square matrix whose determinant is zero, that is \( |A| = 0 \). A singular matrix has no inverse.

Definition

Non-singular matrix: a square matrix whose determinant is not zero, that is \( |A| \neq 0 \). The inverse of a matrix is defined only when the matrix is a non-singular square matrix.

Key idea

Before trying to find an inverse, find the determinant. If it is zero, stop there: the matrix is singular and has no inverse.

Process of Finding the Inverse of a Given 2 × 2 Matrix

We now build a formula that gives the inverse of any 2 × 2 matrix directly, with no guessing. Start with a general matrix whose determinant is not zero:

\[ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, \quad |A| = ad - bc \neq 0 \]

Let the inverse be a matrix with four unknown entries p, q, r and s:

\[ A^{-1} = \begin{bmatrix} p & q \\ r & s \end{bmatrix} \]

Step 1: By the definition of an inverse matrix, \( AA^{-1} = I \), so:

\[ \begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} p & q \\ r & s \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \]

Step 2: Multiplying the two matrices on the left, row by column:

\[ \begin{bmatrix} ap + br & aq + bs \\ cp + dr & cq + ds \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \]

Step 3: Two matrices are equal only when their corresponding entries are equal. Equating the entries gives four equations:

\[ \begin{aligned} ap + br &= 1 \quad \text{(i)} \\ aq + bs &= 0 \quad \text{(ii)} \\ cp + dr &= 0 \quad \text{(iii)} \\ cq + ds &= 1 \quad \text{(iv)} \end{aligned} \]

Step 4: Finding p from equations (i) and (iii). Multiplying (i) by d and (iii) by b, then subtracting, removes r:

\[ (ad - bc)\,p = d \;\Rightarrow\; p = \frac{d}{ad - bc} \]

Step 5: Finding r from the same two equations. Multiplying (i) by c and (iii) by a, then subtracting, removes p:

\[ (bc - ad)\,r = c \;\Rightarrow\; r = \frac{-c}{ad - bc} \]

Step 6: Solving equations (ii) and (iv) in exactly the same way gives the other two entries:

\[ q = \frac{-b}{ad - bc}, \quad s = \frac{a}{ad - bc} \]

Step 7: Putting the four entries into the matrix:

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

Step 8: Taking the common factor \( \frac{1}{ad - bc} \) outside the matrix:

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

Since \( ad - bc = |A| \), the formula is usually written with the determinant. This is the result to learn:

\[ A^{-1} = \frac{1}{|A|} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}, \quad |A| \neq 0 \]

Why the Determinant Must Not Be Zero

Every entry of the inverse is divided by \( ad - bc \). Division by zero is impossible, so when \( ad - bc = 0 \) the formula breaks down and the inverse does not exist.

You can watch this happen. Take \( A = \begin{bmatrix} 2 & 4 \\ 3 & 6 \end{bmatrix} \). Its determinant is \( 2 \times 6 - 4 \times 3 = 12 - 12 = 0 \). In Step 4 of the process above, the equation for p becomes \( 0 \times p = 6 \). No number multiplied by 0 gives 6, so no p can be found, and so no inverse exists. The matrix is singular.

Look at the rows of that matrix. The second row is \( \frac{3}{2} \) times the first row. Whenever one row of a 2 × 2 matrix is a multiple of the other, the determinant is zero and the matrix has no inverse.

The Rule in Three Moves

To find the inverse of a 2 × 2 matrix, first check that its determinant is not zero. Then the formula comes down to three moves on the given matrix:

  • Interchange the two entries of the main diagonal: a and d change places.
  • Change the signs of the two entries of the other diagonal: b becomes \( -b \) and c becomes \( -c \), but they stay where they are.
  • Divide by the determinant, that is, multiply the new matrix by \( \frac{1}{|A|} \).
Common mistake

Only the main diagonal entries swap places. The other two entries stay in position and only change sign. Swapping b and c as well, or changing the signs of a and d, gives a wrong answer that still looks believable.

Key idea

An inverse can always be checked. Multiply it by the original matrix. If the product is I, the inverse is right.

Worked Example 1: Finding an Inverse

If \( A = \begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} \), find the determinant \( |A| \) and the inverse \( A^{-1} \).

Step 1: Finding the determinant, the product of the main diagonal minus the product of the other diagonal:

\[ |A| = 2 \times 4 - 3 \times 1 = 8 - 3 = 5 \]

Since \( |A| = 5 \neq 0 \), A is non-singular and its inverse exists.

Step 2: Writing the formula for the inverse:

\[ A^{-1} = \frac{1}{|A|} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} \]

Step 3: Swapping 2 and 4, changing the signs of 3 and 1, and putting 5 under the 1:

\[ A^{-1} = \frac{1}{5} \begin{bmatrix} 4 & -3 \\ -1 & 2 \end{bmatrix} \]

Step 4: Dividing each entry by 5:

\[ A^{-1} = \begin{bmatrix} \frac{4}{5} & -\frac{3}{5} \\ -\frac{1}{5} & \frac{2}{5} \end{bmatrix} \]

Step 5: Checking the answer by multiplying A by the inverse, row by column:

\[ AA^{-1} = \frac{1}{5} \begin{bmatrix} 8 - 3 & -6 + 6 \\ 4 - 4 & -3 + 8 \end{bmatrix} \]

Step 6: Simplifying the entries and dividing by 5:

\[ AA^{-1} = \frac{1}{5} \begin{bmatrix} 5 & 0 \\ 0 & 5 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \]

The product is I, so the inverse of \( \begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} \) is \( \frac{1}{5} \begin{bmatrix} 4 & -3 \\ -1 & 2 \end{bmatrix} \).

Worked Example 2: Finding Unknown Entries

The inverse of \( \begin{bmatrix} 2m & 7 \\ 5 & 9 \end{bmatrix} \) is \( \begin{bmatrix} 9 & n \\ -5 & 4 \end{bmatrix} \). Find the values of m and n.

When the entries are unknown, the definition \( AB = I \) turns the problem into equations. Call the first matrix A and the second B.

Step 1: Since B is the inverse of A, their product is I:

\[ \begin{bmatrix} 2m & 7 \\ 5 & 9 \end{bmatrix} \begin{bmatrix} 9 & n \\ -5 & 4 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \]

Step 2: Multiplying row by column. The first entry is \( 2m \times 9 + 7 \times (-5) \), and the others follow in the same way:

\[ \begin{bmatrix} 18m - 35 & 2mn + 28 \\ 45 - 45 & 5n + 36 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \]

Step 3: Equating the first entries of the two equal matrices:

\[ 18m - 35 = 1 \]

Step 4: Adding 35 to both sides and dividing by 18:

\[ m = \frac{36}{18} = 2 \]

Step 5: Equating the last entries:

\[ 5n + 36 = 1 \]

Step 6: Subtracting 36 from both sides and dividing by 5:

\[ n = \frac{-35}{5} = -7 \]

So \( m = 2 \) and \( n = -7 \). As a check, the top right entry becomes \( 2 \times 2 \times (-7) + 28 = -28 + 28 = 0 \), exactly as the identity matrix needs.

Worked Example 3: Finding a Matrix from Its Inverse

The inverse of a matrix A is \( A^{-1} = \begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix} \). Find the matrix A.

The key fact is that a matrix and its inverse are inverses of each other, so A is the inverse of \( A^{-1} \). In symbols, \( (A^{-1})^{-1} = A \). So we find A by finding the inverse of the matrix we are given.

Step 1: Finding the determinant of the given matrix:

\[ |A^{-1}| = 1 \times 4 - 3 \times 2 = 4 - 6 = -2 \]

Step 2: Applying the inverse formula, swapping 1 and 4 and changing the signs of 3 and 2:

\[ (A^{-1})^{-1} = \frac{1}{-2} \begin{bmatrix} 4 & -3 \\ -2 & 1 \end{bmatrix} \]

Step 3: Dividing each entry by \( -2 \):

\[ (A^{-1})^{-1} = \begin{bmatrix} -2 & \frac{3}{2} \\ 1 & -\frac{1}{2} \end{bmatrix} \]

Step 4: Since \( (A^{-1})^{-1} = A \), this matrix is A:

\[ A = \begin{bmatrix} -2 & \frac{3}{2} \\ 1 & -\frac{1}{2} \end{bmatrix} \]

Careful with signs

Dividing by a negative determinant changes the sign of every entry. Here \( \frac{-3}{-2} = \frac{3}{2} \) is positive and \( \frac{4}{-2} = -2 \) is negative. Most wrong answers to this kind of question come from a lost minus sign.

Properties of Inverse Matrix

The inverse of a matrix obeys a small set of rules. In each of them, A and B are non-singular square matrices of the same order and I is the identity matrix of that order.

  • \( AA^{-1} = A^{-1}A = I \). A matrix multiplied by its inverse, in either order, gives the identity matrix.
  • \( (AB)^{-1} = B^{-1}A^{-1} \). The inverse of a product is the product of the inverses in the reverse order.
  • \( (A^{-1})^{-1} = A \). The inverse of the inverse is the original matrix.
  • \( (A^{T})^{-1} = (A^{-1})^{T} \). The inverse of the transpose is the transpose of the inverse.
  • \( I^{-1} = I \). The identity matrix is its own inverse, because \( II = I \).
  • \( |A^{-1}| = \frac{1}{|A|} \). The determinant of the inverse is the reciprocal of the determinant.

These rules can be seen working on a single matrix. Take \( A = \begin{bmatrix} 5 & 2 \\ 3 & 2 \end{bmatrix} \).

Step 1: Finding the determinant of A:

\[ |A| = 5 \times 2 - 2 \times 3 = 10 - 6 = 4 \]

Step 2: Finding the inverse with the three moves:

\[ A^{-1} = \frac{1}{4} \begin{bmatrix} 2 & -2 \\ -3 & 5 \end{bmatrix} \]

Step 3: Checking the determinant property. Each of the two rows carries a factor \( \frac{1}{4} \), so the determinant of the inverse is:

\[ |A^{-1}| = \frac{1}{16}(10 - 6) = \frac{4}{16} = \frac{1}{4} \]

This is \( \frac{1}{|A|} = \frac{1}{4} \), exactly as the property says.

Step 4: Checking the transpose property. Turning the rows of A into columns gives \( A^{T} \), whose determinant is also 4, so its inverse is:

\[ A^{T} = \begin{bmatrix} 5 & 3 \\ 2 & 2 \end{bmatrix}, \quad (A^{T})^{-1} = \frac{1}{4} \begin{bmatrix} 2 & -3 \\ -2 & 5 \end{bmatrix} \]

Step 5: Writing the transpose of \( A^{-1} \), turning its rows into columns:

\[ (A^{-1})^{T} = \frac{1}{4} \begin{bmatrix} 2 & -3 \\ -2 & 5 \end{bmatrix} \]

The two results are the same matrix, so \( (A^{T})^{-1} = (A^{-1})^{T} \) holds for this A. In the same way you can check that \( AA^{-1} = I \), and that finding the inverse of \( A^{-1} \) brings back A.

Worked Example 4: The Inverse of a Product

If \( A = \begin{bmatrix} 3 & 2 \\ 7 & 5 \end{bmatrix} \) and \( B = \begin{bmatrix} -2 & 7 \\ -3 & 9 \end{bmatrix} \), prove that \( (AB)^{-1} = B^{-1}A^{-1} \).

To prove an equation like this, work out each side on its own and show that both give the same matrix.

Step 1: Multiplying A by B, row by column:

\[ AB = \begin{bmatrix} -6 - 6 & 21 + 18 \\ -14 - 15 & 49 + 45 \end{bmatrix} \]

Step 2: Simplifying each entry:

\[ AB = \begin{bmatrix} -12 & 39 \\ -29 & 94 \end{bmatrix} \]

Step 3: Finding the determinant of AB:

\[ |AB| = (-12)(94) - (39)(-29) \]

\[ |AB| = -1128 + 1131 = 3 \]

Step 4: Using the inverse formula for the left side:

\[ (AB)^{-1} = \frac{1}{3} \begin{bmatrix} 94 & -39 \\ 29 & -12 \end{bmatrix} \quad \text{(i)} \]

Step 5: Finding the determinants of A and B:

\[ |A| = 15 - 14 = 1 \]

\[ |B| = -18 + 21 = 3 \]

Step 6: Finding the inverses of A and B with the three moves:

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

\[ B^{-1} = \frac{1}{3} \begin{bmatrix} 9 & -7 \\ 3 & -2 \end{bmatrix} \]

Step 7: Multiplying \( B^{-1} \) by \( A^{-1} \), row by column:

\[ B^{-1}A^{-1} = \frac{1}{3} \begin{bmatrix} 45 + 49 & -18 - 21 \\ 15 + 14 & -6 - 6 \end{bmatrix} \]

Step 8: Simplifying each entry:

\[ B^{-1}A^{-1} = \frac{1}{3} \begin{bmatrix} 94 & -39 \\ 29 & -12 \end{bmatrix} \quad \text{(ii)} \]

From (i) and (ii), both sides are the same matrix. Hence \( (AB)^{-1} = B^{-1}A^{-1} \) is proved.

Common mistake

The order reverses. For these same matrices, \( A^{-1}B^{-1} = \frac{1}{3} \begin{bmatrix} 39 & -31 \\ -54 & 43 \end{bmatrix} \), which is a different matrix. Matrix multiplication does not let you change the order, so \( (AB)^{-1} \) is in general not \( A^{-1}B^{-1} \).

Key idea

Think of putting on socks and then shoes. To undo it, the shoes come off first and the socks second. The last thing done is the first thing undone, and that is why the inverse of AB starts with \( B^{-1} \).

🔐

The full lesson is waiting for you

The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.