Finding a congruent matrix I have the matrix 
$$A =\begin{pmatrix}0&1\\1&0\end{pmatrix}$$
How would I diagonalize it using elementary row operations? It's been a while since I've worked with them so I'm doubting myself when doing the same operations to both columns and rows. Steps would be much appreciated. 
 A: I note that the question refers to "doing the same operations to both columns and rows," so maybe this is what's intended. 
Starting with $$\pmatrix{0&1\cr1&0\cr}$$ add the 2nd row to the 1st, then add the 2nd column to the 1st; you get $$\pmatrix{1&1\cr1&0\cr}{\rm\ then\ }\pmatrix{2&1\cr1&0\cr}$$ Now subtract half the 1st row from the 2nd, followed by subtracting half the 1st column from the second; $$\pmatrix{2&1\cr0&-1/2\cr}{\rm\ then\ }\pmatrix{2&0\cr0&-1/2\cr}$$ and there's your diagonal matrix. 
Now, adding $a$ times the 2nd row to the 1st is the same as multiplying on the left by $$\pmatrix{1&a\cr0&1\cr}$$ and adding $a$ times the 2nd column to the 1st is the same as multiplying on the right by the transpose, $$\pmatrix{1&0\cr a&1\cr}$$ So we really are getting $A=P^tBP$ with $B$ diagonal, and you can walk through the steps to see what $P$ is. 
A: Note that your matrix is symmetric, so you know from the start that there exists an orthogonal matrix $P$ such that $P^tAP=P^{-1}AP$ is diagonal.
Now compute the determinant of $XI-A$ to find the characteristic polynomial of $A$. You'll find
$$
p_A(X)=X^2-1=(X-1)(X+1).
$$
So the eigenvalues are $-1$ and $+1$.
To look for an eigenvector associated with $1$, you must solve the system
$$
A\left(\matrix{x\\y}\right)=\left(\matrix{x\\y}\right).
$$
There are not so many elementary row operations to perform to find that $x=y$.
To get a unit vector such that $x=y$, we take $(1/\sqrt{2},1\sqrt{2})$.
Doing the same with the eigenvalue $-1$, we find $(1/\sqrt{2},-1\sqrt{2})$.
Now set 
$$
P:=\left( \matrix{\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & - \frac{1}{\sqrt{2}}}\right).
$$
You can check, you have 
$$
P^tAP=P^{-1}AP=\left(\matrix{1&0\\0&-1}\right).
$$
So $A$ and this diagonal matrix are similar, and congruent.
