Can a ring without a unit element have a subring with a unit element?

A simple example:

If $R$ and $S$ are rings, where $R$ has a unit but $S$, doesn't, then $R\times S$ doesn't have a unit, but the subring $R\times\{0\}$ does.

So, for example, you could take the product $\mathbb{Z}\times2\mathbb{Z}$ of the integers and the even integers.


There is no reason why not. Even if a ring $A$ fails to have a unit, it can still have an idempotent. If you just take an idempotent, together with all its integer multiples, you get a ring with unit.

(Edited from this point. Thank you for pointing out the flaw).

For example, take $A$ to be $c_{00}$, the set of all sequences $(x_n)_{n\in \mathbb{N}}$ such that all but finitely many $x_n$ are $0$. With pointwise multiplication and addition, this is a ring. The only possible unity would be the constant sequence $x_n = 1$ that obviously does not satisfy the requirement that almost all $x_n$'s are $0$'s. However, $A$ contains idempotents: these are just the $0/1$-valued sequences. To be concrete, take the sequence $e_n$ given by $e_1 = 1$, $e_n = 0$ for $n \neq 1$. Then $e \in A$ and $e^2 = e$. It is now easy to convince yourself that $B := \{k \cdot e \ : \ k \in \mathbb{Z}\}$ is a subring of $A$, and that in fact $B$ is isomorphic to $\mathbb{Z}$.

Other examples when a similar trick would work is $l^1$ (the space of summable sequences), or $L^1(\mathbb{R}) \cap B(\mathbb{R})$, the space of bounded integrable funtcions. The previous example I proposed, $L^1(\mathbb{R})$, fails to be a ring because it is not closed under multiplication.


$\mathbb{Z}/(12)$ does have a unit element, so in that sense it is not an example, but its ideal $(3)$ has a (different of course) unit element as well, namely $9$!