A ring element with a left inverse but no right inverse?

Can I have a hint on how to construct a ring $A$ such that there are $a, b \in A$ for which $ab = 1$ but $ba \neq 1$, please? It seems that square matrices over a field are out of question because of the determinants, and that implies that no faithful finite-dimensional representation must exist, and my imagination seems to have given up on me :)


Solution 1:

Take the ring of linear operators on the space of polynomials. Then consider (formal) integration and differentiation. Integration is injective but not surjective. Differentiation is surjective but not injective.

Solution 2:

Consider the ring of infinite matrices which have finitely many non-zero elements both in each row and in each column and the matrix $$a=\begin{pmatrix}0&0&0&\cdots\\1&0&0&\cdots\\0&1&0&\cdots\\\ddots&\ddots&\ddots&\ddots\end{pmatrix}.$$

A canonical example is the quotient $A$ of the free algebra $k\langle x,y\rangle$ by the two-sided ideal generated by $yx-1$.