Compute the inverse of a square matrix, determinant, and check invertibility. Interactive tool for linear algebra, system solving, and matrix transformations.
For a square matrix A of size n×n, its inverse A⁻¹ satisfies the equation A × A⁻¹ = A⁻¹ × A = Iₙ, where Iₙ is the identity matrix. Not every matrix has an inverse; only non‑singular (invertible) matrices with non‑zero determinant are invertible. The inverse matrix plays a central role in solving linear systems (Ax = b → x = A⁻¹b), least squares regression, computer graphics (3D transformations), cryptography (Hill cipher), and state‑space control theory.
If A represents a linear transformation (rotation, scaling, shear), then A⁻¹ reverses that transformation. For example, a rotation by 30° has an inverse rotation by –30°. Computing the inverse is equivalent to “undoing” the mapping, essential in computer vision and robotics.
Our calculator uses the augmented matrix method [A | I] and performs row operations (Gaussian elimination) to transform A into identity, simultaneously turning I into A⁻¹. This algorithm is numerically stable for matrices up to 4×4, using double precision. For larger matrices we recommend specialized libraries, but for 2×2, 3×3 and 4×4 this method is fast and transparent.
Engineers analyzing mesh currents in a resistive network create a matrix equation R · I = V. Computing the inverse of the resistance matrix directly yields branch currents. In a 3‑loop circuit, the 3×3 matrix inverse saves recalculating for multiple voltage sources. Our tool allows quick verification of invertibility and instant solution extraction. For instance, a symmetric positive definite matrix from a circuit is always invertible, ensuring a unique solution.
The determinant provides an immediate invertibility test. For 2×2, det = ad−bc; for 3×3, expansion by minors or Sarrus rule. Our tool returns exact floating values and warns when absolute determinant < 1e-8. The condition number (ratio of largest to smallest singular value) is estimated: values > 1e10 indicate ill‑conditioned matrices where inverse is unreliable.