A and B have the same row space if and only if they are row equivalent I know that if $A$ and $B$ are row equivalent then they have the row space because elementary row operations do not change the row space.
I don't see how to prove that if $A$ and $B$ have the same row space then they are row equivalent. I've just noticed that if $A$ and $B$ have the same row space, then there exists matrices $C$ and $D$ such that $A = CB$ and $B = DA$. From there, I should prove that $C, D$ are invertible, but I don't know how to do it. Can you help from here?
 A: We say that two matrices $A, B$ are row equivalent if it is possible to transform $A$ into $B$ by one of the following elementary row operation:

*

*Swap: Swap two rows of a matrix.

*Scale: Multiply a row of a matrix by a nonzero constant.

*Pivot: Add a multiple of one row of a matrix to another row.

The matrices $C$ and $D$ you talked about are just a finite composition of these 3 operations. Try to show that these operations are invertible, then use the fact that a finite composition of invertible operations is invertible.
A: You are correct to point out that if $A$ and $B$ have the same row space, then there exist $m \times m$ matrices $C$ and $D$ such that $A = CB$ and $B = DA$. However, it is false that $C$ and $D$ are invertible. For a counterexample, take $A = B = C = D = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$.
The following is my proof sketch. First show that if $A$ and $B$ are row-reduced echelon matrices with the same row space then they are row-equivalent. To get you started: note that $A = CDA$. Consider the properties of $CD$ (it's not necessarily invertible; however, it is invertible if $A$ does not have any non-zero rows). Once you've shown this, simply note that $A$ and $B$ can both be reduced to row-reduced echelon matrices without changing their row spaces.
