Mathematics

How a Matrix's Inverse Is Calculated

A matrix's inverse is found by row-reducing it alongside the identity matrix until the original matrix becomes the identity — at which point the identity's starting position has transformed into the inverse, sitting right where the answer needs to be.

A worked example: the inverse of [[1,2],[3,4]]

The inverse of [[1,2],[3,4]] is [[−2,1],[1.5,−0.5]], alongside a determinant of −2 — the same determinant value the matrix determinant calculator would report for this matrix independently.

The method: Gauss-Jordan elimination on an augmented matrix

The original matrix is placed side by side with the identity matrix, then row-reduced using the same elementary row operations until the left side becomes the identity — at that point, whatever the right side has become is the inverse. It's a mechanical process that works for any invertible matrix, regardless of size.

A 3×3 example: more entries, same method

The matrix [[2,0,1],[1,3,2],[0,1,4]] inverts to approximately [[0.47619,0.047619,−0.142857],[−0.190476,0.380952,−0.142857],[0.047619,−0.095238,0.285714]], with a determinant of 21 — the same row-reduction method scales up cleanly, just with more arithmetic per step.

Why the determinant shows up in the inverse's result too

Every entry of an inverse is, underneath the row-reduction process, built from ratios involving the determinant — which is why a zero determinant makes inversion impossible: it would require dividing by zero at some point in the computation, not just as an arbitrary rule.

How to verify an inverse is actually correct

Multiplying the original matrix by its computed inverse should always produce the identity matrix — a mechanical check that doesn't require re-deriving the inverse by hand, just running the multiplication and confirming the result.