Having the same rank does not mean they are row-equivalent.

For a simple counterexample, consider $A = \begin{bmatrix} 1 & 0 \end{bmatrix}$ and $B = \begin{bmatrix} 0 & 1 \end{bmatrix}$.

Both of these matrices have rank 1, but are not row-equivalent because they are already in reduced row echelon form.

Another solution.

The problem doesn’t specify the sizes of matrices $A$, $B$.

Note that if the sizes of $A$ and $B$ are distinct, then they can never be row-equivalent.
Keeping this in mind, let us consider the following two matrices.

\[A=\begin{bmatrix}
1 \\
0
\end{bmatrix} \text{ and } B=\begin{bmatrix}
1 & 0
\end{bmatrix}.\]
Then both matrices are in reduced row echelon form and have rank $1$.
As noted above, they are not row-equivalent because the sizes are distinct.

Find the Inverse Matrices if Matrices are Invertible by Elementary Row Operations
For each of the following $3\times 3$ matrices $A$, determine whether $A$ is invertible and find the inverse $A^{-1}$ if exists by computing the augmented matrix $[A|I]$, where $I$ is the $3\times 3$ identity matrix.
(a) $A=\begin{bmatrix}
1 & 3 & -2 \\
2 &3 &0 \\
[…]

Find a Row-Equivalent Matrix which is in Reduced Row Echelon Form and Determine the Rank
For each of the following matrices, find a row-equivalent matrix which is in reduced row echelon form. Then determine the rank of each matrix.
(a) $A = \begin{bmatrix} 1 & 3 \\ -2 & 2 \end{bmatrix}$.
(b) $B = \begin{bmatrix} 2 & 6 & -2 \\ 3 & -2 & 8 \end{bmatrix}$.
(c) $C […]

Find the Rank of a Matrix with a Parameter
Find the rank of the following real matrix.
\[ \begin{bmatrix}
a & 1 & 2 \\
1 &1 &1 \\
-1 & 1 & 1-a
\end{bmatrix},\]
where $a$ is a real number.
(Kyoto University, Linear Algebra Exam)
Solution.
The rank is the number of nonzero rows of a […]

Find Values of $a$ so that the Matrix is Nonsingular
Let $A$ be the following $3 \times 3$ matrix.
\[A=\begin{bmatrix}
1 & 1 & -1 \\
0 &1 &2 \\
1 & 1 & a
\end{bmatrix}.\]
Determine the values of $a$ so that the matrix $A$ is nonsingular.
Solution.
We use the fact that a matrix is nonsingular if and only if […]

Row Equivalent Matrix, Bases for the Null Space, Range, and Row Space of a Matrix
Let \[A=\begin{bmatrix}
1 & 1 & 2 \\
2 &2 &4 \\
2 & 3 & 5
\end{bmatrix}.\]
(a) Find a matrix $B$ in reduced row echelon form such that $B$ is row equivalent to the matrix $A$.
(b) Find a basis for the null space of $A$.
(c) Find a basis for the range of $A$ that […]

Condition that Two Matrices are Row Equivalent
We say that two $m\times n$ matrices are row equivalent if one can be obtained from the other by a sequence of elementary row operations.
Let $A$ and $I$ be $2\times 2$ matrices defined as follows.
\[A=\begin{bmatrix}
1 & b\\
c& d
\end{bmatrix}, \qquad […]

For What Values of $a$, Is the Matrix Nonsingular?
Determine the values of a real number $a$ such that the matrix
\[A=\begin{bmatrix}
3 & 0 & a \\
2 &3 &0 \\
0 & 18a & a+1
\end{bmatrix}\]
is nonsingular.
Solution.
We apply elementary row operations and obtain:
\begin{align*}
A=\begin{bmatrix}
3 & 0 & a […]