Skip to content
ENExplore Calculators

Matrix Inverse Calculator

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

About Matrix Inverse Calculator

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

Worked example

With the default values below, Matrix Inverse Calculator returns A⁻¹ of 3 -1 -5 2. Change any input above and every figure here is recalculated in your browser.

Inputs used

Matrix A (rows separated by newlines or semicolons; values by commas or spaces)
2 1 5 3

Results

A⁻¹
3 -1 -5 2
Determinant
1.00000000

Step by step

  1. 1Matrix A= 2 1 5 3
  2. 2det(A)= 1
  3. 3A⁻¹ (via LU with partial pivoting)= 3 -1 -5 2

Assumptions and limits

  • The result is derived only from the single input listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 8 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

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.

Matrix Inverse Calculator (Linear Algebra) | Calcrivo