To solve the problem \( A^3 - 6A^2 + 7A + 2I \) for the matrix \( A = \begin{pmatrix} 1 & 0 & 2 \\ 0 & 2 & 1 \\ 2 & 0 & 3 \end{pmatrix} \), we will follow these steps:
### Step 1: Calculate \( A^2 \)
To find \( A^2 \), we multiply matrix \( A \) by itself:
\[
A^2 = A \cdot A = \begin{pmatrix} 1 & 0 & 2 \\ 0 & 2 & 1 \\ 2 & 0 & 3 \end{pmatrix} \cdot \begin{pmatrix} 1 & 0 & 2 \\ 0 & 2 & 1 \\ 2 & 0 & 3 \end{pmatrix}
\]
Calculating the elements of \( A^2 \):
- First row, first column: \( 1 \cdot 1 + 0 \cdot 0 + 2 \cdot 2 = 1 + 0 + 4 = 5 \)
- First row, second column: \( 1 \cdot 0 + 0 \cdot 2 + 2 \cdot 0 = 0 + 0 + 0 = 0 \)
- First row, third column: \( 1 \cdot 2 + 0 \cdot 1 + 2 \cdot 3 = 2 + 0 + 6 = 8 \)
- Second row, first column: \( 0 \cdot 1 + 2 \cdot 0 + 1 \cdot 2 = 0 + 0 + 2 = 2 \)
- Second row, second column: \( 0 \cdot 0 + 2 \cdot 2 + 1 \cdot 0 = 0 + 4 + 0 = 4 \)
- Second row, third column: \( 0 \cdot 2 + 2 \cdot 1 + 1 \cdot 3 = 0 + 2 + 3 = 5 \)
- Third row, first column: \( 2 \cdot 1 + 0 \cdot 0 + 3 \cdot 2 = 2 + 0 + 6 = 8 \)
- Third row, second column: \( 2 \cdot 0 + 0 \cdot 2 + 3 \cdot 0 = 0 + 0 + 0 = 0 \)
- Third row, third column: \( 2 \cdot 2 + 0 \cdot 1 + 3 \cdot 3 = 4 + 0 + 9 = 13 \)
Thus, we have:
\[
A^2 = \begin{pmatrix} 5 & 0 & 8 \\ 2 & 4 & 5 \\ 8 & 0 & 13 \end{pmatrix}
\]
### Step 2: Calculate \( A^3 \)
Next, we calculate \( A^3 = A^2 \cdot A \):
\[
A^3 = \begin{pmatrix} 5 & 0 & 8 \\ 2 & 4 & 5 \\ 8 & 0 & 13 \end{pmatrix} \cdot \begin{pmatrix} 1 & 0 & 2 \\ 0 & 2 & 1 \\ 2 & 0 & 3 \end{pmatrix}
\]
Calculating the elements of \( A^3 \):
- First row, first column: \( 5 \cdot 1 + 0 \cdot 0 + 8 \cdot 2 = 5 + 0 + 16 = 21 \)
- First row, second column: \( 5 \cdot 0 + 0 \cdot 2 + 8 \cdot 0 = 0 + 0 + 0 = 0 \)
- First row, third column: \( 5 \cdot 2 + 0 \cdot 1 + 8 \cdot 3 = 10 + 0 + 24 = 34 \)
- Second row, first column: \( 2 \cdot 1 + 4 \cdot 0 + 5 \cdot 2 = 2 + 0 + 10 = 12 \)
- Second row, second column: \( 2 \cdot 0 + 4 \cdot 2 + 5 \cdot 0 = 0 + 8 + 0 = 8 \)
- Second row, third column: \( 2 \cdot 2 + 4 \cdot 1 + 5 \cdot 3 = 4 + 4 + 15 = 23 \)
- Third row, first column: \( 8 \cdot 1 + 0 \cdot 0 + 13 \cdot 2 = 8 + 0 + 26 = 34 \)
- Third row, second column: \( 8 \cdot 0 + 0 \cdot 2 + 13 \cdot 0 = 0 + 0 + 0 = 0 \)
- Third row, third column: \( 8 \cdot 2 + 0 \cdot 1 + 13 \cdot 3 = 16 + 0 + 39 = 55 \)
Thus, we have:
\[
A^3 = \begin{pmatrix} 21 & 0 & 34 \\ 12 & 8 & 23 \\ 34 & 0 & 55 \end{pmatrix}
\]
### Step 3: Calculate \( 6A^2 \)
Now we calculate \( 6A^2 \):
\[
6A^2 = 6 \cdot \begin{pmatrix} 5 & 0 & 8 \\ 2 & 4 & 5 \\ 8 & 0 & 13 \end{pmatrix} = \begin{pmatrix} 30 & 0 & 48 \\ 12 & 24 & 30 \\ 48 & 0 & 78 \end{pmatrix}
\]
### Step 4: Calculate \( 7A \)
Next, we calculate \( 7A \):
\[
7A = 7 \cdot \begin{pmatrix} 1 & 0 & 2 \\ 0 & 2 & 1 \\ 2 & 0 & 3 \end{pmatrix} = \begin{pmatrix} 7 & 0 & 14 \\ 0 & 14 & 7 \\ 14 & 0 & 21 \end{pmatrix}
\]
### Step 5: Calculate \( 2I \)
The identity matrix \( I \) for a \( 3 \times 3 \) matrix is:
\[
I = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}
\]
Thus,
\[
2I = 2 \cdot \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} = \begin{pmatrix} 2 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 2 \end{pmatrix}
\]
### Step 6: Combine all parts to find \( A^3 - 6A^2 + 7A + 2I \)
Now we will combine all the calculated matrices:
\[
A^3 - 6A^2 + 7A + 2I = \begin{pmatrix} 21 & 0 & 34 \\ 12 & 8 & 23 \\ 34 & 0 & 55 \end{pmatrix} - \begin{pmatrix} 30 & 0 & 48 \\ 12 & 24 & 30 \\ 48 & 0 & 78 \end{pmatrix} + \begin{pmatrix} 7 & 0 & 14 \\ 0 & 14 & 7 \\ 14 & 0 & 21 \end{pmatrix} + \begin{pmatrix} 2 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 2 \end{pmatrix}
\]
Calculating each element:
- First row:
- \( 21 - 30 + 7 + 2 = 0 \)
- \( 0 - 0 + 0 + 0 = 0 \)
- \( 34 - 48 + 14 + 0 = 0 \)
- Second row:
- \( 12 - 12 + 0 + 0 = 0 \)
- \( 8 - 24 + 14 + 2 = 0 \)
- \( 23 - 30 + 7 + 0 = 0 \)
- Third row:
- \( 34 - 48 + 14 + 0 = 0 \)
- \( 0 - 0 + 0 + 0 = 0 \)
- \( 55 - 78 + 21 + 2 = 0 \)
Thus, we have:
\[
A^3 - 6A^2 + 7A + 2I = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}
\]
### Final Answer
The value of \( A^3 - 6A^2 + 7A + 2I \) is the zero matrix:
\[
\begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}
\]