Solve Linear System 6E1224
1. **State the problem:** Solve the system of equations using diagonal methods (Cramer's Rule):
$$\begin{cases} x + y + z = 0 \\ x - 2y + 2z = 4 \\ x + 2y - z = 2 \end{cases}$$
2. **Write the coefficient matrix $A$, variable vector $\mathbf{x}$, and constant vector $\mathbf{b}$:**
$$A = \begin{bmatrix} 1 & 1 & 1 \\ 1 & -2 & 2 \\ 1 & 2 & -1 \end{bmatrix}, \quad \mathbf{x} = \begin{bmatrix} x \\ y \\ z \end{bmatrix}, \quad \mathbf{b} = \begin{bmatrix} 0 \\ 4 \\ 2 \end{bmatrix}$$
3. **Calculate the determinant of $A$, $\det(A)$:**
$$\det(A) = 1 \cdot \begin{vmatrix} -2 & 2 \\ 2 & -1 \end{vmatrix} - 1 \cdot \begin{vmatrix} 1 & 2 \\ 1 & -1 \end{vmatrix} + 1 \cdot \begin{vmatrix} 1 & -2 \\ 1 & 2 \end{vmatrix}$$
Calculate each minor:
$$\begin{aligned}
M_{11} &= (-2)(-1) - (2)(2) = 2 - 4 = -2 \\
M_{12} &= 1 \cdot (-1) - 1 \cdot 2 = -1 - 2 = -3 \\
M_{13} &= 1 \cdot 2 - 1 \cdot (-2) = 2 + 2 = 4
\end{aligned}$$
So,
$$\det(A) = 1 \cdot (-2) - 1 \cdot (-3) + 1 \cdot 4 = -2 + 3 + 4 = 5$$
4. **Calculate determinants for $x$, $y$, and $z$ by replacing respective columns with $\mathbf{b}$:**
- For $x$, replace first column:
$$A_x = \begin{bmatrix} 0 & 1 & 1 \\ 4 & -2 & 2 \\ 2 & 2 & -1 \end{bmatrix}$$
$$\det(A_x) = 0 \cdot \begin{vmatrix} -2 & 2 \\ 2 & -1 \end{vmatrix} - 1 \cdot \begin{vmatrix} 4 & 2 \\ 2 & -1 \end{vmatrix} + 1 \cdot \begin{vmatrix} 4 & -2 \\ 2 & 2 \end{vmatrix}$$
Calculate minors:
$$\begin{aligned}
M_{11} &= \text{ignored since multiplied by 0} \\
M_{12} &= 4 \cdot (-1) - 2 \cdot 2 = -4 - 4 = -8 \\
M_{13} &= 4 \cdot 2 - (-2) \cdot 2 = 8 + 4 = 12
\end{aligned}$$
So,
$$\det(A_x) = 0 - 1 \cdot (-8) + 1 \cdot 12 = 0 + 8 + 12 = 20$$
- For $y$, replace second column:
$$A_y = \begin{bmatrix} 1 & 0 & 1 \\ 1 & 4 & 2 \\ 1 & 2 & -1 \end{bmatrix}$$
$$\det(A_y) = 1 \cdot \begin{vmatrix} 4 & 2 \\ 2 & -1 \end{vmatrix} - 0 \cdot \begin{vmatrix} 1 & 2 \\ 1 & -1 \end{vmatrix} + 1 \cdot \begin{vmatrix} 1 & 4 \\ 1 & 2 \end{vmatrix}$$
Calculate minors:
$$\begin{aligned}
M_{11} &= 4 \cdot (-1) - 2 \cdot 2 = -4 - 4 = -8 \\
M_{12} &= \text{ignored since multiplied by 0} \\
M_{13} &= 1 \cdot 2 - 1 \cdot 4 = 2 - 4 = -2
\end{aligned}$$
So,
$$\det(A_y) = 1 \cdot (-8) - 0 + 1 \cdot (-2) = -8 - 2 = -10$$
- For $z$, replace third column:
$$A_z = \begin{bmatrix} 1 & 1 & 0 \\ 1 & -2 & 4 \\ 1 & 2 & 2 \end{bmatrix}$$
$$\det(A_z) = 1 \cdot \begin{vmatrix} -2 & 4 \\ 2 & 2 \end{vmatrix} - 1 \cdot \begin{vmatrix} 1 & 4 \\ 1 & 2 \end{vmatrix} + 0 \cdot \begin{vmatrix} 1 & -2 \\ 1 & 2 \end{vmatrix}$$
Calculate minors:
$$\begin{aligned}
M_{11} &= (-2)(2) - 4(2) = -4 - 8 = -12 \\
M_{12} &= 1 \cdot 2 - 1 \cdot 4 = 2 - 4 = -2 \\
M_{13} &= \text{ignored since multiplied by 0}
\end{aligned}$$
So,
$$\det(A_z) = 1 \cdot (-12) - 1 \cdot (-2) + 0 = -12 + 2 = -10$$
5. **Calculate the variables using Cramer's Rule:**
$$x = \frac{\det(A_x)}{\det(A)} = \frac{20}{5} = 4$$
$$y = \frac{\det(A_y)}{\det(A)} = \frac{-10}{5} = -2$$
$$z = \frac{\det(A_z)}{\det(A)} = \frac{-10}{5} = -2$$
6. **Final answer:**
$$\boxed{x=4, \quad y=-2, \quad z=-2}$$