How to find the inverse of a matrix
Gauss-Jordan elimination on [A | I], the adjugate formula and the 2×2 shortcut — with the conditions a matrix must satisfy to be invertible.
The inverse A⁻¹ of a square matrix is the matrix that undoes it: A·A⁻¹ = A⁻¹·A = I. It exists only when det(A) ≠ 0. A matrix with zero determinant is called singular, and it has no inverse at all — not a big one, not an approximate one, none.
The 2×2 shortcut
Swap the diagonal, negate the off-diagonal, divide by the determinant:
| a | b |
| c | d |
| d | −b |
| −c | a |
Gauss-Jordan on the augmented matrix
This is the general method and the one our calculator shows step by step. Write A next to the identity matrix, then run row operations until the left half becomes the identity. Whatever the right half turned into is A⁻¹:
| 4 | 7 | 1 | 0 |
| 2 | 6 | 0 | 1 |
| 1 | 0 | 3/5 | −7/10 |
| 0 | 1 | −1/5 | 2/5 |
If at some point a row on the left becomes all zeros, stop: the matrix is singular and the inverse does not exist.
The adjugate (cofactor) formula
A⁻¹ = adj(A) / det(A), where the adjugate is the transpose of the cofactor matrix. Build the matrix of cofactors C(i,j) = (−1)^(i+j)·M(i,j), transpose it, divide by the determinant.
It is elegant and it is what proofs use, but it needs n² determinants of size n−1. Beyond 3×3, use Gauss-Jordan.
Useful checks and properties
- Always verify: multiply your answer by the original and confirm you get the identity.
(A·B)⁻¹ = B⁻¹·A⁻¹— the order reverses.(Aᵀ)⁻¹ = (A⁻¹)ᵀ- An orthogonal matrix satisfies
A⁻¹ = Aᵀ, which makes inversion free. - To solve
Ax = b, do not computeA⁻¹and multiply. Row-reduce[A | b]instead — fewer operations and better numerical accuracy.