Inverse Matrix Calculator
Enter a square matrix and instantly compute its inverse using Gauss-Jordan elimination with partial pivoting.
Tip: Use decimals or fractions converted to decimals (e.g., 0.5 for 1/2).
What is an inverse matrix?
If you have a square matrix A, its inverse is another matrix A-1 such that:
A × A-1 = I and A-1 × A = I
Here, I is the identity matrix (ones on the diagonal and zeros elsewhere). In plain terms, the inverse “undoes” what the original matrix does. This is similar to how dividing by a number undoes multiplication by that number.
How to use this online inverse matrix calculator
- Select the matrix size (from 2×2 up to 6×6).
- Type values into each cell of the matrix.
- Click Calculate Inverse.
- Read the determinant, inverse matrix, and verification output.
The tool also includes quick actions: Fill Identity to generate a known invertible matrix, Load Example for a sample 3×3 matrix, and Clear to reset all inputs.
When does a matrix have an inverse?
A square matrix is invertible only if its determinant is non-zero. If the determinant equals zero (or is numerically extremely close to zero), the matrix is singular and has no inverse.
Common reasons a matrix is singular
- One row is a scalar multiple of another row.
- Rows or columns are linearly dependent.
- The matrix transformation collapses dimension (e.g., maps 3D into a plane).
Method used by this calculator
This calculator uses Gauss-Jordan elimination with partial pivoting:
- Form the augmented matrix [A | I].
- Apply row operations until the left side becomes I.
- The right side then becomes A-1.
Partial pivoting improves numerical stability by selecting the largest available pivot in each column. That reduces rounding issues in floating-point arithmetic.
Example: 2×2 inverse formula
For A = [[a, b], [c, d]], the inverse exists if ad - bc ≠ 0, and:
A-1 = (1 / (ad - bc)) × [[d, -b], [-c, a]]
For larger matrices (3×3 and above), direct formulas get cumbersome quickly, which is why elimination methods are preferred in software.
Why inverse matrices matter
1) Solving systems of linear equations
For Ax = b, one theoretical solution is x = A-1b. In practical numerical work, decomposition methods are often used directly, but inverses remain central in linear algebra concepts.
2) Computer graphics and robotics
Inverse transformation matrices are used for coordinate conversion, camera transforms, and motion control.
3) Statistics, optimization, and machine learning
Matrix inverses appear in regression formulas, covariance operations, and second-order optimization techniques.
Troubleshooting tips
- If you get an error, check for blank or non-numeric entries.
- Very large or very small numbers can increase rounding error.
- If determinant is near zero, matrix may be numerically ill-conditioned.
- Use fewer decimal places if your data comes from noisy measurements.
Frequently asked questions
Can this compute inverse for non-square matrices?
No. Standard matrix inverse is defined only for square matrices. For non-square cases, you may need a pseudo-inverse.
What is the largest size supported here?
This page supports up to 6×6 for usability and readability in a browser form layout.
Does this calculator show exact fractions?
It computes with decimal floating-point arithmetic and displays rounded decimal values.
Related matrix tools
- Determinant calculator
- Matrix multiplication calculator
- Gaussian elimination solver
- Eigenvalue and eigenvector calculator
Use this online inverse matrix calculator whenever you need a quick, reliable inverse for educational work, engineering checks, or data analysis tasks.