If a subring of a ring R has identity, does R also have the identity?

I know it does not make sense that if a subring of a ring $R$ is commutative, then $R$ is also commutative. (For example, the set consisting of the matrices whose all entries except (1,1)-entry are zero, is a subring of ring of 2x2 real matrices.)

I also considered the case of a ring containing a subring with identity, but I had no ideas. Maybe it seems that it does not make sense, either.

Who give me some examples supporting my guess?

-
Consider $\mathbb Z\subset \mathbb Z\times 2\mathbb Z$. – Cantlog Oct 12 '13 at 19:52
Thanks. That is perfectly what I want!! – NH.Jeong Oct 13 '13 at 3:42

Let $\mathbb R^{(\left\{1,2,3,...\right\})}$ be the subring of $\mathbb R^{\left\{1,2,3,...\right\}}$ consisting of all $\left(a_1,a_2,a_3,...\right)$ such that all but finitely many $i\in\left\{1,2,3,...\right\}$ satisfy $a_i = 0$. Then, $\mathbb R^{(\left\{1,2,3,...\right\})}$ is a (strictly) nonunital ring, but its subring formed by all $\left(a_1,a_2,a_3,...\right)$ such that all $i \geq 2$ satisfy $a_i = 0$ is a unital ring.

-
What do you mean by strictly here? – Tobias Kildetoft Oct 12 '13 at 19:52
"Nonunital ring" means an object which satisfies all ring axioms except for having to have a unity. So all rings are nonunital rings. "Strictly nonunital ring" (admittedly my terminology) means a nonunital ring which actually does not have a unity. – darij grinberg Oct 12 '13 at 20:13
Thank you very much!! – NH.Jeong Oct 13 '13 at 3:44
Ahh, I thought that was what you meant, but I wanted to be sure. I like this example because it has some nice properties (for example, all finitely generated subrings are contained in a subring with unit). – Tobias Kildetoft Oct 13 '13 at 10:54

$0*0=0$. The set {0} is a subring of any ring and in it 0 is the identity.

-
Wonderful border-case example! – darij grinberg Oct 12 '13 at 20:14
?? The identity of ring, here, is the multiplicative identity, not additive. – NH.Jeong Oct 13 '13 at 3:40
But $0$ in the trivial ring is also a multiplicative identity. ;) – darij grinberg Oct 13 '13 at 4:34
You are right. I jusr forgot. Thanks anyway! – NH.Jeong Oct 13 '13 at 5:29

Let $R=\Bbb Q\times 2\Bbb Z$: then $R$ is non-unital, but the ideal $\Bbb Q\times\{0\}$ is unital. Of course this construction generalizes to produce lots of examples of the form $R_1\times R_0$, where $R_1$ is unital and $R_0$ is not.

More interesting is a generalization of darij grinberg’s answer. Let $X$ be any non-compact zero-dimensional space, and let $R$ be the ring of continuous real-valued functions on $X$ with compact support; clearly $R$ is not unital. However, if $K$ is a compact open subset of $X$, the ideal of functions supported on $K$ is unital, with unit $\chi_K$. An example of such an $X$ is $C\setminus\{1\}$, where $C$ is the middle-thirds Cantor set. (The $p$-adic numbers are homeomorphic to this space.)

-
I am appreciate your additional information. :) – NH.Jeong Oct 13 '13 at 3:53

No. Here's a simple counterexample: consider the set $R$ of $3 \times 3$ matrices of the form

$\begin{bmatrix} 2n & 0 & 0 \\ 0 & a & b \\ 0 & c &d \end{bmatrix}, \tag{1}$

where $n, a, b, c, d \in \Bbb Z$, $\Bbb Z$ being the ring of integers. It is easy to see that $R$ is indeed a ring, and that the subring characterized by $n = 0$ is a subring with identity element given by taking $a = d = 1$ and $b = c = 0$. The subset with $a = b = c = d = 0$ is also a subring, but without identity. The ring $R$ has no (multiplicative) identity. To obtain a commutative example, simply take $c = d = 0$. QED.

The above example can obviously be generalized in several directions, e.g., we can take the matrices to have size greater than $3$.

Hope this helps! Cheers,

and as always,

Fiat Lux!!!

-
Thanks a lot!! by the way, what does the last statement mean?? – NH.Jeong Oct 13 '13 at 3:49
First off, you're quite welcome for the answer and I appreciate your kind words. You mean **Fiat Lux!!! It's Latin for that famous Biblical phrase "Let there be light!" and occurs on the shield of Harvard University. – Robert Lewis Oct 13 '13 at 3:58
Oh I see. That' a pretty nice sentence! – NH.Jeong Oct 13 '13 at 5:32
Glad you enjoyed it! – Robert Lewis Oct 13 '13 at 5:35