Let $A\in\mathbb{C}^{m\times n}$, then a generalized inverse matrix $B$ of $A$ satisfies the following $$ABA = A \ \text{and} \ BAB = B.$$
I am to show that $B$ is unique if $A$ is square and invertible. I also want to know if my approach is correct.
From the first criterion, we get $B=A^{-1}$. My first question is then, does this imply $A=B^{-1}$?
Second, if there exists a $C\neq B$ such that $$ACA = A \ \text{and} \ CAC = C,$$
then clearly $C=A^{-1}$, and since $A^{-1}$ is unique, then $C=B$, and so we have a contradiction.
Is this a correct way to prove the generalized inverse $B$ of $A$ is unique? And can I deduce that $A=B^{-1}$ from the fact that $B = A^{-1}$? I also feel that I am not really using the second criterion ($BAB=B$) and I feel that I should.
Thanks