\begin{align*} \left( \begin{array}{ccc|ccc} 3 & -2 & 2 & 1 & 0 & 0 \\ -2 & 3 & -2 & 0 & 1 & 0 \\ 2 & -2 & 3 & 0 & 0 & 1 \end{array} \right) &\xrightarrow{S_2 \to S_2 + S_3} \left( \begin{array}{ccc|ccc} 3 & 0 & 2 & 1 & 0 & 0 \\ -2 & 1 & -2 & 0 & 1 & 0 \\ 2 & 1 & 3 & 0 & 0 & 1 \end{array} \right) \\ &\xrightarrow{Z_2 \to Z_2 + Z_3} \left( \begin{array}{ccc|ccc} 3 & 0 & 2 & 1 & 0 & 0 \\ 0 & 2 & 1 & 0 & 1 & 1 \\ 2 & 1 & 3 & 0 & 0 & 1 \end{array} \right) \\ &\xrightarrow{S_3 \to S_3 - \frac{2}{3} S_1} \left( \begin{array}{ccc|ccc} 3 & 0 & 0 & 1 & 0 & 0 \\ 0 & 2 & 1 & 0 & 1 & 1 \\ 2 & 1 & \frac{5}{3} & 0 & 0 & 1 \end{array} \right) \\ &\xrightarrow{Z_3 \to Z_3 - \frac{2}{3} Z_1} \left( \begin{array}{ccc|ccc} 3 & 0 & 0 & 1 & 0 & 0 \\ 0 & 2 & 1 & 0 & 1 & 1 \\ 0 & 1 & \frac{5}{3} & -\frac{2}{3} & 0 & 1 \end{array} \right) \\ &\xrightarrow{S_3 \to S_3 - \frac{1}{2} S_2} \left( \begin{array}{ccc|ccc} 3 & 0 & 0 & 1 & 0 & 0 \\ 0 & 2 & 0 & 0 & 1 & 1 \\ 0 & 1 & \frac{7}{6} & -\frac{2}{3} & 0 & 1 \end{array} \right) \\ &\xrightarrow{Z_3 \to Z_3 - \frac{1}{2} Z_2} \left( \begin{array}{ccc|ccc} 3 & 0 & 0 & 1 & 0 & 0 \\ 0 & 2 & 0 & 0 & 1 & 1 \\ 0 & 0 & \frac{7}{6} & -\frac{2}{3} & -\frac{1}{2} & \frac{1}{2} \end{array} \right). \end{align*}
Es gilt also $$ \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 1 \\ -\frac{2}{3} & -\frac{1}{2} & \frac{1}{2} \end{pmatrix} \begin{pmatrix} 3 & -2 & 2 \\ -2 & 3 & -2 \\ 2 & -2 & 3 \end{pmatrix} \begin{pmatrix} 1 & 0 & -\frac{2}{3} \\ 0 & 1 & -\frac{1}{2} \\ 0 & 1 & \frac{1}{2} \end{pmatrix} = \begin{pmatrix} 3 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & \frac{7}{6} \end{pmatrix}. $$
Could someone please explain or give me a hint in the right direction as to what method is being used to diagonalize this matrix.
I understand that performing these operations is equivalent to multiplying with an elementary matrix so we want to them simultaneously with the identity matrix.
I dont quite understand the logic behind the first step and why the result at the end holds.