Matrix Inverse Calculator
The inverse of a matrix A is a matrix A-inverse such that A times A-inverse equals the identity matrix I. For a 2 by 2 matrix this means when you multiply the two matrices together you get a matrix with ones on the diagonal and zeros everywhere else. Finding a matrix inverse is fundamental in linear algebra and appears throughout applied mathematics: solving systems of simultaneous equations, computing least-squares regression coefficients, performing linear transformations in computer graphics, and inverting covariance matrices in statistics. Not every square matrix has an inverse. A matrix is invertible only if its determinant is non-zero. When the determinant is zero the matrix is called singular, meaning it collapses space along at least one dimension and the transformation cannot be reversed. For a 2 by 2 matrix the formula for the inverse is straightforward: swap the diagonal elements, negate the off-diagonal elements, and divide through by the determinant. For a 3 by 3 matrix the method uses cofactors and the adjugate matrix. This calculator supports both 2 by 2 and 3 by 3 matrices. Enter the matrix elements, choose the size, and the calculator returns the determinant, the full inverse matrix to four decimal places, and a numerical verification that multiplying the original matrix by its inverse gives the identity. If the determinant is zero it reports that the matrix is singular.
det = 0 means the matrix is singular (no inverse exists). Result shown to 4 decimal places.
Inverse matrix A-1:
A x A-inv = I verified (max element error: 4.44e-16)
How it works
For a 2×2 matrix [a, b; c, d]: det = ad - bc. If det ≠ 0, the inverse is (1/det) × [d, -b; -c, a].
For a 3×3 matrix, the determinant is computed by cofactor expansion along the first row. The cofactor matrix replaces each element with the signed determinant of its 2×2 minor. The adjugate is the transpose of the cofactor matrix. The inverse is adjugate divided by det. Verification multiplies A by A-1 and checks the result is close to the identity matrix.
Worked example
2×2 matrix A = [4, 7; 2, 6]. Determinant = (4×6) - (7×2) = 24 - 14 = 10. Inverse = (1/10) × [6, -7; -2, 4] = [0.6, -0.7; -0.2, 0.4]. Verify: [4,7;2,6] × [0.6,-0.7;-0.2,0.4] = [4×0.6+7×(-0.2), 4×(-0.7)+7×0.4; ...] = [1,0;0,1]. These match the defaults pre-filled above.
Related calculators
- Implicit Differentiation Calculator: find dy/dx for implicit equations using partial derivatives.
- Effect Size Calculator: Cohen's d and eta squared for statistical comparisons.
- Law of Sines and Cosines: solve triangle sides and angles.
- Percent Error Calculator: compare a computed value to a reference.