What this calculator does
The inverse of a square matrix is the matrix that undoes it: multiplied together, they give the identity matrix. Not every matrix has one. A zero determinant means the matrix collapses a direction, so there is no way back, and the inverse does not exist. This calculator uses Gauss-Jordan elimination, which applies the same row operations to the matrix and to an identity matrix until the left side becomes the identity and the right side becomes the inverse.
How to use it
- Choose the matrix size: 2×2, 3×3, or 4×4.
- Enter the entries left to right, row by row, for that size.
- Read the determinant to see whether the matrix is invertible.
- Inspect the inverse in the table below the result.
- Check the identity error to confirm the numerical quality.
How it works
Example calculations
Example 1: a 2×2 inverse
For [[4, 7], [2, 6]] the determinant is 10, so the matrix is invertible. The inverse is 1/10 × [[6, −7], [−2, 4]], which is [[0.6, −0.7], [−0.2, 0.4]]. Multiplying back gives the identity to within rounding error.
Example 2: a 3×3 inverse
For [[2, 1, 0], [1, 2, 1], [0, 1, 2]] the determinant is 4, so the inverse exists and is [[0.75, −0.5, 0.25], [−0.5, 1, −0.5], [0.25, −0.5, 0.75]]. The trace of the inverse is 2.5, and the identity check passes.
Example 3: a singular matrix
For [[1, 2], [2, 4]] the determinant is 1×4 − 2×2 = 0, so the matrix is singular and has no inverse. The second row is a multiple of the first, which means the matrix sends two different input directions to the same output, so it cannot be undone.
What the result means
The determinant is the fastest invertibility test. A value of exactly zero means no inverse; a value very close to zero means an inverse that exists mathematically but is numerically fragile, because small input errors become large output errors. That is why the calculator uses a pivot tolerance scaled to the largest entry and reports a singular or near-singular matrix as not invertible. The identity check is the practical quality measure: if multiplying the matrix by its inverse produces the identity to about 10^−6, the result is usable.
Common mistakes
- Trying to invert a non-square matrix.
- Ignoring a determinant of zero and dividing by it anyway.
- Entering a 3×3 matrix in column order instead of row order.
- Assuming tiny rounding errors in the identity check mean failure.
- Confusing the inverse with the transpose.
Assumptions and limits
- Only square matrices of size 2, 3, or 4 are accepted.
- Entries are real numbers within the field range.
- Elimination uses partial pivoting for numerical stability.
- A pivot smaller than a scaled tolerance is treated as zero.
- Printed inverse entries are rounded to six decimal places.
Frequently asked questions
When does a matrix have no inverse?
When its determinant is zero. That means its rows or columns are linearly dependent, so the transformation is not reversible.
What is the identity matrix?
The square matrix with ones on the diagonal and zeros elsewhere. Multiplying any compatible matrix by it returns the original matrix.
Why is my inverse reported as not defined?
The determinant came out at or extremely close to zero, so the pivot test failed. Check for rows that are multiples of each other or for a typo.
What does the verification error mean?
It is the largest absolute difference between the matrix times its inverse and the identity. A value near zero, such as 10^−15, is normal floating-point rounding.
Can I invert a 4×4 matrix by hand?
It is possible with cofactors but long and error-prone. Gauss-Jordan elimination is the practical method, and that is what this calculator uses.
Sources
2026 update
How to use the professional output
This page is not just a formula box. The result is designed to be checked, compared, and taken away.
- Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
- A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
- Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.
The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.