Inverse Matrices
Find the inverse of a 2 × 2 matrix by formula and of larger matrices by Gauss–Jordan elimination, solve Ax = b with A⁻¹, and know when no inverse exists.
Welcome back!
Step 1 of 12Learn
Undoing a transformation
A spy encodes a message by converting letters to numbers, grouping them in pairs and multiplying each pair by A = [2 1; 5 3]. The pair (8, 9), for "HI," becomes (2·8 + 9, 5·8 + 3·9) = (25, 67). How does the receiver decode (25, 67)?
She needs a matrix that undoes A: the inverse, A⁻¹, defined by
AA⁻¹ = A⁻¹A = I.
For this A, the inverse is A⁻¹ = [3 −1; −5 2]. Check: [3 −1; −5 2](25, 67) = (75 − 67, −125 + 134) = (8, 9). The message is recovered.
Only square matrices can have inverses, and not all of them do. A matrix with an inverse is invertible (or nonsingular); one without is singular.
Why might a matrix have no inverse? Consider [1 2; 2 4]. It sends (2, −1) to (0, 0), and it sends (0, 0) to (0, 0) too. Two different inputs give the same output, so no matrix can reverse it: given the output (0, 0), there's no way to know which input it came from. Geometrically, this matrix squashes the whole plane onto a line, destroying information. An invertible matrix never loses information like that.
The inverse of a 1 × 1 matrix [a] is [1/a], which exists only when a ≠ 0. That's the pattern for all sizes: an inverse exists exactly when a certain number, the determinant, is nonzero.
Step 2 of 12Diagram
Encode with A, decode with A⁻¹
Tap a shape with to see more.
- "HI" → (8, 9)
- Multiply by A = [2 1; 5 3]
- Sent: (25, 67)
Looks like nonsense to an eavesdropper without A.
- Multiply by A⁻¹
A⁻¹A = I, so the original pair comes back.
- (8, 9) → "HI"
Step 3 of 12Practice · True or false
Every square matrix has an inverse.
Step 4 of 12Learn
The 2 × 2 formula
For a 2 × 2 matrix there's a quick formula. If A = [a b; c d], then
A⁻¹ = (1/(ad − bc)) · [d −b; −c a],
provided ad − bc ≠ 0. In words: swap the diagonal entries, negate the off-diagonal entries, and divide everything by ad − bc.
The number ad − bc is the determinant of A, written det A. When it's zero, the formula would divide by zero, and indeed the matrix is singular.
Example. A = [4 7; 2 6]. Then det A = 24 − 14 = 10, and
A⁻¹ = (1/10)[6 −7; −2 4] = [0.6 −0.7; −0.2 0.4].
Check one entry of AA⁻¹: row 1 of A times column 1 of A⁻¹ is 4(0.6) + 7(−0.2) = 2.4 − 1.4 = 1. Good.
For the spy's matrix [2 1; 5 3], det = 6 − 5 = 1, so the inverse is just [3 −1; −5 2], with no fractions. Codes like this, called Hill ciphers, choose matrices with determinant ±1 (or one that is invertible modulo 26) so that decoding stays in whole numbers.
Solving systems. If A is invertible, Ax = b has exactly one solution, x = A⁻¹b. For the system 4x + 7y = 1, 2x + 6y = 2, multiply: x = [0.6 −0.7; −0.2 0.4](1, 2) = (−0.8, 0.6).
Step 5 of 12Practice · Work it out
Find the inverse of A = [3 5; 1 2]. What is the entry in row 1, column 2 of A⁻¹?
Step 6 of 12Try the calculator
2 × 2 inverse calculator
Swap the diagonal, negate the off-diagonal, divide by the determinant. Make ad − bc close to 0 and watch the inverse entries explode.
- Determinant ad − bc
- 1
- A⁻¹ row 1, col 1
- 3
- A⁻¹ row 1, col 2
- -1
- A⁻¹ row 2, col 1
- -5
- A⁻¹ row 2, col 2
- 2
Step 7 of 12Learn
Larger inverses by Gauss–Jordan
For 3 × 3 and larger matrices, the reliable method is row reduction. Put A and the identity side by side, [A | I], and row reduce until the left side becomes I. The right side is then A⁻¹:
[A | I] → [I | A⁻¹].
Why does this work? Each row operation is the same as multiplying on the left by a simple matrix. If a sequence of operations turns A into I, their combined effect is a matrix E with EA = I, so E = A⁻¹. Applying the same operations to I produces EI = E = A⁻¹.
If the left side can't be turned into I, because a row of zeros appears, then A is singular and has no inverse.
Useful rules for inverses:
- (A⁻¹)⁻¹ = A: undoing the undo gets you back.
- (AB)⁻¹ = B⁻¹A⁻¹: the order reverses, like taking off shoes before socks.
- (Aᵀ)⁻¹ = (A⁻¹)ᵀ.
- (cA)⁻¹ = (1/c)A⁻¹ for c ≠ 0.
A practical note. Although x = A⁻¹b is a beautiful formula, software almost never computes an inverse to solve a system. Elimination directly on [A | b] takes about a third of the work and is more accurate. The inverse is mainly a theoretical tool, and a practical one when you need to solve Ax = b for many different b with the same A.
Step 8 of 12Flashcards
The invertible matrix theorem (partial list)
Tap a card to flip it.
Step 9 of 12Note
Step 10 of 12Practice · Spot the mistake
A student used the rule for inverses of products. Which line is wrong?
Step 11 of 12Practice · Work it out
Use A⁻¹ = [3 −1; −5 2] to decode the spy message (13, 36). What is the first entry of the decoded pair?
Step 12 of 12Practice · Choose one
A 3 × 3 matrix A row reduces to a matrix with a row of zeros. Which statement is true?
Lesson complete!