A category C consists of the following three mathematical entities: A class ob(C), whose elements are called objects; A class hom(C), whose elements are called morphisms or maps or arrows. Each morphism f has a source object a and target object b. The expression f : a → b, would be verbally stated as "f is a morphism from a to b".The expression hom(a, b) – alternatively expressed as homC(a, b), mor(a, b), or C(a, b) – denotes the hom-class of all morphisms from a to b. A binary operation ∘, called composition of morphisms, such that for any three objects a, b, and c, we have ∘ : hom(b, c) × hom(a, b) → hom(a, c). The composition of f : a → b and g : b → c is written as g ∘ f or gf,[a] governed by two axioms: 1. Associativity: If f : a → b, g : b → c, and h : c → d then h ∘ (g ∘ f) = (h ∘ g) ∘ f 2. Identity: For every object x, there exists a morphism 1x : x → x called the identity morphism for x, such that for every morphism f : a → b, we have 1b ∘ f = f = f ∘ ida.[b] From the axioms, it can be proved that there is exactly one identity morphism for every object. Some authors[who?] deviate from the definition just given, by identifying each object with its identity morphism.
def