Matrix A and B (both mxn) have the same four spaces, proof this: (Is my reasoning ok?)

Suppose the m by n matrices A and B have the same four subspaces. If they are both in row reduced echelon form, prove that F = G:

$$A= \begin{bmatrix} I & F \\ 0 & 0 \\ \end{bmatrix} $$

$$ B=\begin{bmatrix} I & G \\ 0 & 0 \\ \end{bmatrix} $$

My reasoning: Because we know they have the same Nullspace, then

\begin{array}{l} \text{if $Ax=0$ and $Bx=0$ then } \text{$Ax-Bx=0$} \text{ then $(A-B)x=0$ because x $\ne$ 0} \end{array} $$ \begin{bmatrix} 0 & F-G \\ 0 & 0 \\ \end{bmatrix}=0 $$ So, $F-G=0$ then $F=G$ ¿What do you think? ¿Is this ok? ¿How would you do this? Thank you.


Let $x,y$ be column vectors of the appropriate size (the number of entries in $x$ is the size of $I$, the number of entries in $y$ is the number of columns in $F$). From the fact that the two matrices share the same nullspace, we have $$ \pmatrix{I & F\\0 & 0} \pmatrix{x\\y} = 0 \iff\pmatrix{I & G\\0 & 0}\pmatrix{x\\y} = 0\\ x + Fy = 0 \iff x + Gy = 0\\ Fy = -x\iff Gy = -x. $$ With that, we see that $Fy = Gy$ must hold for all possible vectors $y$. From that, we conclude that $F = G$, as desired.