Concept understanding — Solving Linear Systems by Matrix Inversion
Package a system of n linear equations in n unknowns as AX=B, with A the n×ncoefficient 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.
Word problems (rates, mixtures, work, prices) translate the same way: name each unknown quantity, write one linear equation per given condition, assemble AX=B, then solve by the formula above. A common variant asks you to find two unknown matrices A and C from a matrix equation like 2A−B=P,A−2B=Q: treat it as simultaneous matrix equations and eliminate one matrix exactly as you would eliminate a scalar unknown, using matrix addition/subtraction (never division) throughout.
Watch out
This method needs Asquare and non-singular. If ∣A∣=0 or the system has more equations than unknowns (or vice versa), matrix inversion cannot be used -- fall back on Gaussian elimination or the rank method instead.
Multiplying out AB and BA both collapse to 4I3; since the given system's coefficient matrix is exactly B, this hands us B−1=4A for free, without a fresh inversion.
✓Final answer
AB=BA=4I3; and x=2,y=1,z=−1.
We first compute the two products AB and BA directly. Both turn out to equal 4I3 — this means B⋅(4A)=(4A)⋅B=I3, i.e. 4A is both a left and a right inverse of B, so B−1=4A. Since the given system's coefficients are exactly B's rows, X=B−1C=4AC solves it instantly.
Row 1 of A times B: (−5(1)+1(3)+3(2),−5(1)+1(2)+3(1),−5(2)+1(1)+3(3))=(−5+3+6,−5+2+3,−10+1+9)=(4,0,0)
Row 2 of A times B: (7(1)+1(3)+(−5)(2),7(1)+1(2)+(−5)(1),7(2)+1(1)+(−5)(3))=(7+3−10,7+2−5,14+1−15)=(0,4,0)
Row 3 of A times B: (1(1)+(−1)(3)+1(2),1(1)+(−1)(2)+1(1),1(2)+(−1)(1)+1(3))=(1−3+2,1−2+1,2−1+3)=(0,0,4)
AB=400040004=4I3
Step 2. Compute BA.
Row 1 of B times A: (1(−5)+1(7)+2(1),1(1)+1(1)+2(−1),1(3)+1(−5)+2(1))=(−5+7+2,1+1−2,3−5+2)=(4,0,0)
Row 2 of B times A: (3(−5)+2(7)+1(1),3(1)+2(1)+1(−1),3(3)+2(−5)+1(1))=(−15+14+1,3+2−1,9−10+1)=(0,4,0)
Row 3 of B times A: (2(−5)+1(7)+3(1),2(1)+1(1)+3(−1),2(3)+1(−5)+3(1))=(−10+7+3,2+1−3,6−5+3)=(0,0,4)
BA=400040004=4I3
So indeed AB=BA=4I3.
Step 3. Derive B−1 from this relation. Dividing throughout by 4: B(4A)=I3 and (4A)B=I3. A matrix that is simultaneously a left and right inverse of BisB−1, so
B−1=4A=41−57111−13−51.
Step 4. Recognise the given system as BX=C. The system x+y+2z=1,3x+2y+z=7,2x+y+3z=2 has coefficient rows (1,1,2),(3,2,1),(2,1,3) — exactly the rows of B. So it is BX=C with C=172.