Diagonalising a $2 \times 2$ symmetric matrix According to the spectral decomposition theorem, every real symmetric matrix has a spectrum (it can be diagonalised by an orthonormal matrix). Moreover, it can be shown that the diagnolising matrix is its eigenmatrix. I need to use use this to diagnolise the matrix $C$, and I must elaborate the calculations.
I have this matrix:
$$ C = \begin{bmatrix} 5.6 & 7.2\\ 7.2 & 10.8 \end{bmatrix} $$
So $C$ is symmetric. If there is an invertible $n\times n$ matrix $Q$, and a diagonal matrix $D$ such that $C = QDQ^{-1}$, then an $n\times n$ matrix $C$ is diagonalisable.
First, I need to detect the eigenvalues of the matrix, so:
$$\det(C - \lambda I) = 0$$
$$\det\left(\left[\begin{matrix}
5.6&7.2\\\\
7.2&10.8\\
\end{matrix}\right] - \lambda \left[\begin{matrix}
1&0\\\\
0&1\\
\end{matrix}\right]\right)=0$$
$$\det\left[\begin{matrix}
5.6 - \lambda&7.2\\\\
7.2&10.8 - \lambda\\
\end{matrix}\right] = 0$$
Now solving the determinant:
$$(5.6 - \lambda)(10.8 - \lambda) - (7.2)^2 = 0$$
$$60.48 - 5.6\lambda - 10.8 \lambda + \lambda^2 -51.84 = 0$$
$$8.64 - 16.4\lambda + \lambda^2 = 0$$
We get $\lambda_1 = 15.8551$ and $\lambda_2 = 0.544936$
Hence, we got this diagonal matrix $D =\left[\begin{matrix}
15.8551&0\\\\
0&0.544936\\
\end{matrix}\right]$
The next step is to find the corresponding eigenvectors which we will use as the columns of matrix $Q$. So, we start with $\lambda_1=15.8551$ , and we assign vector $x$, and this vector is an eigenvector:
$$(C - \lambda I)x = 0$$
$$\left(\left[\begin{matrix}
5.6&7.2\\\\
7.2&10.8\\
\end{matrix}\right] - (15.8551) \left[\begin{matrix}
1&0\\\\
0&1\\
\end{matrix}\right]\right)x = 0$$
After calculations, we get:
$$\left[\begin{matrix}
-10.2551&7.2\\\\
7.2&-5.0551\\
\end{matrix}\right] \left[\begin{matrix}
x_1\\\\
x_2\\
\end{matrix}\right] = \left[\begin{matrix}
0\\\\
0\\
\end{matrix}\right]$$
Write the equations which results in multiplying the matrix with vector $x$:
$$-10.2551x_1 + 7.2x_2 = 0$$
$$7.2x_1 - 5.0551x_2 = 0$$
After solving I get $x_1 = 0$ and $x_2 = 0$
And those are the eigervectors for $\lambda_1 = 15.8551$, but I get the same result for $\lambda_2 = 0.544936$. Which means that $Q$ is an all-zero matrix, and that matrix is non-invertible, which is not good, cause this way I can't diagonalise $C$.
So there it is, this is my problem, I'm stuck at this $Q$ matrix, I must be doing something wrong but I don't know what it is exactly. $Q$ must be invertible, how can I find it?
Thank you!
 A: For a $2 \times 2$ symmetric matrix $C$, there is a guaranteed method to diagnolize it, and write it as $ C = R D R^T $, where $D$ is a diagonal matrix of the eigenvalues and $R$ is a unitary matrix whose columns are the corresponding eigenvectors.  The method goes as follows
