The concept “adjoint functors” pops out quite often when I’m browsing some interesting things. So this time I try to understand what exactly “adjoint functor” is by taking notes.

## Definition

*the definitions comes from Wikipedia*

### Simpler Definition

An adjunction between categories \(\mathcal{C}\) and \(\mathcal{D}\) is a pair of functors (assumed to be covariant)

\(F:{\mathcal {D}}\rightarrow {\mathcal {C}}\) and \(G:{\mathcal {C}}\rightarrow {\mathcal {D}}\)

And,

\[\forall X \in \mathcal{C}, Y \in \mathcal{D}. \mathrm {hom} _{\mathcal {C}}(FY,X) \cong \mathrm {hom} _{\mathcal {D}}(Y,GX)\]Then we say functor \(F\) is left adjoint to \(G\), \(G\) is right adjoint to \(F\).

### Via Universal Morphisms

A funtor \(F: \mathcal{D} \to \mathcal{C}\) is a **left adjoint functor** to functor \(G : \mathcal{C} \to \mathcal{D}\) if:

\(\forall X \in \mathrm{ob}(\mathcal{C}). \exists. \mathrm{TerminalMorphism} (G(X), \epsilon_X)\) from \(F\) to \(X\).

That is,

\[\forall X \in \mathrm{ob}(\mathcal{C}). \exists \epsilon_X : F(G(X)) \to X. \forall Y \in \mathrm{ob}(D), f : F(Y) \to X. \exists ! g : Y \to G(X). F(g) \circ \epsilon_X = f\]Conversely,

a functor \(G : \mathcal{C} \to \mathcal{D}\) is a **right adjoint functor** to functor \(F : \mathcal{D} \to \mathcal{C}\) if:

\(\forall Y \in \mathrm{ob}(\mathcal{D}). \exists. \mathrm{InitialMorphism}(F(Y), \eta_Y)\) from \(Y\) to \(G\)

That is,

\[\forall Y \in \mathrm{ob}(\mathcal{D}). \exists \eta_Y : Y \to G(F(Y)). \forall X \in \mathrm{ob}(\mathcal{C}), g : Y \to G(X). \exists ! f : F(Y) \to X. \eta_Y \circ G(f) = g\]## Examples

### An example for five-year-old

This example is from an answer on MathOverflow. It leads with

The example I would give a five-year old is the following.

Consider the categories of \(\mathbb{Z}\) and \(\mathbb{R}\) whose objects are integers and real numbers respectively, morphisms of \(x \to y\) exists whenever \(x \le y\).

For functor \(inclusion : \mathbb{Z} \to \mathbb{R}\), the left adjoint of it can be \(ceiling : \mathbb{R} \to \mathbb{Z}\), the right adjoint of it can be \(floor : \mathbb{R} \to \mathbb{Z}\)

That is:

\[\lceil x \rceil \le y \Leftrightarrow x \le y\]and

\[x \le y \Leftrightarrow x \le \lfloor y \rfloor\]Note: if we reverse the order of left and right adjoint (left is floor, right is ceiling), then the equation \(\lfloor x \rfloor \le y \Leftrightarrow x \le y\) doesn’t always hold (e.g. x = 1.5, y = 1), so does the right adjoint one.

Unsurprisingly, the property of universal morphisms also express the similar idea.

For left adjoint (ceiling), it says: for every real number \(x\) whose ceiling is less than or equal to an integer \(y\), itself is less than or equal to \(y\)(‘s real number form)

For right adjoint (floor), it says: for every real number \(x\) whose floor is greater than an integer \(y\), itself is greater than \(y\)(‘s real number form).