Given a $4\times 4$ symmetric matrix, is there an efficient way to find its eigenvalues and diagonalize it? I have a $4\times 4$ matrix $$A=\left(\begin{array}{cccc}8 & 11 & 4 & 3\\11 & 12 & 4 & 7\\4 & 4 & 7 & 12\\3 & 7 & 12 & 17\end{array}\right).$$ I want to do the things I describe below.

*

*Find the eigenvalues.


*Find a  unitary matrix $P$ (if there is any) so that the matrix $(P^{-1})AP$ is diagonal.


*Find (if there are any) an identity matrix $Q$ and an upper triangular matrix $R$ so that $A=QR$.
Comments (item by  item)

*

*I want to know if there is a better way than calculating $\det(A-\lambda I)$.


*Well for this I think I have the answer as the matrix A is symmetric that means that it has 4 distinct eigenvectors that are orthogonal with each other also P a matrix composed by using the eigenvectors as columns gives us that $(P^{-1})AP$ = with the diagonal form of A. And P is unitary as if we take the inner product of all the eigenvectors with each other we get 0 since they are orthogonal with each other. Is there a flaw to the way i am thinking?


*I tried to solve this using the Gram–Schmidt process I found the first column of Q but then the numbers get too big and gets hard to compute. I have been thinking maybe symmetric matrices have some better way for QR decomposition
 A: I didn't notice the OP was asking for an easier way to unitary diagonalize a matrix. I'll leave this answer here, just because I find this algorithm interesting.

Regarding points 1) and 2), let me introduce an interesting algorithm to diagonalize a real symmetric matrix using only elementary row operations (taken from Schaum's Outline of Theory and Problems of Linear Algebra, by Lipschutz and Lipson). 



And here is a worked example of the above mentioned algorithm:

A: For correct results to compare your own solutions against, you can use Wolfram Alpha.

1: Find the eigenvalues (I want to know if there is a better way than calculating $\det(A−\lambda I)$).

If approximate solutions are acceptable, then you can look in to numeric methods for computing these. See computing the eigenvalues, eigenvalue algorithm and, looking at question 3, also QR algorithm. But if you are to do this by hand, then I'd go for this determinant, since manually performing iterative approaches is even more tedious than manually computing roots of fourth degree polynomials.

2: […] for this i think i have the answear […]

Sounds right, except you might have to normalize your eigenvectors to unit length.

3: Find (if there are any) an identity matrix $Q$ and an upper triangular matrix $R$ so that $A=QR$. (I tried to solve this using the Gram–Schmidt process i found the first collum of $Q$ but then the numbers get too big and gets hard to compute. I have been thinking maybe symmetric matrices have some better way for QR decomposition)

QR Decomposition mentions two more ways to calculate this, namely Housholder reflection and Givens rotations. Neither mentions any explicit gains for symmetric matrices, and Givens rotations in particular seem to work best with sparse matrices. The numbers involved will have up to 6 digits in numerator and denominator, but if you keep taking the square roots till the very end, then this should still be possible. Definitely possible with a pocket calculator. And probably still easier than the eigenvalues, given the numbers involved.
Wolfram Alpha can solve this task as well, but the solution is far from unique, so here it won't be so much use to compare your own solutions against those.
