Step 1: Express the system in matrix notation. The given system of equations can be written in the form \(A \mathbf{x} = \mathbf{b}\), where \(A = \begin{bmatrix} 1 & -2 & 0 \\ 2 & -1 & -1 \\ 0 & -2 & 1 \end{bmatrix}\), \(\mathbf{x} = \begin{bmatrix} x \\ y \\ z \end{bmatrix}\), and \(\mathbf{b} = \begin{bmatrix} 10 \\ 8 \\ 7 \end{bmatrix}\).
Step 2: Calculate the inverse matrix \(A^{-1}\). For a \(3 \times 3\) matrix, the inverse is computed as \(A^{-1} = \frac{1}{\text{det}(A)} \cdot \text{adj}(A)\), where \(\text{det}(A)\) is the determinant of \(A\) and \(\text{adj}(A)\) is the adjugate of \(A\).
# (a) Compute \(\text{det}(A)\): The determinant of \(A\) is calculated as \(\text{det}(A) = \begin{vmatrix} 1 & -2 & 0 \\ 2 & -1 & -1 \\ 0 & -2 & 1 \end{vmatrix}\). Expanding along the first row yields \(\text{det}(A) = 1 \cdot \begin{vmatrix} -1 & -1 \\ -2 & 1 \end{vmatrix} - (-2) \cdot \begin{vmatrix} 2 & -1 \\ 0 & 1 \end{vmatrix} + 0 \cdot \begin{vmatrix} 2 & -1 \\ 0 & -2 \end{vmatrix}\). The minors are \(\begin{vmatrix} -1 & -1 \\ -2 & 1 \end{vmatrix} = (-1)(1) - (-1)(-2) = -1 - 2 = -3\) and \(\begin{vmatrix} 2 & -1 \\ 0 & 1 \end{vmatrix} = (2)(1) - (-1)(0) = 2\). Substituting these values back, we get \(\text{det}(A) = 1(-3) + 2(2) + 0 = -3 + 4 = 1\).
# (b) Compute \(\text{adj}(A)\): The adjugate of \(A\) is the transpose of its cofactor matrix. The cofactor matrix of \(A\) is \(\begin{bmatrix} -3 & -2 & -4 \\ 2 & 1 & 2 \\ 4 & 2 & 3 \end{bmatrix}\). Therefore, \(\text{adj}(A) = \begin{bmatrix} -3 & 2 & 4 \\ -2 & 1 & 2 \\ -4 & 2 & 3 \end{bmatrix}\). Note: The provided calculation for the cofactor matrix and adjugate in the input was incorrect. Recalculating the cofactors:
C11 = (-1)^(1+1) * det([[-1, -1], [-2, 1]]) = 1 * (-1 - 2) = -3
C12 = (-1)^(1+2) * det([[2, -1], [0, 1]]) = -1 * (2 - 0) = -2
C13 = (-1)^(1+3) * det([[2, -1], [0, -2]]) = 1 * (-4 - 0) = -4
C21 = (-1)^(2+1) * det([[-2, 0], [-2, 1]]) = -1 * (-2 - 0) = 2
C22 = (-1)^(2+2) * det([[1, 0], [0, 1]]) = 1 * (1 - 0) = 1
C23 = (-1)^(2+3) * det([[1, -2], [0, -2]]) = -1 * (-2 - 0) = 2
C31 = (-1)^(3+1) * det([[-2, 0], [-1, -1]]) = 1 * (2 - 0) = 2
C32 = (-1)^(3+2) * det([[1, 0], [2, -1]]) = -1 * (-1 - 0) = 1
C33 = (-1)^(3+3) * det([[1, -2], [2, -1]]) = 1 * (-1 - (-4)) = 3
Cofactor Matrix = [[-3, -2, -4], [2, 1, 2], [2, 1, 3]]
adj(A) = transpose(Cofactor Matrix) = [[-3, 2, 2], [-2, 1, 1], [-4, 2, 3]]
# (c) Compute \(A^{-1}\): Using the formula \(A^{-1} = \frac{1}{\text{det}(A)} \cdot \text{adj}(A)\) and \(\text{det}(A) = 1\), we get \(A^{-1} = \text{adj}(A)\). Thus, \(A^{-1} = \begin{bmatrix} -3 & 2 & 2 \\ -2 & 1 & 1 \\ -4 & 2 & 3 \end{bmatrix}\).
Step 3: Solve for \(\begin{bmatrix} x \\ y \\ z \end{bmatrix}\). The solution is given by \(\begin{bmatrix} x \\ y \\ z \end{bmatrix} = A^{-1} \cdot \begin{bmatrix} 10 \\ 8 \\ 7 \end{bmatrix}\). Performing the matrix multiplication:
\[
\begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} -3 & 2 & 2 \\ -2 & 1 & 1 \\ -4 & 2 & 3 \end{bmatrix} \cdot \begin{bmatrix} 10 \\ 8 \\ 7 \end{bmatrix} = \begin{bmatrix} -3(10) + 2(8) + 2(7) \\ -2(10) + 1(8) + 1(7) \\ -4(10) + 2(8) + 3(7) \end{bmatrix}.
\]
Simplifying the terms:
\[
\begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} -30 + 16 + 14 \\ -20 + 8 + 7 \\ -40 + 16 + 21 \end{bmatrix} = \begin{bmatrix} 0 \\ -5 \\ -3 \end{bmatrix}.
\]
Final Answer: \(x = 0, y = -5, z = -3\).