In ring theory or abstract algebra, a ring homomorphism is a function between two rings which respects the structure. In ring theory or abstract algebra, a ring homomorphism is a function between two rings which respects the structure. More explicitly, if R and S are rings, then a ring homomorphism is a function f : R → S such that f is (Additive inverses and the additive identity are part of the structure too, but it is not necessary to require explicitly that they too are respected, because these conditions are consequences of the three conditions above. On the other hand, neglecting to include the condition f(1R) = 1S would cause several of the properties below to fail.) If R and S are rngs (also known as pseudo-rings, or non-unital rings), then the natural notion is that of a rng homomorphism, defined as above except without the third condition f(1R) = 1S. It is possible to have a rng homomorphism between (unital) rings that is not a ring homomorphism. The composition of two ring homomorphisms is a ring homomorphism. It follows that the class of all rings forms a category with ring homomorphisms as the morphisms (cf. the category of rings).In particular, one obtains the notions of ring endomorphism, ring isomorphism, and ring automorphism. Let f : R → S be a ring homomorphism. Then, directly from these definitions, one can deduce: