Could you give me your feedback ? I've verified with https://matrix.reshish.com/rankCalculation.php but maybe there are things that could be done differently
Determine the rank of the following matrices
$$ A = \begin{bmatrix} 2 & 1 & -2 & 1 \\ 4 & 1 & -2 & -3 \\ 1 & -1 & 2 & -3 \\ 2 & 2 & -4 & -5 \\ 3 & 1 & -2 & 2 \end{bmatrix}, B = \begin{bmatrix} 1 & 2 & 1 \\ 2 & 1 & 1 \\ 1 & 2 & 2 \\ 2 & 1 & 0 \\ \end{bmatrix}, C = \begin{bmatrix} 1 & 1 & 0 \\ -1 & 2 & 2 \\ 2 & -13 & -10 \\ 2 & -1 & -2 \\ \end{bmatrix}$$
For $A$, add 2 first row to second row, 1/2 first row to third row, 1 first row to fourth row, 3/2 first row to fifth row. Then add -3/2 second row to third row, add 1 second row to fourth row, add -1/2 second row to fifth row. That will zero out the third column too below the second row. Lastly, for the fourth column, add 11/4 third row to fourth row, add -3/4 third row to fifth row. We get
$$\begin{bmatrix} 2 & 1 & -2 & 1 \\ 0 & -1 & 2 & -5 \\ 0 & 0 & 0 & 4 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix}$$ which has rank 3.
For $B$, add -2 first row to second row, -1 first row to third row, -2 first row to fourth row. Then add -1 second row to fourth row, add 1 third row to fourth row. We get
$$\begin{bmatrix} 1 & 2 & 1 \\ 0 & -3 & -1 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \\ \end{bmatrix}$$ which has rank 3.
For $C$, add -1 first row to second row, add -2 first row to third row, add -2 first row to fourth row. Then add 5 second row to third row, 1 second row to fourth row. We get
$$\begin{bmatrix} 1 & 1 & 0 \\ 0 & 3 & 2 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ \end{bmatrix}$$ whihc has rank 2.
Is this correct ? Could you give me your feedback ?
Thanks for your help
You should write the result each row reduction, this helps avoid mistakes and it's a good practice for this calculation.
Now, returning the question
$A$ is similar by row reduction to $\begin{bmatrix}\boxed{1}&0&0&0\\0&\boxed{1}&-2&0\\0&0&0&\boxed{1}\\0&0&0&0\\0&0&0&0\end{bmatrix}$ so $\rm rank (A)=3$.
$B$ is similar by row reduction to $\begin{bmatrix}\boxed{1}&0&0\\0&\boxed{1}&0\\0&0&\boxed{1}\\0&0&0\end{bmatrix}$ so $\rm rank(B)=3$.
$C$ is similar by row reduction to $\begin{bmatrix}\boxed{1}&0&-2/3\\ 0&\boxed{1}&2/3\\0&0&0\\0&0&0\end{bmatrix}$ so $\rm rank( C)= 2$.
Here, we're pivoting with $1$ but we can pivote with a number different of $0$ and $1$ as we can see in your approach. So your conclusion they're correct.