Mathematics

Why Multiplying a Matrix by Its Real Inverse Gives Back the Identity Matrix

Computing a matrix's real inverse and then multiplying the two together, using two entirely separate calculators built on different algorithms, returns exactly the identity matrix — the definition of "inverse," confirmed with real numbers rather than taken on faith.

Three calculators, one consistency check

The inverse of [[1,2],[3,4]] is [[−2,1],[1.5,−0.5]], computed via Gauss-Jordan elimination. Multiplying the original matrix by that real inverse — using the separate matrix calculator's multiplication, which uses ordinary row-times-column dot products — gives back [[1,0],[0,1]]: the identity matrix, exactly. That's the actual definition of a matrix inverse (A × A⁻¹ = I), confirmed with real computed numbers rather than just stated.

A 3×3 case: near-identity instead of exact

Running the same check on [[2,0,1],[1,3,2],[0,1,4]] and its real inverse gives [[0.999999,0,0],[0,0.999999,0],[0,0,0.999999]] — the identity matrix in every meaningful sense, but with 0.999999 instead of an exact 1 on the diagonal. That tiny gap is floating-point rounding accumulated across more arithmetic steps in a larger matrix, not a sign the inverse is wrong.

Why this cross-check is worth doing

The inverse calculator (Gauss-Jordan elimination) and the matrix calculator (direct row-column multiplication) are independently implemented — one doesn't call the other. Getting the identity matrix back from multiplying their outputs together confirms both are correctly modeling the same matrix, the same way running a calculation two different ways and getting the same answer builds confidence it's right.

What a failed check would actually mean

If multiplying a matrix by its "inverse" produced anything other than (approximately) the identity matrix, that would mean either the inverse was computed incorrectly, or the matrix entered wasn't actually invertible to begin with (its determinant should have been checked as zero first) — the identity-matrix result isn't just a nice property, it's the test that the inverse actually works.