<s>[INST] Find $P$ such that $P^TAP = D$ where $D$ is a diagonal matrix. 
Let $$A = \left(\begin{array}{cc} 2&3 \\ 3&4  \end{array}\right) \in
M_n(\mathbb{C})$$
Find $P$ such that $P^TAP = D$ where $D$ is a diagonal matrix.

How can I find $P$? I am doing Gauss but it does not work?$$A = \left(\begin{array}{cc|cc} 2&3&1&0\\ 3&4&0&1    \end{array}\right) \sim \left(\begin{array}{cc|cc} 2&0&-8&6\\ 0&-1/2&-3/2&1    \end{array}\right)$$
What am I doing wrong? Steps would be much appreciated.
 [/INST] I think Jose comes closest to solving this problem in the way that I would, but his answer doesn't expand too much on the why of it all, so I'm writing up a separate answer. 
If there is such a $D$ and $P$ such that $A = P^T D P$, then we say that $A$ is diagonalizable. One can prove that a valid diagonalization of $A$ sets $P:= \left\{\text{normalized eigenvectors of A}\right\}$, an orthogonal matrix (such that $P^T = P^{-1}$), and $D:=diag(\text{eigenvalues of A})$. So indeed, solving this problem reduces to finding the eigenvalues and eigenvectors of $A$. There are many ways to derive the eigensystem of a matrix, but below is my solution.

For an eigenvalue $\lambda$, we must have $\det(\lambda I - A) = 0 \implies \lambda^2 - 6 \lambda - 1 = 0$. The two solutions are $\lambda = 3 \pm \sqrt{10}$.
For $\lambda_1 = 3 + \sqrt{10}$, we have:
$$\begin{aligned}
\mathbf{0} = (\lambda I-A)v &= \begin{pmatrix} 1+\sqrt{10} & -3\\ -3 & -1+\sqrt{10}\end{pmatrix}\begin{pmatrix}v_1\\ v_2 \end{pmatrix}\\
\implies v &= \begin{pmatrix} c\\ (1+\sqrt{10}) c/3\end{pmatrix}
\end{aligned}$$
For $\lambda_2 = 3 - \sqrt{10}$, we have:
$$\begin{aligned}
\mathbf{0} = (\lambda I-A)v &= \begin{pmatrix} 1-\sqrt{10} & -3\\ -3 & -1-\sqrt{10}\end{pmatrix}\begin{pmatrix}v_1\\ v_2 \end{pmatrix}\\
\implies v &= \begin{pmatrix} c \\ (1-\sqrt{10}) c/3\end{pmatrix}
\end{aligned}$$
And while this is incredibly painful to normalize by hand, our matrices ends up being:
$$P = \begin{aligned}
\cfrac{1}{\sqrt{20-2\sqrt{10}}}\begin{pmatrix}\sqrt{10} - 1 & 3\\ 3 & 1-\sqrt{10} \end{pmatrix},\qquad D = \begin{pmatrix}3+\sqrt{10} & 0\\ 0 & 3-\sqrt{10} \end{pmatrix}
\end{aligned}$$
</s>