Skip to content
Calcrivo

Matrix Inverse Calculator

Compute the inverse of a square matrix via LU decomposition with singularity detection.

Inputs

A⁻¹

3 -1 -5 2

Determinant

1.00000000

Step by step

  1. Matrix A

    = 2 1 5 3

  2. det(A)

    = 1

  3. A⁻¹ (via LU with partial pivoting)

    = 3 -1 -5 2

How it works

The inverse A⁻¹ of a square matrix A satisfies A·A⁻¹ = I. This calculator uses LU decomposition with partial pivoting for numerical stability. If the matrix is singular (determinant effectively zero given a tolerance of 1e-12), no inverse exists.

Formulas

Inverse Definition

A · A⁻¹ = A⁻¹ · A = I

A
Square matrix
I
Identity matrix

LU Method

Solve L·U·xᵢ = eᵢ for each column of A⁻¹

L
Lower triangular
U
Upper triangular
eᵢ
i-th standard basis vector

Frequently Asked Questions

When does a matrix have no inverse?

A matrix is singular (not invertible) when its determinant is zero, meaning its rows or columns are linearly dependent.

Why use LU instead of cofactor expansion?

LU decomposition is O(n³) and numerically stable with partial pivoting, while cofactor expansion is O(n!) and impractical for matrices larger than 4×4.

You might also need