# Category Theory/Definition, examples

Definition (category):

A category ${\displaystyle {\mathcal {C}}}$ is a class of objects, together with a class of so-called morphisms, each of which have a domain and a target, and a composition of morphisms, such that the following set of axioms hold, if for any two objects ${\displaystyle A}$ and ${\displaystyle B}$ of ${\displaystyle {\mathcal {C}}}$ the subclass of morphisms with domain ${\displaystyle A}$ and target ${\displaystyle B}$ is denoted ${\displaystyle \operatorname {Hom} (A,B)}$:

1. Whenever either ${\displaystyle A\neq A'}$ or ${\displaystyle B\neq B'}$, ${\displaystyle \operatorname {Hom} (A,B)}$ and ${\displaystyle \operatorname {Hom} (A',B')}$ are disjoint
2. For any objects ${\displaystyle A,B,C}$ of ${\displaystyle {\mathcal {C}}}$ and any morphisms ${\displaystyle f:A\to B}$ and ${\displaystyle g:B\to C}$, there exists a morphism ${\displaystyle h=g\circ f\in \operatorname {Hom} (A,C)}$, called the composition of ${\displaystyle f}$ and ${\displaystyle g}$
3. Composition is associative, ie. ${\displaystyle f\circ (g\circ h)=(f\circ g)\circ h}$
4. Whenever ${\displaystyle A}$ is an object of ${\displaystyle {\mathcal {C}}}$, then there exists a unique morphism ${\displaystyle 1_{A}\in \operatorname {Hom} (A,A)}$

## Exercises

1. If ${\displaystyle f\circ g}$ is injective, prove that ${\displaystyle g}$ is injective.