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!

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.
