The inverse of a matrix A is the matrix A⁻¹ such that A × A⁻¹ = I. It exists only when the determinant is not zero. For a 2×2 matrix [[a,b],[c,d]] the inverse is 1 ÷ (ad − bc) times [[d,−b],[−c,a]].
How do you find the inverse of a matrix?
For a 2×2 matrix there is a shortcut: swap a and d, change the signs of b and c, and divide everything by the determinant ad − bc. For [[4,7],[2,6]] the determinant is 10, so the inverse is [[0.6, −0.7], [−0.2, 0.4]]. For larger matrices the standard method is Gauss-Jordan elimination: write A next to the identity matrix and apply row operations until the left side becomes I. What remains on the right is A⁻¹. That is what the calculator does, with partial pivoting for numerical stability.
When does the inverse not exist?
A matrix has no inverse if its determinant is zero. This happens when one row is a multiple or combination of the others, for example [[1,2],[2,4]]. The calculator tells you when the matrix is singular. In practice, matrices with a tiny determinant are numerically unstable even when mathematically invertible, so results can lose accuracy.
Why do we need inverses?
- Solving equations: if A·x = b, then x = A⁻¹·b. This is the matrix form of a system of linear equations.
- Undoing transformations: a rotation’s inverse is the opposite rotation, a scaling’s inverse is the reciprocal scale.
- Statistics: regression coefficients are computed with (XᵀX)⁻¹Xᵀy.
In real numerical work, solving A·x = b by elimination is usually preferred to calculating A⁻¹ explicitly, as it is faster and more stable.
Check your answer
The tool multiplies A by the computed inverse and displays the result, which should be the identity matrix (ones on the diagonal, zeros elsewhere), up to rounding. Always check this when you do the calculation by hand, too. For other operations on the same matrix, use the matrix calculator, and see why the determinant decides the question in the determinant calculator.
Worked example: a 3×3 inverse
Take A = [[2,1,1],[1,3,2],[1,0,0]], the default matrix in the calculator. Its determinant is −1, so it is invertible. The inverse is [[0,0,1],[−2,1,3],[3,−1,−5]]. You can verify it by multiplying: the first row of A (2, 1, 1) times the first column of A⁻¹ (0, −2, 3) gives 0 − 2 + 3 = 1, and times the second column (0, 1, −1) gives 0 + 1 − 1 = 0. Those are exactly the entries of the identity matrix. If one entry were off by even a fraction, the check table would show it immediately, which makes the tool useful for checking homework done by hand.
For a 2×2 matrix you can do the whole calculation in your head. Swap the diagonal, negate the others and divide by the determinant. For 3×3 and bigger, the adjugate method (cofactors) becomes slow, and Gauss-Jordan elimination is what both humans and computers prefer.
How to use this calculator
- Choose the matrix size (2×2, 3×3 or 4×4) and the operation.
- Type your numbers into the matrix grids. Decimals and negatives are fine.
- The result updates instantly, including checks such as A × A⁻¹.
- Change the operation to explore the same matrix in other ways.
Key figures at a glance
| 2×2 inverse | 1/(ad−bc) × [[d,−b],[−c,a]] |
|---|---|
| Exists if | det ≠ 0 |
| Method here | Gauss-Jordan elimination |
| Check | A × A⁻¹ = I |
Frequently asked questions
Swap the diagonal entries, negate the off-diagonal entries and divide by the determinant ad − bc.
No. Only square matrices with a non-zero determinant have an inverse.
The identity matrix I.
A square matrix with determinant zero, which has no inverse.
Yes, but in reverse order: (AB)⁻¹ = B⁻¹A⁻¹.