In algebra, a unit or invertible element of a ring is an invertible element for the multiplication of the ring. That is, an element u of a ring R is a unit if there exists v in R such that
where 1 is the multiplicative identity; the element v is unique for this property and is called the multiplicative inverse of u. The set of units of R forms a group R^× under multiplication, called the group of units or unit group of R. Other notations for the unit group are R∗, U(R), and E(R) (from the German term Einheit).
Less commonly, the term unit is sometimes used to refer to the element 1 of the ring, in expressions like ring with a unit or unit ring, and also unit matrix. Because of this ambiguity, 1 is more commonly called the "unity" or the "identity" of the ring, and the phrases "ring with unity" or a "ring with identity" may be used to emphasize that one is considering a ring instead of a rng.
The multiplicative identity 1 and its additive inverse −1 are always units. More generally, any root of unity in a ring R is a unit: if rn = 1, then rn − 1 is a multiplicative inverse of r.
In a nonzero ring, the element 0 is not a unit, so R^× is not closed under addition.
A nonzero ring R in which every nonzero element is a unit (that is, R^× = R −{0}) is called a division ring (or a skew-field). A commutative division ring is called a field. For example, the unit group of the field of real numbers R is R − {0}.
In the ring of integers Z, the only units are 1 and −1.
In the ring Z/nZ of integers modulo n, the units are the congruence classes (mod n) represented by integers coprime to n. They constitute the multiplicative group of integers modulo n.
In the ring Z[] obtained by adjoining the quadratic integer to Z, one has (2 + )(2 − ) = 1, so 2 + is a unit, and so are its powers, so Z[] has infinitely many units.
More generally, for the ring of integers R in a number field F, Dirichlet's unit theorem states that R^× is isomorphic to the group
where is the (finite, cyclic) group of roots of unity in R and n, the rank of the unit group, is
where are the number of real embeddings and the number of pairs of complex embeddings of F, respectively.