To solve the given problem, we will first find the product of the matrices A and B, and then we will solve the system of equations using the matrix method.
### Step 1: Find the product of matrices A and B
Given matrices:
\[
A = \begin{pmatrix} -5 & 1 & 3 \\ 7 & 1 & -5 \\ 1 & -1 & 1 \end{pmatrix}
\]
\[
B = \begin{pmatrix} 1 & 1 & 2 \\ 3 & 2 & 1 \\ 2 & 1 & 3 \end{pmatrix}
\]
To find the product \( AB \), we will multiply each row of matrix A by each column of matrix B.
#### Calculation of \( AB \):
1. **First Row of A with Columns of B**:
- First element: \((-5 \cdot 1) + (1 \cdot 3) + (3 \cdot 2) = -5 + 3 + 6 = 4\)
- Second element: \((-5 \cdot 1) + (1 \cdot 2) + (3 \cdot 1) = -5 + 2 + 3 = 0\)
- Third element: \((-5 \cdot 2) + (1 \cdot 1) + (3 \cdot 3) = -10 + 1 + 9 = 0\)
Thus, the first row of \( AB \) is \( (4, 0, 0) \).
2. **Second Row of A with Columns of B**:
- First element: \((7 \cdot 1) + (1 \cdot 3) + (-5 \cdot 2) = 7 + 3 - 10 = 0\)
- Second element: \((7 \cdot 1) + (1 \cdot 2) + (-5 \cdot 1) = 7 + 2 - 5 = 4\)
- Third element: \((7 \cdot 2) + (1 \cdot 1) + (-5 \cdot 3) = 14 + 1 - 15 = 0\)
Thus, the second row of \( AB \) is \( (0, 4, 0) \).
3. **Third Row of A with Columns of B**:
- First element: \((1 \cdot 1) + (-1 \cdot 3) + (1 \cdot 2) = 1 - 3 + 2 = 0\)
- Second element: \((1 \cdot 1) + (-1 \cdot 2) + (1 \cdot 1) = 1 - 2 + 1 = 0\)
- Third element: \((1 \cdot 2) + (-1 \cdot 1) + (1 \cdot 3) = 2 - 1 + 3 = 4\)
Thus, the third row of \( AB \) is \( (0, 0, 4) \).
Now, we can write the product matrix \( AB \):
\[
AB = \begin{pmatrix} 4 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 4 \end{pmatrix}
\]
### Step 2: Solve the equations using the matrix method
The given equations are:
1. \( x + y + 2z = 1 \)
2. \( 3x + 2y + z = 7 \)
3. \( 2x + y + 3z = 2 \)
We can represent this system in matrix form as \( AX = C \), where:
\[
A = \begin{pmatrix} 1 & 1 & 2 \\ 3 & 2 & 1 \\ 2 & 1 & 3 \end{pmatrix}, \quad X = \begin{pmatrix} x \\ y \\ z \end{pmatrix}, \quad C = \begin{pmatrix} 1 \\ 7 \\ 2 \end{pmatrix}
\]
To find \( X \), we can use the inverse of matrix \( A \):
\[
X = A^{-1}C
\]
Since we have already calculated \( AB \) and found that it is \( 4I \) (where \( I \) is the identity matrix), we can use this to find \( A^{-1} \):
\[
A^{-1} = \frac{1}{4} \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} = \begin{pmatrix} \frac{1}{4} & 0 & 0 \\ 0 & \frac{1}{4} & 0 \\ 0 & 0 & \frac{1}{4} \end{pmatrix}
\]
Now, we can calculate \( X \):
\[
X = A^{-1}C = \frac{1}{4} \begin{pmatrix} 1 \\ 7 \\ 2 \end{pmatrix} = \begin{pmatrix} \frac{1}{4} \\ \frac{7}{4} \\ \frac{2}{4} \end{pmatrix} = \begin{pmatrix} \frac{1}{4} \\ \frac{7}{4} \\ \frac{1}{2} \end{pmatrix}
\]
Thus, we find:
- \( x = \frac{1}{4} \)
- \( y = \frac{7}{4} \)
- \( z = \frac{1}{2} \)
### Final Answer:
The solution to the equations is:
- \( x = \frac{1}{4} \)
- \( y = \frac{7}{4} \)
- \( z = \frac{1}{2} \)