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.
The problem is the last elementary operation. I should have done $R_2+R_3\rightarrow R_3$
Then I would have obtained $$\begin{bmatrix} 1 & 1 & t-4 \\ 0 & t-2 & t-2 \\ 0 & 0 & -t^2-6t-8 \end{bmatrix}$$ Giving the correct values for $t$.