Nontrivial subring with unity different from the whole ring?

If to you, "ring" means "ring with unity", then the definition of "subring" requires that the unity be the same as that of the larger ring, just like "submonoid" requres that the identity be the same as that of the larger monoid. So under this definition, the answer is "no", because the definition of "subring" requires that if $R$ is a subring of $S$, then $1_S\in R$, and so $1_R=1_S$.

If by "ring" you don't require unity, and you are asking if it is possible to have rings $R$ and $S$, with $R\subseteq S$, and where both $R$ and $S$ happen to have a unity and $1_R\neq 1_S$, then yes: take $S=\mathbb{Z}\times\mathbb{Z}$, and $R=\mathbb{Z}\times\{0\}$. Then $1_S=(1,1)$ and $1_R=(1,0)$. In fact, every time you write a ring with unity $S$ as $S=R_1\times R_2$, you have that $1_S=(1_{R_1},1_{R_2})$.

The converse holds in part; this is the notion of "central idempotents", which is connected with the decomposition of rings into direct products:

Proposition. Let $S$ be a ring with unity, and suppose that $R\subseteq S$ is a subgroup that is closed under multiplication, and such that there exists $e_R\in R$ that is central in $S$ ($e_Rs=se_R$ for all $s\in S$) such that $e_Rr=re_R=r$ for all $r\in R$. Then $S\cong R\times T$, where $T$ is a ring with unity.

Proof. Let $T=S(1_S-e_R)$. Then $T$ is an ideal of $S$: it is trivially a left ideal; and since $1_S-e_R$ is central, $S(1_S-e_R) = (1_S-e_R)S$ which is trivially a right ideal. In particular, $T$ is a subgroup that is closed under multiplication. Moreover, $1_S-e_R$ is idempotent: note that $(1_S-e_R)(1_S-e_R) = 1_S - e_R - e_R+e_Re_R$. But $e_Re_R=e_R$ since $e_R$ is an identity for $R$, so $(1_S-e_R)^2=1_S-e_R$. Thus, for every $t\in T$, there exists $s\in S$ such that $t=s(1_S-e_R)$, so $$t(1_S-e_R) = s(1_S-e_R)^2 = s(1_S-e_R) = t$$ and since $1_S-e_R$ is central, this proves $1_S-e_R$ is a unity for $T$.

Note also that $$\begin{align*} e_R(1_S-e_R) &= e_R-e_Re_R = e_R-e_R = 0,\\ \text{and}\qquad (1_S-e_R)e_R &= e_R-e_Re_R = e_R-e_R=0. \end{align*}$$

Now consider the map $S\to R\times T$ given by $s\mapsto (se_R,s(1_S-e_R)$. Note that the map is one-to-one: if $se_R= te_R$ and $s(1_S-e_R) = t(1_S-e_R)$, then $$s = s(e_R+1_S-e_R) = se_R + s(1_S-e_R) = te_R+t(1_S-e_R) = t(e_R+1_S-e_R) = t.$$ And the map is onto: given $r\in R$ and $t\in T$, there exist $s,s'\in S$ such that $r=se_R$ and $t=s'(1_S-e_R)$. Let $u=se_R + s'(1_S-e_R)$. Then $$\begin{align*} ue_R &= se_Re_R + s'(1_S-e_R)e_R = se_R + s'0 = se_R = r\\ u(1_S-e_R) &= se_R(1_S-e_R) + s'(1_S-e_R)(1_S-e_R) = s0+s'(1_S-e_R) = s'(1_S-e_R)=t. \end{align*}$$ Thus, the image of $u$ is $(ue_R,u(1_S-e_R)) = (r,t)$. SO the map is onto. It is easy to verify that it is both additive and multiplicative, so we get an isomorphism of rings. $\Box$


If $R$ is a ring with such a subring $S$, then $1_S$ must have the property that $s 1_S = 1_S s = s$ for all $s \in S$. In particular, $1_S$ is an idempotent in $R$. This motivates the following construction: given a ring $R$ and an idempotent $e \in R$, consider $$\{ r \in R : er = re = r \}.$$

This is a subring of $R$ which is by definition the maximal subring with respect to which $e$ is an identity (hence any subring in which $e$ is an identity is a unital subring of this subring). If $r$ is in this subring, then $ere = r$, and conversely any element of the form $ere$ lies in this ring. Consequently this is just $eRe$, which was mentioned by Frank Murphy in the comments.

Here is an example which doesn't come from direct products (equivalently where the idempotent $e$ is not central). Let $R = \mathcal{M}_{\infty}(k)$ be the ring of matrices with entries in another ring $k$ with countably many rows and columns but with only finitely many nonzero entries. Then there is a sequence of idempotents $e_n$, none of which are central (in fact $R$ has no center), defined as the diagonal matrices with first $n$ entries equal to $1$ and remaining entries equal to $0$. The corresponding subrings are the rings $\mathcal{M}_n(k)$. These idempotents give an approximate identity in $\mathcal{M}_{\infty}(k)$.


Sure. Let $S,T$ be any nontrivial rings and consider $R=S\times T$. Then the unity of $R$ is $(1_S,1_T)$ but the subring $S\times \{0\}$ has unity $(1_S,0_T)$.