The "category of unital rings" is the category of all (unital) rings in a universe and (unital) ring homomorphisms between these rings. This category is defined as "category restriction" of the category of extensible structures , which restricts the objects to (unital) rings and the morphisms to the (unital) ring homomorphisms, while the composition of morphisms is preserved, see df-ringc. Alternately, the category of unital rings could have been defined as extensible structure consisting of three components/slots for the objects, morphisms and composition, see dfringc2. In the following, we omit the predicate "unital", so that "ring" and "ring homomorphism" (without predicate) always mean "unital ring" and "unital ring homomorphism".
Since we consider only "small categories" (i.e., categories whose objects and morphisms are actually sets and not proper classes), the objects of the category (i.e. the base set of the category regarded as extensible structure) are a subset of the rings (relativized to a subset or "universe" ) , see ringcbas, and the morphisms/arrows are the ring homomorphisms restricted to this subset of the rings , see ringchomfval, whereas the composition is the ordinary composition of functions, see ringccofval and ringcco.
By showing that the ring homomorphisms between rings are a subcategory subset () of the mappings between base sets of extensible structures, see rhmsscmap, it can be shown that the ring homomorphisms between rings are a subcategory () of the category of extensible structures, see rhmsubcsetc. It follows that the category of rings is actually a category, see ringccat with the identity function as identity arrow, see ringcid.
Furthermore, it is shown that the ring homomorphisms between rings are a subcategory subset of the non-unital ring homomorphisms between non-unital rings, see rhmsscrnghm, and that the ring homomorphisms between rings are a subcategory of the category of non-unital rings, see rhmsubcrngc. By this, the restriction of the category of non-unital rings to the set of unital ring homomorphisms is the category of unital rings, see rngcresringcat: .
Finally, it is shown that the "natural forgetful functor" from the category of rings into the category of sets is the function which sends each ring to its underlying set (base set) and the morphisms (ring homomorphisms) to mappings of the corresponding base sets, see funcringcsetc.