[Math] ny monoid in which the product of two non-invertible elements could be invertible

gm.general-mathematics

I think the title speaks for itself. Thus I just explain the story behind the question. Of course, you may want to skip the story.

Story: Currently, I teach a course in linear algebra and matrices with a mathematician colleague of mine. In preparing for the class, we discussed together about one of the standard theorems of matrices saying the product of two invertible matrices is invertible. To understand the theorem and its converse, I naturally came to the question asked in the title. To my surprise, neither the colleague I discussed with, nor four other mathematician colleagues of mine could come up with an answer. But the question seems very natural and it is very surprising if it has been remained unnoticed. That is why I came to MO to find the answer.

PS. None of the colleagues I asked the question is an expert in algebra, and I am a mathematics educator.

PPS. You may replace "monoid" with whatever you wish, providing that you keep the rest of the title intact! Please keep your example natural (if there is one)!

Best Answer

Well, why not?

Let $\oplus_{n \in \mathbb{N}} k$ be a direct sum of countably many copies of a 1-dimensional space over a field $k$; the direct sum affords a standard basis $e_i = (0, \ldots, 0, 1, 0, \ldots)$ with $1$ in the $i^{th}$ place. Define endomorphisms $A$, $B$ by $A(e_i) = e_{i-1}$ for $i \gt 1$, $A(e_1) = e_1$, and $B(e_i) = e_{i+1}$. I think you'll agree that $A B$ (first apply $B$, then apply $A$) is the identity, but $B A$ isn't invertible.