# Rng (algebra)

In mathematics, and more specifically in abstract algebra, a rng (or non-unital ring or pseudo-ring) is an algebraic structure satisfying the same properties as a ring, but without assuming the existence of a multiplicative identity. The term rng, pronounced like rung (IPA: /rʌŋ/), is meant to suggest that it is a ring without i, that is, without the requirement for an identity element.
There is no consensus in the community as to whether the existence of a multiplicative identity must be one of the ring axioms (see Ring (mathematics) § History). The term rng was coined to alleviate this ambiguity when people want to refer explicitly to a ring without the axiom of multiplicative identity.
A number of algebras of functions considered in analysis are not unital, for instance the algebra of functions decreasing to zero at infinity, especially those with compact support on some (non-compact) space.
Rngs appear in the following chain of class inclusions:
    rngs ⊃ rings ⊃ commutative rings ⊃ integral domains ⊃ integrally closed domains ⊃ GCD domains ⊃ unique factorization domains ⊃ principal ideal domains ⊃ Euclidean domains ⊃ fields ⊃ algebraically closed fields

## Definition

Formally, a rng is a set R with two binary operations (+, ·) called addition and multiplication such that
* (R, +) is an abelian group,
* (R, ·) is a semigroup,
* Multiplication distributes over addition.
A rng homomorphism is a function f: R → S from one rng to another such that
* f(x + y) = f(x) + f(y)
* f(x · y) = f(x) · f(y)
for all x and y in R.
If R and S are rings, then a ring homomorphism R → S is the same as a rng homomorphism R → S that maps 1 to 1.

## Examples

All rings are rngs. A simple example of a rng that is not a ring is given by the even integers with the ordinary addition and multiplication of integers. Another example is given by the set of all 3-by-3 real matrices whose bottom row is zero. Both of these examples are instances of the general fact that every (one- or two-sided) ideal is a rng.
Rngs often appear naturally in functional analysis when linear operators on infinite-dimensional vector spaces are considered. Take for instance any infinite-dimensional vector space V and consider the set of all linear operators f : V → V with finite rank (i.e. dim f(V) < ∞). Together with addition and composition of operators, this is a rng, but not a ring. Another example is the rng of all real sequences that converge to 0, with component-wise operations.
Also, many test function spaces occurring in the theory of distributions consist of functions decreasing to zero at infinity, like e.g. Schwartz space. Thus, the function everywhere equal to one, which would be the only possible identity element for pointwise multiplication, cannot exist in such spaces, which therefore are rngs (for pointwise addition and multiplication). In particular, the real-valued continuous functions with compact support defined on some topological space, together with pointwise addition and multiplication, form a rng; this is not a ring unless the underlying space is compact.

### Example: even integers

The set 2Z of even integers is closed under addition and multiplication and has an additive identity, 0, so it is a rng, but it does not have a multiplicative identity, so it is not a ring.
In 2Z, the only multiplicative idempotent is 0, the only nilpotent is 0, and the only element with a reflexive inverse is 0.

### Example: finite quinary sequences

The direct sum T=⨁$_{i=1}$$^∞$Z/5Z{\textstyle {\mathcal {T}}=\bigoplus _{i=1}^{\infty }\mathbf {Z} /5\mathbf {Z} } equipped with coordinate-wise addition and multiplication is a rng with the following properties:
* Its idempotent elements form a lattice with no upper bound.
* Every element x has a reflexive inverse, namely an element y such that xyx = x and yxy = y.
* For every finite subset of ${\mathcal {T}}$, there exists an idempotent in ${\mathcal {T}}$ that acts as an identity for the entire subset: the sequence with a one at every position where a sequence in the subset has a non-zero element at that position, and zero in every other position.

## Properties

* Ideals, quotient rings, and modules can be defined for rngs in the same manner as for rings.
* Working with rngs instead of rings complicates some related definitions, however. For example, in a ring R, the left ideal (f) generated by an element f, defined as the smallest left ideal containing f, is simply Rf, but if R is only a rng, then Rf might not contain f, so instead $(f)=Rf+\mathbf {Z} f=\{af+nf:a\in R~{\text{and}}~n\in \mathbf {Z} \},$ where nf must be interpreted using repeated addition/subtraction since n need not represent an element of R. Similarly, the left ideal generated by elements f$_1$, ..., f$_m$ of a rng R is $(f_{1},\ldots ,f_{m})=\{a_{1}f_{1}+\cdots +a_{m}f_{m}+n_{1}f_{1}+\cdots n_{m}f_{m}:a_{i}\in R\;\mathrm {and} \;n_{i}\in \mathbf {Z} \},$ a formula that goes back to Emmy Noether. Similar complications arise in the definition of submodule generated by a set of elements of a module.
* Some theorems for rings are false for rngs. For example, in a ring, every proper ideal is contained in a maximal ideal, so a nonzero ring always has at least one maximal ideal. Both these statements fail for rngs.
* A rng homomorphism f : R → S maps any idempotent element to an idempotent element.
* If f : R → S is a rng homomorphism from a ring to a rng, and the image of f contains a non-zero-divisor of S, then S is a ring, and f is a ring homomorphism.

