# 📝Functor

Functor is a structure-preserving mapping from category $C$ to category $D$. $C$ and $D$ can be different or the same category. (Also note that category $D$ might have different composition—e.g., Kleisli category)

The mapping should map objects to objects, and arrows to arrows.

\begin{tikzcd} a \arrow[loop, "id_a", swap] \arrow[d, "f", swap] \arrow[ddr, "g \circ f"] & & F a \arrow[loop, "F id_a = id_{F a}", swap] \arrow[d, "F f", swap] \arrow[ddr, "F (g \circ f) = F g \, \circ \, F f"] \\ b \arrow[dr, "g", swap] & & F b \arrow[dr, "F g", swap] \\ & c & & F c \end{tikzcd}Functors can collapse some arrows (into one), but cannot break connections.

Functor is not a morphism—it is a mapping (a function) between one category and another. (Morphisms are arrows between two objects in the same category.)

If mapping of all hom-sets is injective, the functor is **faithful.** If mapping of all hom-sets is surjective, the functor is **full.** If bijective—the functor is **fully faithful.**

Note that this only applies to hom-sets, objects can still be collapsed.

A **constant functor** ($\Delta_C$) is a functor that maps every object into a single object.

The dual of a functor is a functor itself.