The inverse of a square matrix A is the matrix A⁻¹ that undoes it: A × A⁻¹ = A⁻¹ × A = I, the identity. This calculator finds that inverse exactly, as fractions, for matrices up to 6 × 6, and shows the work either as Gauss–Jordan row operations or through the adjugate (classical adjoint) formula.
How to use the matrix inverse calculator
- Type the square matrix, one row per line, with entries separated by spaces or commas. Fractions such as 1/3 are accepted.
- Choose the method for the steps: Gauss–Jordan (row-reduce [A | I]) or Adjugate ÷ determinant.
- Read A⁻¹ on the tape. Below it you’ll find the full result, decimal approximations when fractions appear, and the A × A⁻¹ = I check.
If the matrix is singular, the tape says so and the steps show the column where no pivot can be found.
Inverse formulas
The 2 × 2 shortcut
Gauss–Jordan elimination
Write the augmented matrix [A | I] and apply row operations — swap rows, divide a row by its pivot, subtract multiples of the pivot row — until the left half becomes I. Whatever those operations turned I into is A⁻¹. Each row operation is itself a matrix multiplication, so performing them all amounts to multiplying by A⁻¹.
Adjugate method
Each cofactor is Cij = (−1)i+j det(Mij). This formula is elegant for 2 × 2 and 3 × 3 matrices but becomes slow beyond that, because it needs many smaller determinants.
Worked example
Invert the matrix with rows (4, 7) and (2, 6).
Determinant: 4 × 6 − 7 × 2 = 24 − 14 = 10, which is not zero, so the inverse exists.
Adjugate: swap 4 and 6, negate 7 and 2 → rows (6, −7) and (−2, 4).
Divide by 10: A⁻¹ has rows (0.6, −0.7) and (−0.2, 0.4).
Check: row 1 of A times column 1 of A⁻¹ is 4(0.6) + 7(−0.2) = 2.4 − 1.4 = 1, and row 1 times column 2 is 4(−0.7) + 7(0.4) = 0. ✓
The calculator’s default 3 × 3 example, with rows (2, 1, 1), (1, 3, 2) and (1, 0, 0), has determinant −1, so its inverse contains only integers: rows (0, 0, 1), (−2, 1, 3) and (3, −1, −5).
Properties of the inverse
- Uniqueness. An invertible matrix has exactly one inverse.
- Product rule. (AB)⁻¹ = B⁻¹A⁻¹ — the order reverses, like taking off shoes and socks.
- Transpose. (Aᵀ)⁻¹ = (A⁻¹)ᵀ.
- Determinant. det(A⁻¹) = 1 / det(A), so a matrix that scales volume by 10 has an inverse that scales it by 1/10.
- Identity and diagonal matrices. The identity is its own inverse; a diagonal matrix inverts entry by entry, as long as no diagonal entry is 0.
When there is no inverse
A singular matrix collapses some direction completely — for example, it might map an entire line of vectors to zero. Information is lost, so nothing can reverse it. Practical signs of a singular matrix are a row that is a multiple of another row, a row of zeros, or a determinant of zero from the matrix determinant calculator.
Nearly singular matrices are a related hazard in real data: the inverse exists but contains huge entries, so tiny measurement errors get amplified. Exact fractions sidestep rounding here, but if your entries come from measurements, treat very large inverse entries with caution.
For multiplying the inverse by other matrices, use the matrix calculator; for a single system of two or three equations, the system of linear equations calculator is the quicker route.
Frequently asked questions
When does a matrix have an inverse?
Exactly when it is square and its determinant is not zero. Such a matrix is called invertible or non-singular. If the determinant is 0, the calculator explains where Gauss–Jordan elimination breaks down.
What is the quick rule for a 2 × 2 inverse?
Swap the two diagonal entries, change the signs of the other two, and divide everything by the determinant ad − bc. For rows (4, 7) and (2, 6), the determinant is 10 and the inverse has rows (0.6, −0.7) and (−0.2, 0.4).
Why are the answers fractions?
Inverting divides by the determinant, so fractions appear naturally. The calculator keeps them exact and also lists decimal approximations, which avoids the rounding drift you get from working with decimals by hand.
How can I check an inverse?
Multiply the original matrix by the inverse. The product must be the identity matrix, with 1s on the diagonal and 0s elsewhere. The calculator performs this check on every result.
Should I use the inverse to solve a system of equations?
It works, since x = A⁻¹b, but elimination is faster and more accurate for a single system. The inverse pays off when you must solve many systems with the same coefficient matrix.