Showing that the generalized inverse for a square invertible matrix is unique

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

• If $\mathbf{A}$ is square and invertible, then $\mathbf{B}$ should be square, given $\mathbf{A}\mathbf{B}\mathbf{A}=\mathbf{A}$. Initially you said that $\mathbf{A}$ is $m\times n$ with complex entries. Regarding your question: "My first question is then, does this imply A=B−1? ", yes. But you are imposing, extra assumptions. – PabloG. Oct 2 '18 at 4:24
• Yes, I gave the definition but then specified below that in this problem, $A$ is square and invertible – sadlyfe Oct 2 '18 at 7:24

Suppose that $$B$$ and $$C$$ are generalised inverses of $$A$$. In particular, we have $$ABA=ACA$$. Therefore, $$B=(A^{-1}A)B(AA^{-1})=A^{-1}(ABA)A^{-1}=A^{-1}(ACA)A^{-1}=(A^{-1}A)C(AA^{-1})=C.$$ Note that the equations $$BAB=B$$ and $$CAC=C$$ are not needed to derive the result.