๐Ÿงฎ Linear Algebra Kingdom ยท Linear Algebra

Inverse Matrices

The matrix that undoes another: invert a 2 by 2 with the formula, decide from a determinant whether an inverse exists at all, find one by reducing A beside the identity, solve a system with it, and collect the many equivalent ways of saying a matrix is invertible.

In short

  • A-1 is the matrix with A A-1 = A-1 A = I, and it exists exactly when det A is not zero.
  • For a 2 by 2: swap the main diagonal, change the sign of the other two entries, then divide by the determinant.
  • Row-reducing [A | I] until the left half is the identity leaves A-1 in the right half.
  • (AB)-1 = B-1 A-1 โ€” the order reverses, because matrix multiplication does not commute.

The matrix that undoes another

Pivot Warden Sela keeps the ledger of Pivot Hall, and the entry she trusts most is the one that can be read backwards. For numbers that is easy: 3 is undone by 1/3, because (3)(1/3) = 1. For matrices it is the same idea with a different 1.

The identity matrix I is the matrix with 1s down the main diagonal and 0s everywhere else. It is the do-nothing matrix: IA = A and AI = A for every A of the right shape. The inverse of a square matrix A, written A-1, is the matrix that satisfies

A A-1 = I and A-1 A = I

Two things are worth saying straight away, because both catch people out.

Not every matrix has one. The number 0 has no reciprocal, and a matrix whose determinant is 0 has no inverse. Such a matrix is called singular. It has flattened a direction away, and no matrix can bring back a direction that no longer exists.

A-1 is not a matrix of reciprocals. The inverse of [[2, 0], [0, 4]] is [[1/2, 0], [0, 1/4]] only because that matrix happens to be diagonal. In general the entries mix together completely, and inverting them one at a time gives nonsense.

The 2 by 2 formula, and reducing [A | I]

For a 2 by 2 there is a formula short enough to keep in your head:

A = [[a, b], [c, d]] => A-1 = (1 / (ad - bc)) * [[d, -b], [-c, a]]

Three things happen at once, and all three have to happen.

  • Swap the two entries on the main diagonal: a and d change places.
  • Change the sign of the other two: b and c pick up a minus.
  • Divide everything by the determinant ad - bc.

The bracket on its own โ€” [[d, -b], [-c, a]] โ€” is called the adjugate, and it always has whole entries when A does. That is why a textbook usually prints an inverse as a fraction in front of a whole-number matrix, like (1/7) * [[3, -1], [-2, 5]], rather than putting sevenths in every cell.

Forgetting the 1 over the determinant is the single most common slip with inverses, and it is easy to catch: multiply your answer by A and see whether the identity comes out.

For anything bigger than 2 by 2, the method is row reduction. Write A and the identity side by side as one wide matrix, [A | I], and row-reduce until the left half becomes the identity. Whatever the right half has turned into is A-1:

[A | I] -> ... -> [I | A-1]

If the left half cannot reach the identity โ€” a row of zeros appears โ€” then A is singular and the process stops there, which is the same verdict the determinant would have given.

There is also a shortcut for a single entry. The entry in row i, column j of A-1 is the (j, i) cofactor of A divided by det A. Notice the swap: the indices come out the other way round, because the adjugate is a transposed matrix of cofactors.

What an inverse is for, and the rules it obeys

Solving a system. A system of equations can be written as one matrix equation, Ax = b, where A holds the coefficients, x holds the unknowns and b holds the right-hand side. Undo it exactly as you would undo 3x = 12 โ€” by multiplying by whatever undoes the thing in front of x:

Ax = b => A-1 A x = A-1 b => x = A-1 b

The A-1 must go on the left of both sides. Matrix multiplication does not commute, so putting it on the right gives a different, wrong answer, and often one that is not even the right shape.

The rule for a product. The inverse of AB is not A-1B-1. The order reverses:

(AB)-1 = B-1 A-1

That is not a quirk to memorise but something you can check: (AB)(B-1A-1) = A(B B-1)A-1 = A I A-1 = I. Whatever undoes AB has to undo B first, because B is the matrix that acts first. Boots then socks, in reverse.

The invertible matrix theorem. For a square matrix A, the following all say the same thing. If one is true they are all true; if one is untrue they are all untrue.

  • A has an inverse.
  • det A is not zero.
  • A has a pivot in every column.
  • The columns of A are linearly independent.
  • Ax = 0 has only the zero solution.
  • Ax = b has exactly one solution, for every b.

That list is the reason this craft sits in the middle of the kingdom. Determinants, row reduction, independence and solution counting turn out to be six ways of asking one question: does this matrix still reach everywhere?

Worked examples

Example 1

A = [[3, 2], [1, 1]]. Find A-1.

  1. First the determinant: det A = (3)(1) - (2)(1) = 3 - 2 = 1. It is not zero, so an inverse exists.
  2. Swap the main diagonal and change the sign of the other two entries: the adjugate is [[1, -2], [-1, 3]].
  3. Divide by the determinant. Here det A = 1, so nothing changes: A-1 = [[1, -2], [-1, 3]].
  4. Check by multiplying: (3)(1) + (2)(-1) = 1 and (3)(-2) + (2)(3) = 0, which is the first row of the identity.

