Example for ring $R$ which does not contain unity but satisfies property that $R^2=R$. I was reading answer of: A maximal ideal is always a prime ideal?
In that Arturo Magidin had given a nice answer: He had mentioned that there is a ring $R$ which does not contain unity but still satisfies $R^2=R$.
I had tried but I am not able to get any example with above.
Please help me out. Thanks a lot in advance
 A: Take $F$ to be the field of two elements, let $\oplus F$ be countably infinitely many copies of $F$, and make it a ring via coordinatewise addition and multiplication.
This is a rng without identity that satisfies $x^2=x$ for every element, and hence $R^2=R$.
Actually, it does not matter what you choose to put in the sum: all that matters is that you are using infinitely many and that each one has identity.  The case I mention is especially easy to grok, tho.
Another good example is to take an infinite dimensional vector space and its rng of linear transformations which have finite dimensional image. The identity cannot be included because it’s image is infinite dimensional.
A: A standard example of such a ring is the ring $R$ of functions $f\colon\mathbb{R}\to\mathbb{R}$ of compact support; that is, functions $f\colon\mathbb{R}\to\mathbb{R}$ for which there exists an $M>0$ (which depends on $f$) such that $\mathrm{supp}(f)=\{x\in\mathbb{R}\mid f(x)\neq 0\}\subseteq [-M,M]$, with pointwise addition and multiplication ($(f+g)(x) = f(x)+g(x)$, $(fg)(x) = f(x)g(x)$).
This ring does not have an identity; given any $f\in R$, let $M_f>0$ be such that $\mathrm{supp}(f)\subseteq [-M_f,M_f]$. Then let $g$ be given by $g(M_f+1)=1$, $g(x)=0$ for all other $x$. Then $g\in R$, buth $fg = 0\neq g$. Thus, $f$ cannot be an identity of $R$.
However, in this ring we have $R^2=R$: given any $f\in R$, let $M_f>0$ be such that $\mathrm{supp}(f)\subseteq [-M_f,M_f]$, and let $g\colon\mathbb{R}$ be defined by $g(x)=1$ if $x\in[-M_f,M_f]$, and $g(x)=0$ otherwise. Then $f=fg\in R^2$, so $R\subseteq R^2\subseteq R$.
You can even do this with the set of all continuous functions of compact support; or the set of continuous functions that vanish at infinity. These are standard examples of rings without unity, but which have "local" unities: given any $f\in R$, there exists $g\in R$ such that $gf=fg=1$. Such rings always satisfy $R^2=R$.
A: A lot of authors seem to require a ring to have unity;  in which case $R^2=R$.  
If the ring doesn't contain unit, it appears you are considering something like a proper ideal whose square is itself.  See here, for examples.  These are "psuedo-rings" or "rngs".
Also the $0$-rng would be a trivial example.  
