I have been wondering if the following statement is corrrect?
Assume that $A$ is $n \times m$ matrix where $m \leq n$ and rank of $A$ is $m$, $X$ and $B$ are $m \times m$ square matrix and it is known that $B$ is full rank, i.e, rank of $B$ is $m$. If, $$A X A^T = A B A^T$$ then we can say that $X = B$. If $m > n$, we can not reach to the same conclusion and $X \neq B$ anymore.
My proof is based on multipliying the expression from left by $A^T$ and observing $A^TA$ invertible and then multiplying from the right by $A$ concluding that $X$ should be equal to $B$.
My reasoning is correct? Am I missing something? Thanks in advance for your help.