Writing the system as AX=B:
A=121−1111−31,X=xyz,B=402
Step 1: the determinant. Expanding along the first row,
∣A∣=(1)(4)−(−1)(5)+(1)(1)=10
Since ∣A∣=10=0, A−1 exists and the system has a unique solution X=A−1B.
Step 2: the cofactors.
A11=+11−31=4
A12=−21−31=−5
A13=+2111=1
A21=−−1111=2
A22=+1111=0
A23=−11−11=−2
A31=+−111−3=2
A32=−121−3=5
A33=+12−11=3
Step 3: the adjoint (transpose of the cofactor matrix):
adjA=4−5120−2253
Step 4: solve.
X=1014−5120−2253402=101(4)(4)+(2)(0)+(2)(2)(−5)(4)+(0)(0)+(5)(2)(1)(4)+(−2)(0)+(3)(2)=10120−1010=2−11
Hence x=2,y=−1,z=1.
Check: (1)(2)+(−1)(−1)+(1)(1)=4; (2)(2)+(1)(−1)+(−3)(1)=0; (1)(2)+(1)(−1)+(1)(1)=2. ✓