[Math] Finding a congruent matrix

linear algebramatrices

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.

Best Answer

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.