Example 2

A = [[4, 1], [3, 2]]. What is the entry in row 1, column 2 of A-1?

  1. det A = (4)(2) - (1)(3) = 8 - 3 = 5.
  2. The entry in row 1, column 2 of A-1 comes from the (2, 1) cofactor of A โ€” the indices swap, because the adjugate is transposed.
  3. Strike out row 2 and column 1 of A: the minor is 1. The sign for position (2, 1) is a minus, so the cofactor is -1.
  4. The entry is -1 / 5, that is -1/5. As a check, the whole inverse is (1/5) * [[2, -1], [-3, 4]].

Example 3

Solve Ax = b using an inverse, where A = [[2, 1], [1, 1]] and b = (7, 4).

  1. det A = (2)(1) - (1)(1) = 1, so A-1 = (1/1) * [[1, -1], [-1, 2]] = [[1, -1], [-1, 2]].
  2. The solution is x = A-1 b, with A-1 on the left of b.
  3. First component: (1)(7) + (-1)(4) = 3. Second component: (-1)(7) + (2)(4) = 1.
  4. So x = (3, 1). Check it in the original system: (2)(3) + 1 = 7 and 3 + 1 = 4.

Practice problems, with solutions

Three problems of increasing difficulty, each with the full working. In the game these are generated fresh every time; these three are fixed so this page always shows the same ones.

Problem 1

Difficulty 1 of 5

A = [[-1, -2], [-1, -3]], and det A = 1. Find A-1. Write the matrix row by row, entries separated by commas and rows by a semicolon, like 1,2;3,4.

Answer: [[-3,2],[1,-1]]

  1. A = [[a, b], [c, d]] with a = -1, b = -2, c = -1, d = -3.
  2. Swap a and d, and change the sign of b and c: the adjugate is [[-3, 2], [1, -1]].
  3. det A = (-1)*(-3) - (-2)*(-1) = 1. Dividing the adjugate by that determinant is the same as multiplying every entry by 1.
  4. So the answer is [[-3, 2], [1, -1]].

Problem 2

Difficulty 3 of 5

A = [[4, 4, -3], [-2, 4, -4], [-2, 2, 1]] Is A invertible, and what settles it?

  1. Yes, because det A = 76, which is not zero.
  2. Yes, because A has three rows and three columns.
  3. No, because det A = 0.
  4. No, because A is not symmetric.

Answer: A. Yes, because det A = 76, which is not zero.

  1. A square matrix has an inverse exactly when its determinant is not zero. A determinant of zero means the rows have collapsed onto one another.
  2. Expanding gives det A = 76.
  3. The determinant is not zero, so the inverse exists.

Problem 3

Difficulty 4 of 5

A = [[-3, 4, -3], [0, -4, -4], [0, 0, -2]] Reducing [A | I] turns the left half into the identity and leaves A-1 on the right. What is the entry in the 2nd row and the 3rd column of A-1? Give it as a fraction in lowest terms.

Answer: 1/2

  1. det A = -24.
  2. For the entry in the 2nd row and the 3rd column of A-1, strike out the 3rd row and the 2nd column of A.
  3. That minor is 12, and the sign for that position is -, so the cofactor is -12.
  4. The entry is -12 / (-24) = 1/2.

Common mistakes

  • Forgetting the 1 over the determinant and handing in the adjugate on its own.
  • Changing the sign of the main diagonal instead of swapping it, or swapping it without negating the other two entries.
  • Inverting the entries one at a time, as though A-1 were a matrix of reciprocals.
  • Writing (AB)-1 as A-1B-1, or multiplying by A-1 on the right of b instead of on the left.

What you should be able to do

  • Find the inverse of a 2 by 2 matrix, and decide from the determinant whether a matrix has one.
  • Find an entry of an inverse by reducing the matrix beside the identity.
  • Solve a matrix equation using an inverse.
  • Apply the rule for the inverse of a product, and recognise equivalent statements of invertibility.

Where this fits in the curriculum

Common Core

  • HSN-VM.C.10

    High school โ€” Understand that the zero and identity matrices play a role in matrix addition and multiplication similar to the role of 0 and 1 in the real numbers; the determinant of a square matrix is nonzero if and only if the matrix has a multiplicative inverse.

    HSN-VM.C.10 is a (+) standard โ€” beyond the college- and career-ready threshold, i.e. precalculus rather than Algebra II.

  • HSA-REI.C.9

    High school โ€” Find the inverse of a matrix if it exists and use it to solve systems of linear equations (using technology for matrices of dimension 3 ร— 3 or greater).

    HSA-REI.C.9 is a (+) standard โ€” beyond the college- and career-ready threshold, i.e. precalculus rather than Algebra II.

Learn these first