What Is a Matrix Inverse?
Given a square matrix A, its inverse A⁻¹ is the unique matrix satisfying A · A⁻¹ = A⁻¹ · A = I, where I is the identity matrix. An inverse exists if and only if A is non-singular — det(A) ≠ 0 (check with the determinant calculator), equivalently the rows of A are linearly independent.
The inverse reverses the linear transformation A applies. If A rotates vectors by 30°, then A⁻¹ rotates by −30°. If A scales a direction by factor k, then A⁻¹ scales it by 1/k. This makes matrix inversion central to solving linear systems, computing change-of-basis transformations, and reversing geometric operations in computer graphics.
Key properties (A, B invertible of the same size):
- (AB)⁻¹ = B⁻¹A⁻¹ — order reverses (socks-and-shoes rule)
- (Aᵀ)⁻¹ = (A⁻¹)ᵀ — transpose and inverse commute
- (kA)⁻¹ = (1/k) A⁻¹ for any scalar k ≠ 0
- (A⁻¹)⁻¹ = A — the inverse of the inverse is the original
- det(A⁻¹) = 1/det(A)
How to Use This Matrix Inverse Calculator
Select the matrix size (2×2, 3×3, or 4×4), enter each entry using Tab or arrow keys to navigate, then press Find Inverse. The calculator performs Gauss-Jordan elimination on the augmented matrix [A | I] and returns A⁻¹ with each row operation recorded. Click any step to expand it and see the full matrix state after that operation.
Entries can be integers (3, −7) or fractions (3/4, −2/5). The calculator stores all values as exact rational numbers, so there is no rounding at any stage. For singular matrices, the calculator detects the failure condition and tells you exactly why no inverse exists.
Worked Example 1: 2×2 Matrix
Find A⁻¹ for A = [[4, 7], [2, 6]].
For a 2×2 matrix [[a, b], [c, d]], the inverse is (1/(ad−bc)) · [[d, −b], [−c, a]]. Here det = 4·6 − 7·2 = 10, so:
A⁻¹ = (1/10) · [[6, −7], [−2, 4]] = [[3/5, −7/10], [−1/5, 2/5]]
Verify: A · A⁻¹ = (1/10) · [[4,7],[2,6]] · [[6,−7],[−2,4]] = (1/10) · [[10,0],[0,10]] = I. ✓
Worked Example 2: 3×3 Matrix via Gauss-Jordan
Find A⁻¹ for A = [[1, 2, 3], [0, 1, 4], [5, 6, 0]]. First compute det(A) = 1(0−24) − 2(0−20) + 3(0−5) = −24+40−15 = 1 ≠ 0. So A is invertible.
Set up the augmented matrix [A | I₃] and apply Gauss-Jordan:
[ 1 2 3 | 1 0 0 ]
[ 0 1 4 | 0 1 0 ]
[ 5 6 0 | 0 0 1 ]
After full Gauss-Jordan elimination:
A⁻¹ = [[ −24, 18, 5],
[ 20, −15, −4],
[ −5, 4, 1]]
Use the calculator above to see every elimination step in detail.
Worked Example 3: Singular Matrix — No Inverse
Consider B = [[1, 2], [2, 4]]. Row 2 = 2 × Row 1, so det(B) = 1·4 − 2·2 = 0. Attempting Gauss-Jordan on [B | I]:
[ 1 2 | 1 0 ] → R₂ − 2R₁ → [ 1 2 | 1 0 ]
[ 2 4 | 0 1 ] [ 0 0 | −2 1 ]
The left half has a zero row but the right half [−2, 1] ≠ 0. This is a contradiction — B is singular and has no inverse. The calculator reports this automatically.
Matrix Inverse vs. Division: An Important Distinction
Scalar division a/b is well-defined for any b ≠ 0. Matrix "division" A/B means multiplying by B⁻¹, and the result depends on the order: A · B⁻¹ and B⁻¹ · A are generally different matrices. This is why matrix algebra requires careful attention to multiplication order — the familiar commutativity of scalar arithmetic does not hold.
When solving Ax = b for x, the solution is x = A⁻¹b (left-multiply both sides by A⁻¹). Writing this as x = b/A or x = b·A⁻¹ would be incorrect because multiplication order matters.
Applications of Matrix Inversion
Matrix inversion is closely related to Gauss-Jordan elimination — the same algorithm that our RREF calculator uses on the coefficient matrix is applied to [A|I] here. For the underlying theory of why this works, see our Gauss-Jordan vs. Gaussian elimination guide. For a conceptual introduction to the linear algebra that makes inversion possible, see linear algebra basics.
Solving linear systems. For Ax = b with A invertible, x = A⁻¹b gives the unique solution — see our solving linear systems guide for all three solution types. In practice, Gaussian elimination (LU decomposition) is preferred for large systems, but explicit inversion is convenient for small matrices.
Cryptography. The Hill cipher encrypts by multiplying a plaintext vector by an invertible matrix mod 26. Decryption requires the modular matrix inverse.
Computer graphics. Camera view matrices, rotation, scaling, and projection transformations all require inversion to move between coordinate spaces. OpenGL, DirectX, and WebGL pipelines use matrix inversion extensively.
Statistics. Ordinary least squares regression: β̂ = (XᵀX)⁻¹ Xᵀy. The existence of the OLS solution depends on XᵀX being invertible (full column rank of X).
Control theory. State-space models require matrix inversion for computing transfer functions, stability analysis, and controller design.
Frequently Asked Questions
Does every matrix have an inverse?
No. Only square matrices with det(A) ≠ 0 (non-singular matrices) have inverses. Rectangular matrices and singular square matrices have no two-sided inverse.
How do I verify my answer?
Multiply A · A⁻¹. Every diagonal entry should be 1, every off-diagonal entry 0 (the identity matrix).
What is the fastest formula for a 2×2 inverse?
For A = [[a,b],[c,d]], A⁻¹ = (1/(ad−bc)) · [[d,−b],[−c,a]]. Swap the diagonal, negate the off-diagonal, divide by the determinant.
Can I invert a 1×1 matrix?
Yes. The inverse of [a] is [1/a], provided a ≠ 0.
Is there a difference between left and right inverses?
For square matrices they are the same. For rectangular matrices, a left inverse satisfies LA = I and a right inverse satisfies AR = I — these are generally different and not always available.
How is the inverse related to the adjugate?
A⁻¹ = (1/det(A)) · adj(A), where adj(A) is the transpose of the cofactor matrix. Practical for 2×2 and 3×3; inefficient for larger matrices.
Is the inverse unique?
Yes. If B and C both satisfy AB = BA = I and AC = CA = I, then B = BI = B(AC) = (BA)C = IC = C. So the inverse is unique.
Is this calculator free?
Yes, completely free. No sign-up, no usage limits.