## Adjoining an identity element (Dorroh extension)

Every rng R can be enlarged to a ring R^ by adjoining an identity element. A general way in which to do this is to formally add an identity element 1 and let R^ consist of integral linear combinations of 1 and elements of R with the premise that none of its nonzero integral multiples coincide or are contained in R. That is, elements of R^ are of the form
where n is an integer and r ∈ R. Multiplication is defined by linearity:
More formally, we can take R^ to be the cartesian product Z × R and define addition and multiplication by
The multiplicative identity of R^ is then (1, 0). There is a natural rng homomorphism j : R → R^ defined by j(r) = (0, r). This map has the following universal property:
The map g can be defined by g(n, r) = n · 1$_S$ + f(r).
There is a natural surjective ring homomorphism R^ → Z which sends (n, r) to n. The kernel of this homomorphism is the image of R in R^. Since j is injective, we see that R is embedded as a (two-sided) ideal in R^ with the quotient ring R^/R isomorphic to Z. It follows that
Note that j is never surjective. So, even when R already has an identity element, the ring R^ will be a larger one with a different identity. The ring R^ is often called the Dorroh extension of R after the American mathematician Joe Lee Dorroh, who first constructed it.
The process of adjoining an identity element to a rng can be formulated in the language of category theory. If we denote the category of all rings and ring homomorphisms by Ring and the category of all rngs and rng homomorphisms by Rng, then Ring is a (nonfull) subcategory of Rng. The construction of R^ given above yields a left adjoint to the inclusion functor I : Ring → Rng. Notice that Ring is not a reflective subcategory of Rng because the inclusion functor is not full.

## Properties weaker than having an identity

There are several properties that have been considered in the literature that are weaker than having an identity element, but not so general. For example:
* Rings with enough idempotents: A rng R is said to be a ring with enough idempotents when there exists a subset E of R given by orthogonal (i.e. ef = 0 for all e ≠ f in E) idempotents (i.e. e$^2$ = e for all e in E) such that R = ⊕$_{e∈E}$ eR = ⊕$_{e∈E}$ Re.
* Rings with local units: A rng R is said to be a ring with local units in case for every finite set r$_1$, r$_2$, ..., r$_t$ in R we can find e in R such that e$^2$ = e and er$_i$ = r$_i$ = r$_i$e for every i.
* s-unital rings: A rng R is said to be s-unital in case for every finite set r$_1$, r$_2$, ..., r$_t$ in R we can find s in R such that sr$_i$ = r$_i$ = r$_i$s for every i.
* Firm rings: A rng R is said to be firm if the canonical homomorphism R ⊗$_R$ R → R given by r ⊗ s ↦ rs is an isomorphism.
* Idempotent rings: A rng R is said to be idempotent (or an irng) in case R$^2$ = R, that is, for every element r of R we can find elements r$_i$ and s$_i$ in R such that r=∑$_i$r$_i$s$_i${\textstyle r=\sum _{i}r_{i}s_{i}}.
It is not difficult to check that each of these properties is weaker than having an identity element and weaker than the property preceding it.
* Rings are rings with enough idempotents, using E = {1}. A ring with enough idempotents that has no identity is for example the ring of infinite matrices over a field with just a finite number of nonzero entries. Those matrices with a 1 in precisely one entry of the main diagonal and 0's in all other entries are the orthogonal idempotents.
* Rings with enough idempotents are rings with local units as can be seen by taking finite sums of the orthogonal idempotents to satisfy the definition.
* Rings with local units are in particular s-unital; s-unital rings are firm and firm rings are idempotent.

## Rng of square zero

A rng of square zero is a rng R such that xy = 0 for all x and y in R. Any abelian group can be made a rng of square zero by defining the multiplication so that xy = 0 for all x and y; thus every abelian group is the additive group of some rng. The only rng of square zero with a multiplicative identity is the zero ring {0}.
Any additive subgroup of a rng of square zero is an ideal. Thus a rng of square zero is simple if and only if its additive group is a simple abelian group, i.e., a cyclic group of prime order.

## Unital homomorphism

Given two unital algebras A and B, an algebra homomorphism
is unital if it maps the identity element of A to the identity element of B.
If the associative algebra A over the field K is not unital, one can adjoin an identity element as follows: take A × K as underlying K-vector space and define multiplication ∗ by
for x, y in A and r, s in K. Then ∗ is an associative operation with identity element (0, 1). The old algebra A is contained in the new one, and in fact A × K is the "most general" unital algebra containing A, in the sense of universal constructions.