# Are there matrices such that $AB=I$ and $BA \neq I$ [duplicate]

Are there matrices such that $AB=I$ and $BA \neq I$ ?

$A$ and $B$ are square matrices

## marked as duplicate by R_D, miracle173, José Carlos Santos, Davide Giraudo, user91500Jun 27 '17 at 9:22

With square matrices, no. With non-square matrices, it's perfectly possible. For example, \begin{align*} A &= \left(\begin{array}{ccc}1 & 0 & 0 \\ 0 & 1 & 0\end{array}\right) \\ B &= \left(\begin{array}{cc}1 & 0 \\ 0 & 1 \\ 0 & 0\end{array}\right) \end{align*} Note that, indeed, we cannot have non-square matrices where $AB$ and $BA$ are identities of appropriate dimensions, because that would imply the existence of an isomorphism between spaces of different dimensions!

• With non-square matrices, one of $AB = I$ and $BA=I$ is impossible. – Robert Israel Jun 27 '17 at 2:27
• Sorry Robert, I didn't see your comment before I edited! – Theo Bendit Jun 27 '17 at 2:30

If $AB=I$ with $A,B$ square matrices, then $\ker(B)=\{0\}$. Therefore $B$ is also surjective by rank-nullity, so $B$ is invertible and $A=B^{-1}$, so $BA=I$.

If $A$ and $B$ are finite square matrices (of size $n\times n$), then $$AB=I_n\implies BA=I_n$$ However, if $A$ and $B$ are not square, if $AB=I_n$, then $BA\neq I_n$ in general (and $BA$ need not even be the same size as $AB$).

• If $AB$ is square, then $BA$ is defined, and square (but not necessarily the same size). – Aweygan Jun 27 '17 at 2:30
• @Aweygan yes. I was more thinking about arbitrary matrices $A$ and $B$, but since $AB$ is square $BA$ is defined as you say. However the main point that $BA\neq I_n$ in general still holds. I will edit, thanks. – Dave Jun 27 '17 at 2:36

Answer to your question: Assuming $A,B$ are squares, the answer is there are none.

Claim: Let $\mathbb F$ be any field. If $A,B\in \mathbb F^{n\times n}$, then $AB=I$ implies $BA=I$.

Proof: We first show that $A$ is nonsingular. Suppose otherwise. Then there exist elementary matrices $E_1,\ldots, E_k$ such that $$E_k\cdots E_1A=C$$ where $C$ has a zero row. Then $$E_k\cdots E_1AB=CB$$ has a zero row. The matrix $AB=I$ is row equivalent to $CB$, which is absurd since $I$ has no zero row. Thus, $A$ is nonsingular.

Since $A$ is nonsingular, $$B=(A^{-1}A)B=A^{-1}(AB)=A^{-1}\cdot I=A^{-1}.$$ Hence, $BA=I$ too.

• I am not sure this is a helpful explanation, because you are assuming some properties of nonsingular matrices which OP may or may not know. For example, when you write $A^{-1}$, you seem to be assuming that $A$ has a two-sided inverse to begin with. – D_S Jun 27 '17 at 3:19
• I disagree. I think this is more helpful for a beginning linear algebra student. If OP is taking a linear algebra course, it is more likely that he/she has seen properties of nonsingular matrices before the rank-nullity theorem. – chhro Jun 27 '17 at 4:18
• FYI, when I wrote $A^{-1}$, I already proved $A$ is nonsingular. This proof actually shows that it does not matter what the underlying field is. I think that is helpful. – chhro Jun 27 '17 at 4:33
• What is your definition of nonsingular? – D_S Jun 27 '17 at 11:53