TITLE: Can non-unital rings be replaced by R-algebras?
QUESTION [8 upvotes]: While working through some lecture notes on semigroups, it seemed to me like a semigroup doesn't buy you much generality over a monoid. But I wondered whether the situation is different for non-unital versus (unital) rings. Then I worked through the following reasons against non-unital rings, which made the point that all naturally occurring non-unital (sub)rings actually have important additional structures, giving ideals and R-algebras as examples. But the author of that paper later later agreed to most of the reasons for non-unital rings.
Let $A$ be a ring (possibly non-unital) and $\tilde{A}=\mathbb Z\oplus A$ as abelian group. I wondered what Martin Brandenburg meant by the "obvious" multiplication so that $A\subseteq \tilde{A}$ is an ideal and $1\in\mathbb Z$ is the identity. After some trying, I came up with
$$ (r,a)\cdot(s,b)=(rs,rb+sa+ab)$$
I haven't checked associativity, but at least the above two conditions are satisfied. Now I wonder what would happen if I replace $\mathbb Z$ by an arbitrary commutative ring $R$ with identity $1$, and assume that I'm also given a scalar multiplication $R \times A \mapsto A$ denoted by $(r, a) \mapsto ra$. Would the above multiplication turn $R\oplus A$ into an (unital) ring, if $A$ is an $R$-algebra? And would conversely $A$ be an $R$-algebra, whenever $R\oplus A$ happens to be an (unital) ring under the above multiplication?

REPLY [3 votes]: A counterexample to a claim I erroneously thought someone had made: if $A$ is a left $R$-module, but not necessarily an $R$-algebra, must the Dorroh construction produce an associative algebra?
Let $A=\mathbb{Q}[i]$ and $R=\mathbb{Q}[\sqrt{2}]$, and define an $R$-module structure on $A$ by defining $(r_1+r_2\sqrt{2})\cdot(a_1+a_2i) = (r_1 a_1 + 2 r_2 a_2) + (r_2a_1 + r_1a_2)i$, where $r_1, r_2, a_1, a_2 \in \mathbb{Q}$ are rational numbers with the standard multiplication.
This defines an $R$-module structure on $A$, namely $A$ is a free $R$-module of rank 1, so that ${}_RR \cong {}_RA$ as left $R$-modules, but not as rings.  This also defines both $R$ and $A$ as $\mathbb{Q}$-algebras, since the multiplication when $r_2=0$ or $a_2=0$ is the expected one.
Now we use the formulation in the question to define a multiplication on $R \oplus A$ via
  $$(r,a)\cdot(s,b) = (rs, rb+sa+ab)$$
Now consider the multiplication
$$(0,i) \cdot (0,i) \cdot (\sqrt{2},0)$$
On the one hand, it is supposed to be:
$$((0,i)\cdot(0,i)) \cdot (\sqrt{2},0) = (0,-1) \cdot (\sqrt{2},0) = (0,0+(\sqrt{2}(-1)) + 0 )$$
but the multiplication of $R$ on $A$ defines $\sqrt{2}(-1) = -i$, so we get
$$((0,i)\cdot(0,i)) \cdot (\sqrt{2},0) = (0,-1) \cdot (\sqrt{2},0) = (0,-i)$$
On the other hand, it is supposed to be:
$$(0,i)\cdot((0,i)) \cdot (\sqrt{2},0)) = (0,i) \cdot (0,0+\sqrt{2}(i)+0)$$
but the multiplication of $R$ on $A$ defines $\sqrt{2}(i) = 2$, so we get:
$$(0,i)\cdot((0,i)) \cdot (\sqrt{2},0)) = (0,i) \cdot (0,2) = (0,2i)$$
In particular, the resulting multiplication is not associative.

I misread the question (sorry!).  Suppose $A$ is a left $R$-module so that one does manage to get an associative unital ring structure, must $A$ be an $R$-algebra?
The counterexample is fairly general.  I'll reorder it a little to avoid assuming $R$ is central:
$$(r,0)\cdot((0,a)\cdot(0,b)) = (r,0) \cdot(0,0+0+ab) = (r,0)\cdot(0,ab) = (0,r(ab)+0+0) = (0,r(ab))$$
but 
$$((r,0)\cdot(0,a))\cdot(0,b) = (0,ra+0+0) \cdot(0,b) = (0,ra)\cdot(0,b) = (0,0+0+(ra)b) = (0,(ra)b)$$
so for $R\oplus A$ to be associative, $A$ must be an $R$-algebra, as in, $r(ab) = (ra)b$.
I believe your multiplication will also force $r(ab) = a(rb)$, whereas my multiplication only requires $(ar)b = a(rb)$, so that associative properties follow from associative properties, rather than commutative properties.
Notice that your multiplication can be used to give $A$ an R-R bimodule structure since $m\cdot r$ can be defined as $(0,m)\cdot (r,0) = (0,m\cdot r)$, but then of course $rm=m\cdot r$ and we have the situation common in commutative algebra where the left and right module structures are required to coincide.