A unit is a quantity such that every other quantity (of a certain type) is a multiple (in a certain sense) of .
Exactly what this means depends on context. A very general definition is this:
That is, every element of is a multiple (in a unique way) of , where ‘multiple’ is defined in terms of the operation .
(on the left) or
(on the right). Conversely, a unit must have an inverse, since there must a solution to
(on the left) or
(on the right).
Notice that addition plays no role in the characterisation above of a unit in a ring. Accordingly, a unit in a monoid may be defined in precisely the same way.
A group is precisely a monoid in which every element is a unit.
and is a right unit if, for every , there is an such that
In a nonassociative ring (or, ignoring addition, in a magma), even if we have an identity element, an invertible element might not be a unit. So we must use the same explicit definition as in a rng (or semigroup) above.
A quasigroup is precisely a magma in which every element is a two-sided unit.
If is a ring (or rig) and an -module, then a unit in is an element such that every other can be written as (or for a right module) for some . This is the same as a generator of as an -module. There is no need to distinguish left and right units unless is a bimodule. Note that a (left or right) unit in qua ring is the same as a unit in qua (left or right) -module.
In physics, the quantities of a given dimension generally form an -line, a -dimensional vector space over the real numbers. Since is a field, any non-zero quantity is a unit, called in this context a unit of measurement. This is actually a special case of a unit in a module, where and is the line in question.
Often (but not always) these quantities form an oriented line, so that nonzero quantities are either positive or negative. Then we usually also require a unit of measurement to be positive. In fact, for some dimensions, there is no physical meaning to a negative quantity, in which case the quantities actually form a module over the rig and every nonzero element is “positive.”
For example, the kilogram is a unit of mass, because any mass may be expressed as a real multiple of the kilogram. Further, it is a positive unit; the mass of any physical object is a nonnegative quantity (so that mass quantities actually form an -module) and may be expressed as a nonnegative real multiple of the kilogram.
Often the term ‘unit’ (or ‘unity’) is used as a synonym for ‘identity element’, especially when this identity element is denoted . For example, a ‘ring with unit’ (or ‘ring with unity’) is a ring with an identity (used by authors who say ‘ring’ for a rng). Of course, a rng with identity has a unit, since itself is a unit; conversely, a commutative rng with a unit must have an identity.
I haven't managed to find either a proof or a counterexample to the converse (in the noncommutative case): that a rng with a unit must have an identity.
Response: If is a rng with a unit , then every element uniquely factors through . In particular, itself does. , with unique. So is an identity.
Reply: Why is an identity then? This works if the rng is commutative: given any , write as , and then . But without commutativity (and associativity), this doesn't work.
It is this meaning of ‘unit’ which gives rise to the unit of an adjunction.