Find the rank of the following matrix depending on $\lambda\in\Bbb R$ Find the rank of the following matrix depending on $\lambda\in\Bbb R$.
$$A=\begin{pmatrix}
1&2&3&4\\
2&\lambda&6&7\\
3&6&8&9\\
4&7&9&10
\end{pmatrix}$$
My attempt:
$$\begin{pmatrix}
1&2&3&4\\
2&\lambda&6&7\\
3&6&8&9\\
4&7&9&10
\end{pmatrix}\sim\begin{pmatrix}
1&2&3&4\\
0&\lambda-4&0&-1\\
0&0&-1&-3\\
0&-1&-3&-6
\end{pmatrix}\sim\begin{pmatrix}
1&0&-3&-8\\
0&\lambda-4&0&-1\\
0&0&-1&-3\\
0&-1&-3&-6\\
\end{pmatrix}$$
For $\lambda=4$ we have: 
$$\begin{pmatrix}
1 &0&-3&-8\\
0&0&0&-1\\
0&0&-1&-3\\
0&-1&-3&-6
\end{pmatrix}\sim\begin{pmatrix}
1&0&0&1\\
0&0&0&-1\\
0&0&-1&-3\\
0&-1&0&3\end{pmatrix}\sim\begin{pmatrix}
1&0&0&0\\
0&0&0&-1\\
0&0&-1&0\\
0&-1&0&0\\
\end{pmatrix}$$
$\Rightarrow r(A)=4$
For $\lambda\neq 4$ we have:
$$\begin{pmatrix}
1&0&0&1\\
0&\lambda-4&0&-1\\
0&0&-1&-3\\
0&-1&0&3\\
\end{pmatrix}\sim\begin{pmatrix}
1&0&0&1\\
0&0&0&3\lambda-13\\
0&0&-1&-3\\
0&-1&0&3
\end{pmatrix}$$
For$\lambda=\frac{13}{3}\Rightarrow r(A)=3$ and for $\lambda\neq \frac{13}{3} \Rightarrow r(A)=4$
Is this correct? Thanks!
 A: It looks fine to me!! Or, we have $A=\begin{pmatrix}
1&2&3&4\\
2&\lambda&6&7\\
3&6&8&9\\
4&7&9&10
\end{pmatrix}$ with $\lambda \in \Bbb{R}$ and we know: $$r(A) \leq 4 \text{ and } \big[r(A)= 4 \leftrightarrow \det(A)\neq 0\big]$$
We have $\displaystyle\det(A)= 13 - 3 \lambda$ therefore: $$ r(A) =4\leftrightarrow \bigg(\det(A) \neq 0 \leftrightarrow 13 - 3 \lambda \neq 0 \leftrightarrow 13 \neq 3 \lambda \leftrightarrow \lambda \neq \frac{13}{3}\bigg)$$ $$4 \neq r(A) < 4\leftrightarrow\bigg(\det(A)=0 \leftrightarrow 13 - 3 \lambda = 0 \leftrightarrow 13 = 3 \leftrightarrow \lambda=\frac{13}{3} \bigg) $$
But if $\det(A)=0$ and exists a $T \in M(A)_{3}$ with $\det(T) \neq 0$ and such that for all $R\in M(A)_{3+1=4}$ which contain $T$ we have $\det(R)=0$ then $r(A)=3$ 
$(M(A)_{n}:=\{X| X \text{ is minor of order }n \text{ for }A\})$
And, with $\lambda=\frac{13}{3}$, we have a $T \in M(A)_{3}$ with $\det(T) \neq 0$: $$\det(T)=\det\begin{pmatrix}
2&\frac{13}{3}&6\\
3&6&8\\
4&7&9
\end{pmatrix}=\frac{-1}{3}\neq 0$$ and $M(A)_{3+1=4}=\{A\}$ and $\det(A)=0$ because $\lambda=\frac{13}{3}$ then $r(A)=3$
Summary: 
$r(A)=4 \leftrightarrow  \Bbb{R}\ni\lambda\neq \frac{13}{3}$
$r(A)=3 \leftrightarrow  \Bbb{R}\ni\lambda =\frac{13}{3}$
A: I will point out that you can also check the result in Wolfram Alpha.
Here is my computation - rather similar to yours.
$$\begin{pmatrix}
 1 & 2 & 3 & 4\\
 2 &\lambda& 6 & 7\\
 3 & 6 & 8 & 9\\
 4 & 7 & 9 &10
\end{pmatrix}\overset{(1)}\sim
\begin{pmatrix}
 1 & 2 & 3 & 4\\
 2 &\lambda& 6 & 7\\
 3 & 6 & 8 & 9\\
 1 & 1 & 1 & 1
\end{pmatrix}\sim
\begin{pmatrix}
 0 & 1 & 2 & 3\\
 0 &\lambda-2& 4 & 5\\
 0 & 3 & 5 & 6\\
 1 & 1 & 1 & 1
\end{pmatrix}\overset{(2)}\sim
\begin{pmatrix}
 0 & 1 & 2 & 3\\
 0 &\lambda-2& 4 & 5\\
 0 & 1 & 1 & 0\\
 1 & 1 & 1 & 1
\end{pmatrix}\sim
\begin{pmatrix}
 0 & 1 & 2 & 3\\
 0 &\lambda-2& 4 & 5\\
 0 & 1 & 1 & 0\\
 1 & 1 & 1 & 1
\end{pmatrix}\sim
\begin{pmatrix}
 0 & 0 & 1 & 3\\
 0 & 0 & 6-\lambda & 5\\
 0 & 1 & 1 & 0\\
 1 & 1 & 1 & 1
\end{pmatrix}\sim
\begin{pmatrix}
 0 & 0 & 1 & 3\\
 0 & 0 & 0 & 3\lambda-13\\
 0 & 1 & 1 & 0\\
 1 & 1 & 1 & 1
\end{pmatrix}\sim
\begin{pmatrix}
 1 & 1 & 1 & 1\\
 0 & 1 & 1 & 0\\
 0 & 0 & 1 & 3\\
 0 & 0 & 0 & 3\lambda-13
\end{pmatrix}$$
$(1)$: Subtracted third row from the last one.
$(2)$: Subtracted twice the first row from the last one.
In both cases I did so because the resulting row seemed to be simple (only zeroes and ones), which made further row operations a bit easier.
From the final matrix we see that rank is three if $3\lambda-13=0$ and in all other cases rank in equal to four.
