Matrix Inverse Calculator
Find the inverse of a square matrix with Gauss–Jordan elimination, with the determinant and a verification A × A⁻¹ = I. The inverse satisfies A·A⁻¹ = I. Example: with square matrix 4 7 / 2 6, the result is Inverse matrix A⁻¹ = [ 0.6 -0.7 ] [ -0.2 0.4 ].
Last updated · By S. Dilshan · Runs in your browser, nothing is uploaded
Step-by-Step Solution
How do you use the Matrix Inverse Calculator?
Enter a square matrix up to 6 × 6. The calculator runs Gauss–Jordan elimination with partial pivoting, returns the inverse and multiplies it back to show the error against the identity matrix. Singular matrices are reported with their determinant.
What formula does the Matrix Inverse Calculator use?
The inverse satisfies A·A⁻¹ = I. For a 2 × 2 matrix, A⁻¹ = (1/(ad − bc)) · [d −b; −c a]. In general, row-reduce the augmented matrix [A | I] until the left half becomes I; the right half is then A⁻¹.
Worked example: Square matrix 4 7 / 2 6
For [4 7; 2 6] the determinant is 24 − 14 = 10, so the inverse is (1/10)[6 −7; −2 4] = [0.6 −0.7; −0.2 0.4]. Multiplying back gives the identity matrix.
With the default values the calculator returns Inverse matrix A⁻¹ = [ 0.6 -0.7 ] [ -0.2 0.4 ]; Determinant = 10; Check: largest error in A × A⁻¹ − I = 2.22e-16.
Where Is This Calculation Used?
Matrix inverses solve linear systems (x = A⁻¹b), undo geometric transformations in graphics and appear in regression formulas. In numerical work, solving the system directly is more accurate than forming the inverse, but small examples are ideal for understanding.
A matrix whose determinant is close to zero is nearly singular, and its inverse amplifies rounding errors; the larger the condition number, the less reliable the answer. To solve Ax = b, numerical software uses elimination rather than forming A⁻¹, which is faster and more accurate. Useful properties: (AB)⁻¹ = B⁻¹A⁻¹, (Aᵀ)⁻¹ = (A⁻¹)ᵀ and det(A⁻¹) = 1/det(A).
What are the most common mistakes with the Matrix Inverse Calculator?
- Trying to invert a singular matrix (determinant 0).
- Inverting entries one by one instead of the whole matrix.
- Assuming (AB)⁻¹ = A⁻¹B⁻¹; the order reverses to B⁻¹A⁻¹.
What Is the Tested Example for the Default Values?
This example is computed by the same code that powers the calculator above, so you can compare it with your own numbers or a textbook answer.
| Input: Square matrix | 4 7 / 2 6 |
|---|---|
| Inverse matrix A⁻¹ | [ 0.6 -0.7 ] [ -0.2 0.4 ] |
| Determinant | 10 |
| Check: largest error in A × A⁻¹ − I | 2.22e-16 |
Where Can You Verify These Formulas?
The definitions and formulas on this page follow standard references. Check them against these sources:
Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.
Frequently Asked Questions
How do you find the inverse of a matrix?
Row-reduce [A | I] to [I | A⁻¹], or for 2 × 2 swap the diagonal, negate the off-diagonal and divide by the determinant.
When does a matrix not have an inverse?
When its determinant is zero, meaning it is singular.
How do I check the inverse?
Multiply A by A⁻¹; the result should be the identity matrix.