Solution:
Key idea: Write the system as A X = B AX = B A X = B . If ∣ A ∣ ≠ 0 |A| \neq 0 ∣ A ∣ = 0 , then A − 1 A^{-1} A − 1 exists and the system has the unique solution X = A − 1 B X = A^{-1}B X = A − 1 B , where A − 1 = 1 ∣ A ∣ adj A A^{-1} = \dfrac{1}{|A|}\operatorname{adj} A A − 1 = ∣ A ∣ 1 adj A .
Step 1 — Write the system as A X = B AX = B A X = B .
We collect the coefficients of the unknowns into A A A , the unknowns into X X X and the right-hand sides into B B B .
[ 3 1 1 2 − 1 − 1 − 1 − 1 1 ] [ x y z ] = [ 3 2 1 ] \begin{bmatrix} 3 & 1 & 1 \\ 2 & -1 & -1 \\ -1 & -1 & 1 \end{bmatrix}\begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 3 \\ 2 \\ 1 \end{bmatrix} 3 2 − 1 1 − 1 − 1 1 − 1 1 x y z = 3 2 1
Step 2 — Find the cofactor of every entry of A A A .
The cofactor of the entry in row i i i and column j j j is A i j = ( − 1 ) i + j M i j A_{ij} = (-1)^{i+j}M_{ij} A ij = ( − 1 ) i + j M ij , where the minor M i j M_{ij} M ij is the 2 × 2 2 \times 2 2 × 2 determinant left after deleting that row and column. The sign is + + + when i + j i + j i + j is even and − - − when it is odd.
Cofactors of the first row:
A 11 = + ∣ − 1 − 1 − 1 1 ∣ = ( − 1 ) ( 1 ) − ( − 1 ) ( − 1 ) = − 1 − 1 = − 2 \begin{aligned}
A_{11} &= +\begin{vmatrix} -1 & -1 \\ -1 & 1 \end{vmatrix} \\
&= (-1)(1) - (-1)(-1) \\
&= -1 - 1 \\
&= -2
\end{aligned} A 11 = + − 1 − 1 − 1 1 = ( − 1 ) ( 1 ) − ( − 1 ) ( − 1 ) = − 1 − 1 = − 2
A 12 = − ∣ 2 − 1 − 1 1 ∣ = − [ ( 2 ) ( 1 ) − ( − 1 ) ( − 1 ) ] = − [ 2 − 1 ] = − 1 \begin{aligned}
A_{12} &= -\begin{vmatrix} 2 & -1 \\ -1 & 1 \end{vmatrix} \\
&= -\big[(2)(1) - (-1)(-1)\big] \\
&= -\big[2 - 1\big] \\
&= -1
\end{aligned} A 12 = − 2 − 1 − 1 1 = − [ ( 2 ) ( 1 ) − ( − 1 ) ( − 1 ) ] = − [ 2 − 1 ] = − 1
A 13 = + ∣ 2 − 1 − 1 − 1 ∣ = ( 2 ) ( − 1 ) − ( − 1 ) ( − 1 ) = − 2 − 1 = − 3 \begin{aligned}
A_{13} &= +\begin{vmatrix} 2 & -1 \\ -1 & -1 \end{vmatrix} \\
&= (2)(-1) - (-1)(-1) \\
&= -2 - 1 \\
&= -3
\end{aligned} A 13 = + 2 − 1 − 1 − 1 = ( 2 ) ( − 1 ) − ( − 1 ) ( − 1 ) = − 2 − 1 = − 3
Cofactors of the second row:
A 21 = − ∣ 1 1 − 1 1 ∣ = − [ ( 1 ) ( 1 ) − ( 1 ) ( − 1 ) ] = − [ 1 − ( − 1 ) ] = − 2 \begin{aligned}
A_{21} &= -\begin{vmatrix} 1 & 1 \\ -1 & 1 \end{vmatrix} \\
&= -\big[(1)(1) - (1)(-1)\big] \\
&= -\big[1 - (-1)\big] \\
&= -2
\end{aligned} A 21 = − 1 − 1 1 1 = − [ ( 1 ) ( 1 ) − ( 1 ) ( − 1 ) ] = − [ 1 − ( − 1 ) ] = − 2
A 22 = + ∣ 3 1 − 1 1 ∣ = ( 3 ) ( 1 ) − ( 1 ) ( − 1 ) = 3 − ( − 1 ) = 4 \begin{aligned}
A_{22} &= +\begin{vmatrix} 3 & 1 \\ -1 & 1 \end{vmatrix} \\
&= (3)(1) - (1)(-1) \\
&= 3 - (-1) \\
&= 4
\end{aligned} A 22 = + 3 − 1 1 1 = ( 3 ) ( 1 ) − ( 1 ) ( − 1 ) = 3 − ( − 1 ) = 4
A 23 = − ∣ 3 1 − 1 − 1 ∣ = − [ ( 3 ) ( − 1 ) − ( 1 ) ( − 1 ) ] = − [ − 3 − ( − 1 ) ] = 2 \begin{aligned}
A_{23} &= -\begin{vmatrix} 3 & 1 \\ -1 & -1 \end{vmatrix} \\
&= -\big[(3)(-1) - (1)(-1)\big] \\
&= -\big[-3 - (-1)\big] \\
&= 2
\end{aligned} A 23 = − 3 − 1 1 − 1 = − [ ( 3 ) ( − 1 ) − ( 1 ) ( − 1 ) ] = − [ − 3 − ( − 1 ) ] = 2
Cofactors of the third row:
A 31 = + ∣ 1 1 − 1 − 1 ∣ = ( 1 ) ( − 1 ) − ( 1 ) ( − 1 ) = − 1 − ( − 1 ) = 0 \begin{aligned}
A_{31} &= +\begin{vmatrix} 1 & 1 \\ -1 & -1 \end{vmatrix} \\
&= (1)(-1) - (1)(-1) \\
&= -1 - (-1) \\
&= 0
\end{aligned} A 31 = + 1 − 1 1 − 1 = ( 1 ) ( − 1 ) − ( 1 ) ( − 1 ) = − 1 − ( − 1 ) = 0
A 32 = − ∣ 3 1 2 − 1 ∣ = − [ ( 3 ) ( − 1 ) − ( 1 ) ( 2 ) ] = − [ − 3 − 2 ] = 5 \begin{aligned}
A_{32} &= -\begin{vmatrix} 3 & 1 \\ 2 & -1 \end{vmatrix} \\
&= -\big[(3)(-1) - (1)(2)\big] \\
&= -\big[-3 - 2\big] \\
&= 5
\end{aligned} A 32 = − 3 2 1 − 1 = − [ ( 3 ) ( − 1 ) − ( 1 ) ( 2 ) ] = − [ − 3 − 2 ] = 5
A 33 = + ∣ 3 1 2 − 1 ∣ = ( 3 ) ( − 1 ) − ( 1 ) ( 2 ) = − 3 − 2 = − 5 \begin{aligned}
A_{33} &= +\begin{vmatrix} 3 & 1 \\ 2 & -1 \end{vmatrix} \\
&= (3)(-1) - (1)(2) \\
&= -3 - 2 \\
&= -5
\end{aligned} A 33 = + 3 2 1 − 1 = ( 3 ) ( − 1 ) − ( 1 ) ( 2 ) = − 3 − 2 = − 5
Step 3 — Find ∣ A ∣ |A| ∣ A ∣ by expanding along the first row.
We multiply each entry of the first row by its own cofactor from the previous step and add the three products.
∣ A ∣ = a 11 A 11 + a 12 A 12 + a 13 A 13 = ( 3 ) ( − 2 ) + ( 1 ) ( − 1 ) + ( 1 ) ( − 3 ) = − 6 − 1 − 3 = − 10 \begin{aligned}
|A| &= a_{11}A_{11} + a_{12}A_{12} + a_{13}A_{13} \\
&= (3)(-2) + (1)(-1) + (1)(-3) \\
&= -6 - 1 - 3 \\
&= -10
\end{aligned} ∣ A ∣ = a 11 A 11 + a 12 A 12 + a 13 A 13 = ( 3 ) ( − 2 ) + ( 1 ) ( − 1 ) + ( 1 ) ( − 3 ) = − 6 − 1 − 3 = − 10
Step 4 — Form the adjoint of A A A .
The adjoint is the transpose of the matrix of cofactors: the cofactors of the first row become the first column, and so on.
adj A = [ − 2 − 1 − 3 − 2 4 2 0 5 − 5 ] ′ = [ − 2 − 2 0 − 1 4 5 − 3 2 − 5 ] \begin{aligned}
\operatorname{adj} A &= \begin{bmatrix} -2 & -1 & -3 \\ -2 & 4 & 2 \\ 0 & 5 & -5 \end{bmatrix}' \\
&= \begin{bmatrix} -2 & -2 & 0 \\ -1 & 4 & 5 \\ -3 & 2 & -5 \end{bmatrix}
\end{aligned} adj A = − 2 − 2 0 − 1 4 5 − 3 2 − 5 ′ = − 2 − 1 − 3 − 2 4 2 0 5 − 5
Step 5 — Divide the adjoint by the determinant.
Since ∣ A ∣ = − 10 |A| = -10 ∣ A ∣ = − 10 is not zero, A A A is non-singular and its inverse exists. We divide every entry of the adjoint by ∣ A ∣ |A| ∣ A ∣ .
A − 1 = 1 ∣ A ∣ adj A = − 1 10 [ − 2 − 2 0 − 1 4 5 − 3 2 − 5 ] = [ 1 5 1 5 0 1 10 − 2 5 − 1 2 3 10 − 1 5 1 2 ] \begin{aligned}
A^{-1} &= \dfrac{1}{|A|}\operatorname{adj} A \\
&= -\dfrac{1}{10}\begin{bmatrix} -2 & -2 & 0 \\ -1 & 4 & 5 \\ -3 & 2 & -5 \end{bmatrix} \\
&= \begin{bmatrix} \frac{1}{5} & \frac{1}{5} & 0 \\ \frac{1}{10} & -\frac{2}{5} & -\frac{1}{2} \\ \frac{3}{10} & -\frac{1}{5} & \frac{1}{2} \end{bmatrix}
\end{aligned} A − 1 = ∣ A ∣ 1 adj A = − 10 1 − 2 − 1 − 3 − 2 4 2 0 5 − 5 = 5 1 10 1 10 3 5 1 − 5 2 − 5 1 0 − 2 1 2 1
Step 6 — Find X = A − 1 B X = A^{-1}B X = A − 1 B .
We pre-multiply both sides of A X = B AX = B A X = B by A − 1 A^{-1} A − 1 , and this gives X = A − 1 B X = A^{-1}B X = A − 1 B . We keep the number factor in front until the end.
X = A − 1 B = − 1 10 [ − 2 − 2 0 − 1 4 5 − 3 2 − 5 ] [ 3 2 1 ] = − 1 10 [ ( − 2 ) ( 3 ) + ( − 2 ) ( 2 ) + ( 0 ) ( 1 ) ( − 1 ) ( 3 ) + ( 4 ) ( 2 ) + ( 5 ) ( 1 ) ( − 3 ) ( 3 ) + ( 2 ) ( 2 ) + ( − 5 ) ( 1 ) ] = − 1 10 [ − 10 10 − 10 ] = [ 1 − 1 1 ] \begin{aligned}
X &= A^{-1}B \\
&= -\dfrac{1}{10}\begin{bmatrix} -2 & -2 & 0 \\ -1 & 4 & 5 \\ -3 & 2 & -5 \end{bmatrix}\begin{bmatrix} 3 \\ 2 \\ 1 \end{bmatrix} \\
&= -\dfrac{1}{10}\begin{bmatrix} (-2)(3) + (-2)(2) + (0)(1) \\ (-1)(3) + (4)(2) + (5)(1) \\ (-3)(3) + (2)(2) + (-5)(1) \end{bmatrix} \\
&= -\dfrac{1}{10}\begin{bmatrix} -10 \\ 10 \\ -10 \end{bmatrix} \\
&= \begin{bmatrix} 1 \\ -1 \\ 1 \end{bmatrix}
\end{aligned} X = A − 1 B = − 10 1 − 2 − 1 − 3 − 2 4 2 0 5 − 5 3 2 1 = − 10 1 ( − 2 ) ( 3 ) + ( − 2 ) ( 2 ) + ( 0 ) ( 1 ) ( − 1 ) ( 3 ) + ( 4 ) ( 2 ) + ( 5 ) ( 1 ) ( − 3 ) ( 3 ) + ( 2 ) ( 2 ) + ( − 5 ) ( 1 ) = − 10 1 − 10 10 − 10 = 1 − 1 1
Step 7 — Check in the original equations.
We substitute x = 1 x = 1 x = 1 , y = − 1 y = -1 y = − 1 , z = 1 z = 1 z = 1 into the left-hand side of each equation.
3 x + y + z = ( 3 ) ( 1 ) + ( 1 ) ( − 1 ) + ( 1 ) ( 1 ) = 3 − 1 + 1 = 3 \begin{aligned}
3x + y + z &= (3)(1) + (1)(-1) + (1)(1) \\
&= 3 - 1 + 1 \\
&= 3
\end{aligned} 3 x + y + z = ( 3 ) ( 1 ) + ( 1 ) ( − 1 ) + ( 1 ) ( 1 ) = 3 − 1 + 1 = 3
2 x − y − z = ( 2 ) ( 1 ) + ( − 1 ) ( − 1 ) + ( − 1 ) ( 1 ) = 2 + 1 − 1 = 2 \begin{aligned}
2x - y - z &= (2)(1) + (-1)(-1) + (-1)(1) \\
&= 2 + 1 - 1 \\
&= 2
\end{aligned} 2 x − y − z = ( 2 ) ( 1 ) + ( − 1 ) ( − 1 ) + ( − 1 ) ( 1 ) = 2 + 1 − 1 = 2
− x − y + z = ( − 1 ) ( 1 ) + ( − 1 ) ( − 1 ) + ( 1 ) ( 1 ) = − 1 + 1 + 1 = 1 \begin{aligned}
-x - y + z &= (-1)(1) + (-1)(-1) + (1)(1) \\
&= -1 + 1 + 1 \\
&= 1
\end{aligned} − x − y + z = ( − 1 ) ( 1 ) + ( − 1 ) ( − 1 ) + ( 1 ) ( 1 ) = − 1 + 1 + 1 = 1
Each left-hand side equals the given right-hand side.
Therefore, x = 1 x = 1 x = 1 , y = − 1 y = -1 y = − 1 and z = 1 z = 1 z = 1 .