Find $\theta = \dfrac{1}{2} \tan^{-1} \dfrac{2 C_{12} } { C_{11} - C_{22} } $
Then
$ R = \begin{bmatrix} \cos \theta && - \sin \theta \\ \sin \theta && \cos \theta \end{bmatrix} $
And the diagonal elements of $D$ (whare are the eigenvalues) are given by
$ D_{11} = C_{11} \cos^2 \theta + C_{22} \sin^2 \theta + 2 C_{12} \sin \theta \cos \theta $
$D_{22} = C_{11} \sin^2 \theta + C_{22} \cos^2 \theta - 2 C_{12} \sin \theta \cos \theta $
Applying this to your matrix
$ C = \begin{bmatrix} 5.6 && 7.2 \\ 7.2 && 10.8 \end{bmatrix} $
Then
$ \theta = \dfrac{1}{2} \tan^{-1} \dfrac{ 2(7.2) }{ 5.6 - 10.8} =\dfrac{1}{2} \tan^{-1} (-2.76923076923) = -0.61212873118 $
Therefore,
$ R = \begin{bmatrix} 0.81842668 && 0.5746109711 \\ -0.5746109711 && 0.81842668 \end{bmatrix} $
And
$ D = \begin{bmatrix} 0.5449363164 && 0 \\ 0 &&  15.8550636836 \end{bmatrix} $
A: Let's start with your $\lambda_1$. The matrix $C-\lambda_1I$ has determinant 0 because $\lambda_1$ is an eigenvalue. Thus the rows of $C-\lambda_1I$ are linearly dependent. Since we are in the $2 \times 2$ case each row is a scalar multiple of the other, which means that any solution of the ftrst equation for $x_1 \text { and } x_2$ will also satisty the second equation. A very easy solution of the first equation is $x_1=7.2, x_2=10.2551.$ So $\mathbf v_1=[7.2, 10.2551]^T$ is an eigenvector. Do  the same with $\lambda_2$ to obtatn the eigenvector $\mathbf v_2$. The eigenvectors $\mathbf v_1$ and $\mathbf v_2$ come from different eigenvalues, so they are linearly independent. (Since $C$ is symmetric, $\mathbf v_1$ and $\mathbf v_2$ are orthogonal, which is an even stronger relation than being linearly independent, but we don't need tha fact right now, although it will soon be useful.)So if we form the matrix $Q$ by writing the column vectors $\mathbf v_1$ and $\mathbf v_2$ side by side, $Q=\mathbf{[v_1 \vdots v_2]}$, then $Q$ is invertible and $$Q^{-1}CQ=\text{diag}(\lambda_1,\lambda_2).$$
So far, we haven't made much use of the fact that $C$ is symmetric, althotugh it is good to know that the eigenvalutes of a symmetric matrix are real.Now let us show how we can diagonalize a symmetric matrix by a very special kind of matrix. Divide each eigenvector by its norm ,i.e. let $$\mathbf{w_1=\frac{1}{\Vert v_1 \Vert}v_1,w_2=\frac{1}{\Vert v_2\Vert}v_2}$$ Then the set $\{\mathbf{w_1,w_2} \}$  is an orhonormal set of eigenvectors. so the matrix $M=[\mathbf{w_1 \vdots w_2}]$ is orthogonal and $$M^{-1}CM=\text{diaag}(\lambda_1.\lambda_2)$$. Note that, since $M$ is orthogonal, $M^{-1}=M^T$ Infact, we can do even better. Since $M$ is orthogtnal $\det M=\pm 1$. If the determinant is -1, multiply a collumn by -1; the matrix will still be orthogonal and will still diagonalize $C$ but its determinant will be 1. So it is alwayss possible to tiagonalize a symmetric matrix by a real orthogonal matrix of determinant 1.
A: We can rationalize the matrix $C$ and do exact calculations to avoid numerical issues.
We have
$$C = \begin{bmatrix} \dfrac{28}{5} & \dfrac{36}{5}\\ \dfrac{36}{5} & \dfrac{54}{5}  \end{bmatrix}$$
The eigenvalues are found using $|C - \lambda I| = 0$
$$\lambda^2 -\dfrac{82 \lambda}{5}+\dfrac{216}{25} = 0 \implies \lambda_1 = \dfrac{1}{5} \left(41-\sqrt{1465}\right), \lambda_2 = \frac{1}{5} \left(\sqrt{1465}+41\right)$$
To find the first eigenvector, we solve $[C - \lambda_1 I]v_1= [C -\dfrac{1}{5} \left(41-\sqrt{1465}\right)I]v_1= 0$.
The RREF of the previous steps is
$$\begin{bmatrix}
 1 & \dfrac{1}{36} \left(\sqrt{1465}+13\right)\\ 0 & 0 \\
\end{bmatrix}v_1 = \begin{bmatrix} 0 & 0 \\ 0 & 0\end{bmatrix}$$
We can choose
$$v_1 = \begin{bmatrix} \dfrac{1}{36} \left(-\sqrt{1465}-13\right) \\  1 \end{bmatrix}$$
Repeat this process to find the other eigenvector as
$$v_2 \begin{bmatrix} \dfrac{1}{36} \left(\sqrt{1465}-13\right) \\ 1 \end{bmatrix}$$
