---
tag: KJB47D7Z05
kind: definition
name: Functor
msc: [18A05, 18A22]
defines: 28NQ0KRHD3
uses: [A2DE66937D, 859F0TFVA3, G5S1M9, 0JYTG5K9Y4]
sources:
  - url: https://en.wikipedia.org/wiki/Functor
---

## Definition

Let $\mathcal{C}$ and $\mathcal{D}$ be [[categories|A2DE66937D]].
A *functor* $F \colon \mathcal{C} \to \mathcal{D}$ consists of:

1. for each object $A$ of $\mathcal{C}$, an object $F(A)$ of $\mathcal{D}$;
2. for each [[morphism|859F0TFVA3]] $f \colon A \to B$ of $\mathcal{C}$, a morphism $F(f) \colon F(A) \to F(B)$ of $\mathcal{D}$;

such that:

1. $F(1_A) = 1_{F(A)}$ for every object $A$ of $\mathcal{C}$;
2. $F(g \circ f) = F(g) \circ F(f)$ for all $f \colon A \to B$ and $g \colon B \to C$ in $\mathcal{C}$.

## Remarks

Such a functor is also called *covariant*.
Functors compose, and every category has an identity functor.
A functor sends isomorphisms to isomorphisms: if $g \circ f = 1_A$ and $f \circ g = 1_B$, then $F(g) \circ F(f) = 1_{F(A)}$ and $F(f) \circ F(g) = 1_{F(B)}$.
Example: the forgetful functor from [[groups|G5S1M9]] to sets sends a group to its underlying set and a [[group homomorphism|0JYTG5K9Y4]] to the same map.
Both conditions hold because identities and composites of homomorphisms are the identity and composite maps.
Non-example: sending each group $G$ to its centre $Z(G)$ and each homomorphism to its restriction does not define a functor from groups to groups.
Let $f \colon \Z/2 \to S_3$ be the inclusion onto the subgroup generated by a transposition.
It maps the centre $\Z/2$ outside the trivial centre of $S_3$.
So restriction gives no morphism $Z(\Z/2) \to Z(S_3)$, and the second item of the data fails.
