Matrix Inverse Calculator
Find the inverse of a square matrix (2×2 to 4×4) using Gauss-Jordan elimination. Detects singular matrices and shows every row operation.
Why Matrix Inverses Matter
The matrix inverse is to matrices what the reciprocal (1/x) is to scalars. Multiplying by A⁻¹ undoes the transformation represented by A. This is used to solve linear systems: if Ax = b, then x = A⁻¹b — provided A is invertible.
Applications by Field
- Solving Systems of Equations: x = A⁻¹b gives the direct solution to Ax = b. In practice, Gaussian elimination is faster and more numerically stable.
- Computer Graphics — Inverse Transformations: To undo a rotation/scale/translation, multiply by the inverse of the transformation matrix.
- Cryptography — Hill Cipher: Decryption requires the inverse of the key matrix (modulo 26). The matrix must be invertible mod 26 for the cipher to work.
- Statistics — OLS: The ordinary least squares estimator β̂ = (XᵀX)⁻¹Xᵀy requires inverting the Gram matrix XᵀX.
Frequently Asked Questions
What's the difference between A⁻¹ and 1/A?
For scalars, 1/a and a⁻¹ are the same. For matrices, A⁻¹ is not the matrix of element-wise reciprocals. A⁻¹ is the unique matrix such that A×A⁻¹ = A⁻¹×A = I (identity). Dividing by a matrix means multiplying by its inverse. There is no element-wise "1/matrix" operation in standard linear algebra.
Should I use the inverse or Gaussian elimination to solve Ax = b?
Almost always use Gaussian elimination — it's more numerically stable and computationally faster. Computing A⁻¹ explicitly costs O(n³) and amplifies floating-point errors. In practice, even MATLAB's backslash operator (A\b) uses LU decomposition, not the inverse. Only compute A⁻¹ explicitly if you need to solve many systems with the same A but different b vectors.