Symmetric and diagonalizable matrix-Jacob method: finding $p$ and $q$ Given this symmetric matrix-$A$:
$\begin{pmatrix}
14 &14  & 8 &12 \\ 
14 &17  &11  &14 \\ 
 8& 11 &11  &10 \\ 
12 & 14 &10  & 12
\end{pmatrix}$
I need to find $p,q$ such that $p$ is the number of 1's and $q$ is the number of -1's
in the diagonalizable matrix $D_{p,q}$ such that  $D_{p,q}$= Diag {$1,1,\ldots 1,-1,-1, \ldots-1,0,0,\ldots0$}.
$D=P^{t}AP$ while $P$ is the the matrix that contains the eigenvectors of $A$ as a Columns.
I tried to use Jacobi method but I found out that $|A|=0$, so I can't use it, but I know now that $0$ is an eigenvalue of $A$, So Do I really need to compute $P$ in order to find  $p$ and $q$? It's a very long and messy process.
Thank you

The characteristic polynomial of $A$ is $P(x)= x^4 - 54x^3 + 262x^2 - 192x
$. It has $0$ as a simple root, and the other three are positive. Therefore $A$ has three positive eigenvalues and one equal to zero. Since the signature can be obtained from the signs of the eigenvalues, we are done. Therefore $p=3,q=0$.
