Converting inner product matrix to an identity matrix I'm working on a practice exam, and I am having a lot trouble finding the solution to this problem. The solution's are posted, however they seem to be completely computationally wrong. In the hours I have been working on this I have kind of lost all comprehension of the problem. 
$$
        A = \begin{pmatrix} 3&1 \\1&3 \\ \end{pmatrix}
$$
Find S such that:
$$
S^T\cdot A\cdot S = \begin{pmatrix}1&0\\0&1\end{pmatrix}
$$
I recognize that:
$$
v^T\cdot A\cdot w 
$$
conforms to the axioms of an inner product and I am certain this comes into play, and I'm sure the Gram-Schmidt process needs to be applied somehow as well, but I can't fully grasp how to continue. Any help would be appreciated. 
To be clear I see that we can diagonalize this matrix easily to:
$$
\begin{pmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}&-\frac{1}{\sqrt{2}}\end{pmatrix}\cdot\begin{pmatrix} 3&1 \\1&3 \\ \end{pmatrix}\cdot \begin{pmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}&-\frac{1}{\sqrt{2}}\end{pmatrix} = \begin{pmatrix} 4&0\\0&2\end{pmatrix}
$$
and I see:
$$
K = \begin{pmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}&-\frac{1}{\sqrt{2}}\end{pmatrix} = K^T = K^{-1}
$$
and
$$
K^2 = \begin{pmatrix} 1&0\\0&1\end{pmatrix}
$$
But I'm not sure where to go from here. 
 A: Some hints I hope help you on the right track.


*

*If you manage to find a diagonalization of a matrix A , that means that ${\bf TDT}^{-1} = {\bf A}$ for a diagonal matrix $\bf D$ and some matrix $\bf T$.

*If the matrix ${\bf A}$ is symmetric, one can show that we can find $\bf D$ and ${\bf T}$ so that ${\bf T}^{-1} = {\bf T}^T$ this is known as the spectral theorem.


Now you need to find out what to do to find a diagonalization. It has to do with finding eigenvalues : solution to $\det({\bf A}-\lambda {\bf I}) = 0$ and eigenvectors which are the vectors $\bf v$ satisfying the equations $({\bf A}-\lambda {\bf I}) {\bf v} = {\bf 0}$ for those $\lambda$. Once you have a diagonalization then you can figure out what to do to turn the diagonal matrix into an identity matrix.

EDIT
What is left after you found diagonalization is basically to find $P$ so that $$P\left(\begin{array}{cc}4&0\\0&2\end{array}\right)P^T = \left(\begin{array}{cc}1&0\\0&1\end{array}\right)$$
So just assume $P = \left(\begin{array}{cc}p_1&p_2\\p_3&p_4\end{array}\right)$ and see what equations you will be getting when you multiply stuff together and solve those. Then when you have found $P$ you can multiply both sides of the diagonalization equation with $P$ and $P^T$ respectively and see what the various products of $K$ and $P$ and their transposes become.
