Matrix Inverse
Step through Gauss-Jordan elimination on [A | I] and watch the identity matrix turn into the inverse. Try a singular matrix to see where it breaks.
Matrix A (integers)
Determinant
det(A) = 10
det(A) ≠ 0, so A is invertible. Gauss-Jordan elimination will turn [A | I] into [I | A⁻¹].
Step 1 of 6
Start with [A | I]
Write A next to the identity matrix. Every row operation is applied to the whole row, both halves.
Row operations
2×2 shortcut: the adjugate formula
Swap the diagonal entries, negate the off-diagonal entries, then divide by the determinant.
What is an inverse matrix?
The inverse of a square matrix A is the matrix A⁻¹ that undoes it: multiplying them in either order gives the identity, AA⁻¹ = A⁻¹A = I. If A rotates, stretches or shears the plane, A⁻¹ puts every point back where it started.
Not every matrix has an inverse. If A flattens space onto a line or a point, different inputs land on the same output and there is no way to tell them apart afterwards. That happens exactly when det(A) = 0. Such a matrix is called singular.
Gauss-Jordan elimination finds the inverse with row operations. Each row operation is the same as multiplying on the left by an elementary matrix E. If a sequence of them turns A into I, then Ek…E1A = I, so Ek…E1 = A⁻¹. Applying the same operations to I (the right half of [A | I]) builds exactly that product.
The three row operations
Swap two rows
Scale a row
Add a multiple of another row
Key formulas
Definition
A·A⁻¹ = A⁻¹·A = I
Gauss-Jordan
[A | I] → row operations → [I | A⁻¹]
2×2 inverse (adjugate formula)
A⁻¹ = 1/(ad − bc) × [[d, −b], [−c, a]]
- A
- [[a, b], [c, d]]
- ad − bc
- the determinant; must be non-zero
General adjugate formula and useful rules
A⁻¹ = adj(A) / det(A)
(AB)⁻¹ = B⁻¹A⁻¹
det(A⁻¹) = 1 / det(A)
Watch the order
The inverse of a product reverses the order: (AB)⁻¹ = B⁻¹A⁻¹, just as you take off your shoes before your socks.How to use this visualizer
- 1Choose a 2×2 or 3×3 matrix and type integer entries, or load one of the presets.
- 2Check the determinant. If it is 0 the matrix is singular and has no inverse.
- 3Press Next step to apply one row operation at a time. The changed row is highlighted in amber, the row used to change it in blue, and the current pivot is outlined.
- 4Click any operation in the list to jump straight to it.
- 5At the last step the left half is I and the right half is A⁻¹. For a 2×2 matrix, compare it with the adjugate formula below the steps.
- 6Load the Singular preset to see elimination stop when a column has no pivot.
Where inverses are used
Solving linear systems
Computer graphics
Cryptography
Statistics
Practice problems
Problem 1: Invert a 2×2 matrix
Show solutionHide solution
det(A) = 3×2 − 5×1 = 1
A⁻¹ = 1/1 × [[2, −5], [−1, 3]]
A⁻¹ = [[2, −5], [−1, 3]]
Check: row 1 of A times A⁻¹ = [3×2 + 5×(−1), 3×(−5) + 5×3] = [1, 0]
Row 2 of A times A⁻¹ = [1×2 + 2×(−1), 1×(−5) + 2×3] = [0, 1]. So AA⁻¹ = I.
Problem 2: Solve a system with the inverse
Show solutionHide solution
det(A) = 4×6 − 7×2 = 10
A⁻¹ = 1/10 × [[6, −7], [−2, 4]]
x = A⁻¹b = 1/10 × [6×15 − 7×10, −2×15 + 4×10]
= 1/10 × [20, 10]
x = 2, y = 1
Check: 4(2) + 7(1) = 15 and 2(2) + 6(1) = 10.
Discussion
Questions, ideas or a different approach? Join the conversation.