Compute the inverse of a square matrix via LU decomposition with singularity detection.
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.
Inverse Definition
A · A⁻¹ = A⁻¹ · A = I
LU Method
Solve L·U·xᵢ = eᵢ for each column of A⁻¹
A matrix is singular (not invertible) when its determinant is zero, meaning its rows or columns are linearly dependent.
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.