I need to find an orthogonal matrix $P$ such that $P^tAP$ is diagonal, where:
$A=\begin{pmatrix} 1&1&1&1\\ 1&1&1&1\\ 1&1&1&1\\ 1&1&1&1 \end{pmatrix} $
I know that this matrix $P$ exists because $A^tA=AA^t$ ($A$ is normal).
The characteristic polynomial of $A$ is $p(x)=x^3(x-4)$. The eigenvectors are $v_1=(-1,1,0,0)$, $v_2=(-1,0,1,0)$, $v_3(-1,0,0,1)$ (for $x=0$) and $v_4=(1,1,1,1)$ (for $x=4$).
I know eigenvectors associated with different eigenvalues ββare orthogonal, but $v_1,v_2,v_3$ are not orthogonal vectors.
I try to find $P$ applying Gram-Schmit procedure with $v_1,v_2,v_3,v_4$ but with this matrix do not hold that $P^tAP$ is diagonal.
Is this idea correct? maybe I'm making a miscalculation to find $P$ or I'm doing something else wrong?
Thanks for your help.