In ring theory, a branch of abstract algebra, a ring homomorphism is a structure-preserving function between two rings. More explicitly, if R and S are rings, then a ring homomorphism is a function such that f is: addition preserving: for all a and b in R, multiplication preserving: for all a and b in R, and unit (multiplicative identity) preserving: . 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. If in addition f is a bijection, then its inverse f−1 is also a ring homomorphism. In this case, f is called a ring isomorphism, and the rings R and S are called isomorphic. From the standpoint of ring theory, isomorphic rings cannot be distinguished. If R and S are rngs, then the corresponding notion is that of a rng homomorphism, defined as above except without the third condition f(1R) = 1S. A rng homomorphism between (unital) rings need not be 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. Properties Let be a ring homomorphism. Then, directly from these definitions, one can deduce: f(0R) = 0S. f(−a) = −f(a) for all a in R. For any unit element a in R, f(a) is a unit element such that . In particular, f induces a group homomorphism from the (multiplicative) group of units of R to the (multiplicative) group of units of S (or of im(f)). The image of f, denoted im(f), is a subring of S. The kernel of f, defined as , is an ideal in R. Every ideal in a ring R arises from some ring homomorphism in this way. The homomorphism f is injective if and only if . If there exists a ring homomorphism then the characteristic of S divides the characteristic of R. This can sometimes be used to show that between certain rings R and S, no ring homomorphisms exists. If Rp is the smallest subring contained in R and Sp is the smallest subring contained in S, then every ring homomorphism induces a ring homomorphism .