Matrix Inverse Calculator

Find the inverse of a matrix up to 5×5 using the cofactor/adjugate method, with step-by-step cofactor table, verification A×A⁻¹=I, condition number analysis, and singular detection.

Matrix A (3×3)
⚠ Singular Matrix

det(A) = 0.000000. The matrix is not invertible because its determinant is zero.

Determinant
0.000000
Zero — matrix is singular
Invertible
No ✗
No inverse exists
Trace of A
0.00
Sum of diagonal elements
‖A‖_F
0.0000
Frobenius norm of original

Inverse Properties

PropertyFormulaDescription
Existencedet(A) ≠ 0A⁻¹ exists iff A is non-singular
UniquenessAA⁻¹ = A⁻¹A = IThe inverse is unique when it exists
Product Rule(AB)⁻¹ = B⁻¹A⁻¹Inverse of product reverses order
Transpose Rule(Aᵀ)⁻¹ = (A⁻¹)ᵀInverse and transpose commute
Determinantdet(A⁻¹) = 1/det(A)Inverse det is reciprocal
Double Inverse(A⁻¹)⁻¹ = AInverting twice returns original
Scalar Rule(kA)⁻¹ = (1/k)A⁻¹For scalar k ≠ 0
Planning notes, formulas, and examples

About the Matrix Inverse Calculator

The inverse of a square matrix A, denoted A⁻¹, is the unique matrix such that AA⁻¹ = A⁻¹A = I, where I is the identity matrix. Not every matrix has an inverse — a matrix is invertible (non-singular) if and only if its determinant is non-zero. Singular matrices with zero determinant have no inverse.

This calculator computes the inverse using the classical adjugate method: A⁻¹ = adj(A)/det(A), where adj(A) is the transpose of the cofactor matrix. For each element, it calculates the minor (the determinant of the submatrix obtained by deleting that row and column), applies the checkerboard sign pattern to get the cofactor, and assembles the cofactor matrix. Transposing the cofactor matrix gives the adjugate, and dividing by the determinant gives the inverse.

The calculator provides a complete step-by-step breakdown: the cofactor matrix with each minor determinant and sign, the adjugate matrix, and the final inverse. It then verifies the result by computing A × A⁻¹ and checking that it equals the identity matrix.

The condition number κ(A) = ‖A‖‖A⁻¹‖ measures how sensitive the inverse is to small changes in A. A large condition number indicates an ill-conditioned matrix where numerical errors can be amplified during inversion. The visual condition scale helps you quickly assess whether your matrix is well-conditioned, moderately conditioned, or ill-conditioned.

When This Page Helps

Computing a matrix inverse via the adjugate method requires calculating n² cofactors (each a sub-determinant), transposing, and dividing by the main determinant — even a 3×3 matrix involves nine 2×2 determinants. This calculator performs the full inversion with verification (A·A⁻¹ = I), reports the condition number for numerical stability, and shows the adjugate and cofactor matrices. It is essential for students checking homework, engineers verifying symbolic inverses, and anyone needing a quick invertibility check.

How to Use the Inputs

  1. Select the matrix size (2×2 to 5×5)
  2. Enter the matrix elements or load a preset
  3. Check whether the matrix is singular (determinant = 0)
  4. Enable "Show Steps" to see the cofactor and adjugate matrices
  5. View the inverse matrix and verification A × A⁻¹ = I
  6. Check the condition number to assess numerical stability
Formula used
A⁻¹ = (1/det(A)) × adj(A), where adj(A) = Cᵀ (transpose of cofactor matrix), Cᵢⱼ = (−1)^(i+j) × Mᵢⱼ

Example Calculation

Result: A⁻¹ = [[0.6,−0.7],[−0.2,0.4]]

det(A) = 4×6 − 7×2 = 10. adj(A) = [[6,−7],[−2,4]]. A⁻¹ = (1/10)×adj(A) = [[0.6,−0.7],[−0.2,0.4]]. Verify: AA⁻¹ = I ✓

Tips & Best Practices

  • Always check the determinant first — if it's zero, no inverse exists
  • A large condition number means the inverse may be numerically unreliable
  • The inverse of a diagonal matrix is the diagonal of reciprocals: diag(1/a₁, 1/a₂,...)
  • For 2×2 matrices: [[a,b],[c,d]]⁻¹ = (1/(ad−bc))×[[d,−b],[−c,a]]
  • The inverse of an orthogonal matrix equals its transpose: Q⁻¹ = Qᵀ

The Adjugate (Cofactor) Method

The classical formula A⁻¹ = adj(A)/det(A) works by computing the cofactor matrix C (where Cᵢⱼ = (−1)^(i+j) det(Mᵢⱼ)), transposing it to get the adjugate, and dividing every entry by det(A). For a 2×2 matrix [[a,b],[c,d]], the inverse is (1/(ad−bc))[[d,−b],[−c,a]] — swap the diagonals and negate the off-diagonals. This method is O(n!) and impractical for large matrices, but it produces exact symbolic results and reveals the deep connection between cofactors, determinants, and inverses.

Row Reduction Method and Numerical Computation

A more efficient approach augments [A|I] and row-reduces to [I|A⁻¹]. This is equivalent to LU decomposition and costs O(n³) operations. Numerical libraries (LAPACK, NumPy) use LU with partial pivoting for matrix inversion. The **condition number** κ(A) = ‖A‖·‖A⁻¹‖ measures how much input errors are amplified: κ ≈ 1 is well-conditioned, while κ > 10³ warns that the inverse may be unreliable in floating-point arithmetic.

When and Why to Invert Matrices

In theory, solving Ax = b via x = A⁻¹b is clean, but in practice, computing A⁻¹ explicitly is rarely necessary — LU decomposition solves the system directly without forming the inverse, which is faster and more numerically stable. Explicit inverses are needed in **control theory** (transfer functions), **statistics** (precision matrices, Fisher information), and **closed-form formulas** where symbolic inverses appear. The inverse of an orthogonal matrix is simply its transpose (Q⁻¹ = Qᵀ), and diagonal matrices invert by reciprocating each diagonal entry.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • A singular matrix has a determinant of zero and no inverse. Geometrically, it maps some non-zero vectors to zero, collapsing dimensions. The rows (or columns) are linearly dependent.