Package a system of n linear equations in n unknowns as AX=B, with A the n×n coefficient matrix, X the column of unknowns, and B the column of constants. Matrix inversion method applies exactly when A is square and non-singular (∣A∣=0).
Derivation. Starting from AX=B, pre-multiply both sides by A−1:
A−1(AX)=A−1B ⟹ (A−1A)X=A−1B ⟹ X=A−1B.
Worked illustration. For 2x+y=8, x−y=1: A=(211−1), B=(81). Here ∣A∣=−2−1=−3=0, so A−1=−31(−1−1−12)=31(111−2). Then X=A−1B=31(111−2)(81)=31(96)=(32), i.e. x=3,y=2 -- check: 2(3)+2=8 and 3−2=1, both correct.
Practical shape for a 3×3 system. Write the three equations, read off A (rows = equations, columns = coefficients of x,y,z in that fixed order) and B, compute ∣A∣, then adjA (transpose of the cofactor matrix), then A−1=∣A∣1adjA, and finally multiply A−1B to read off x,y,z from the resulting column. …