<s>[INST] The rank of a matrix, dependent on the value of $t$ I'm trying to analyse the rank of the following matrix, for $t\in \mathbb{R}$.
$$\begin{bmatrix}
    t+3 & 5 & 6 \\
    -1 & t-3 & -6 \\
    1 & 1 & t+4
\end{bmatrix}$$
With $R_1\leftrightarrow R_3$, $-(t+3)R_1+R_3 \rightarrow R_3$, $R_1+R_2 \rightarrow R_2$, and finally $-R_2+R_3\rightarrow R_3$. I get 
$$\begin{bmatrix}
    1 & 1 & t-4 \\
    0 & t-2 & t-2 \\
    0 & 0 & -t^2-8t-4
\end{bmatrix}$$
And this makes that when $t=2$ or $t=2(-2 \pm \sqrt{3})$. However, these values are not what they are supposed to give(-2,2,4). Where did I make a mistake? Any help would be appreciated.
 [/INST] \begin{align}
\begin{bmatrix}
    t+3 & 5 & 6 \\
    -1 & t-3 & -6 \\
    1 & 1 & t+4
\end{bmatrix}
&\to
\begin{bmatrix}
    1 & 1 & t+4 \\
    -1 & t-3 & -6 \\
    t+3 & 5 & 6 \\
\end{bmatrix}
&&R_1\leftrightarrow R_3
\\
&\to
\begin{bmatrix}
1   & 1   & t+4 \\
0   & t-2 & t-2 \\
t+3 & 5   & 6 \\
\end{bmatrix}
&&R_2\gets R_2+R_1
\\
&\to
\begin{bmatrix}
1 & 1   & t+4 \\
0 & t-2 & t-2 \\
0 & 2-t & -t^2-7t-6 \\
\end{bmatrix}
&&R_3\gets R_3-(t+3)R_1
\\
&\to
\begin{bmatrix}
1 & 1   & t+4 \\
0 & t-2 & t-2 \\
0 & 0   & -t^2-6t-8 \\
\end{bmatrix}
&&R_3\gets R_3+R_1
\end{align}
The roots of $-t^2-6t-8$ are $-2$ and $-4$. 


*

*If $t\notin\{2,-2,-4\}$ the rank is $3$. 

*If $t=2$, the rank is $2$.

*If $t=-2$ or $t=-4$, the rank is $2$.
The result you're given is wrong. The numbers $-2$, $2$ and $4$ are the eigenvalues of
$$
A=\begin{bmatrix}
3 & 5 & 6 \\
-1 & -3 & -6 \\
1 & 1 & 4
\end{bmatrix}
$$
and your case is finding the eigenvalues of $-A$.
</s>