---
title: Adjoint Functors via Hom-Set Bijections
module: Adjunctions
moduleNumber: 5
lessonNumber: 1
order: 501
summary: >
  An adjunction is a natural bijection between two hom-sets: maps out of $F(A)$
  in one category correspond to maps into $G(B)$ in the other. We give the
  definition, spell out the naturality axioms that make the correspondence
  compatible with composition, and work the flagship examples — free vector
  spaces, free groups, discrete and indiscrete topologies, and currying.
topics: [Adjunctions]
sources:
  - book: Leinster
    ref: "Ch. 2 — Adjoints; §2.1 Definition and examples"
  - book: Simmons
    ref: "Ch. 5 — Adjunctions; §5.1 Adjunctions defined; §5.2 Adjunctions illustrated"
  - book: Barr & Wells
    ref: "Ch. 13 — Adjoints; §13.2 Adjoints"
draft: false
---

Two categories are rarely equivalent, but they are constantly related. A group
has an underlying set; a set generates a free group. A space has a set of points;
a set carries a discrete topology. Each pair moves objects one way and, in some
weaker sense, back the other. Adjunction is the exact form of that "weaker sense."
Adjunction is one of the central notions of the subject, alongside the
[Yoneda lemma](/category-theory/representables-yoneda/yoneda-lemma): wherever a
construction is characterized by a
[universal property](/category-theory/universal-properties/universal-properties),
an adjunction usually underlies it.[^lein-intro]

An adjunction makes precise the sense in which $F$ is the freest solution to a
problem posed by $G$. Formally it is a bijection between two sets of arrows.

## The definition

Fix two categories and a pair of functors running in opposite directions,

$$
\mathcal{A} \underset{G}{\overset{F}{\rightleftarrows}} \mathcal{B},
\qquad
F \colon \mathcal{A} \to \mathcal{B}, \qquad G \colon \mathcal{B} \to \mathcal{A}.
$$

Following Simmons, read $\mathcal{A}$ as the **source** and $\mathcal{B}$ as the
**target**; the adjunction points in the direction of $F$.[^simm-def] The two objects
$A \in \mathcal{A}$ and $B \in \mathcal{B}$ live in different categories and cannot
be compared directly. To compare them, move one across: either turn $A$ into
$F(A) \in \mathcal{B}$ and look at maps $F(A) \to B$, or turn $B$ into
$G(B) \in \mathcal{A}$ and look at maps $A \to G(B)$. An adjunction is the
assertion that these two sets of maps are the same.

> **Definition (Adjunction).** Functors $F \colon \mathcal{A} \to \mathcal{B}$
> and $G \colon \mathcal{B} \to \mathcal{A}$ form an **adjunction**, written
> $F \dashv G$, if there is a bijection
>
> $$
> \mathcal{B}(F(A), B) \;\cong\; \mathcal{A}(A, G(B))
> $$
>
> for every $A \in \mathcal{A}$ and $B \in \mathcal{B}$, natural in $A$ and $B$.
> We say $F$ is **left adjoint** to $G$ and $G$ is **right adjoint** to $F$.

The left adjoint $F$ occupies the left slot of a hom-set, and the right adjoint
$G$ the right slot.[^simm-def] The roles are not symmetric: $F \dashv G$ does not
entail $G \dashv F$.

$$
% caption: A left adjoint $F$ and a right adjoint $G$ run in opposite directions;
% the adjunction is a bijection matching maps out of $F(A)$ with maps into $G(B)$.
\begin{tikzpicture}[>=stealth, font=\small]
  \definecolor{acc}{HTML}{4A6FA5}
  \node[draw, minimum width=20mm, minimum height=13mm] (A) at (0,0) {$\mathbf{A}$};
  \node[draw, minimum width=20mm, minimum height=13mm] (B) at (5.2,0) {$\mathbf{B}$};
  \draw[->, acc, thick] (A.30) -- (B.150) node[midway, above] {$F$};
  \draw[->, thick] (B.210) -- (A.330) node[midway, below] {$G$};
  \node[font=\footnotesize, text=acc] at (2.6,1.1) {left adjoint};
  \node[font=\footnotesize] at (2.6,-1.1) {right adjoint};
\end{tikzpicture}
$$

### Transposes

The bijection is written as a bar in both directions. Given $g \colon F(A) \to B$
in $\mathcal{B}$, its image is $\bar{g} \colon A \to G(B)$ in $\mathcal{A}$; given
$f \colon A \to G(B)$, its image is $\bar{f} \colon F(A) \to B$. The bar is
self-inverse, so $\bar{\bar{f}} = f$ and $\bar{\bar{g}} = g$. Either of $f$ and
$\bar{f}$ is called the **transpose** (or **adjunct**, or **mate**) of the
other.[^lein-def] The rule reads like an inference rule: a map upstairs and its
transpose downstairs determine each other.

$$
% caption: The transpose correspondence: every map $A \to G(B)$ has a unique
% partner $F(A) \to B$, and conversely, with the bar operation self-inverse.
\begin{tikzpicture}[>=stealth, font=\small]
  \definecolor{acc}{HTML}{4A6FA5}
  \node (A)  at (0,1.1)   {$A$};
  \node (GB) at (3.0,1.1) {$G(B)$};
  \node (FA) at (0,-1.1)  {$F(A)$};
  \node (B)  at (3.0,-1.1) {$B$};
  \draw[->, thick] (A) -- (GB) node[midway, above] {$f$};
  \draw[->, acc, thick] (FA) -- (B) node[midway, below] {$\overline{f}$};
  \draw[<->, black, dashed] (1.5,0.75) -- (1.5,-0.75);
  \node[font=\footnotesize, black, anchor=west] at (1.65,0) {transpose};
  \node[font=\footnotesize, anchor=west] at (4.1,1.1) {in $\mathcal{A}$};
  \node[font=\footnotesize, anchor=west] at (4.1,-1.1) {in $\mathcal{B}$};
\end{tikzpicture}
$$

## Naturality

Naturality makes the bijection compatible with composition in both categories,
so that transposing commutes with pre- and post-composition. There are two
axioms, one for each variable.[^lein-def]

Given $g \colon F(A) \to B$ and $q \colon B \to B'$ in $\mathcal{B}$, we may either
compose then transpose, or transpose then apply $G$ and compose. The two agree:

$$
\overline{q \circ g} \;=\; G(q) \circ \bar{g}
\qquad\text{for all } g \colon F(A) \to B,\; q \colon B \to B'.
$$

Dually, given $p \colon A' \to A$ and $f \colon A \to G(B)$ in $\mathcal{A}$,

$$
\overline{f \circ p} \;=\; \bar{f} \circ F(p)
\qquad\text{for all } p \colon A' \to A,\; f \colon A \to G(B).
$$

Because the bar is self-inverse, putting the long bar over either side of these
equations gives an equivalent statement; the two axioms can even be fused into
one equation covering pre- and post-composition simultaneously.[^lein-ex] The
first axiom is drawn below: it says the two ways of building a map $A \to G(B')$
out of $g$ and $q$ coincide.

$$
% caption: Naturality in $B$: transposing the composite $q \circ g$ equals
% post-composing $G(q)$ after the transpose $\bar{g}$; both routes reach $G(B')$.
\begin{tikzpicture}[>=stealth, font=\small]
  \definecolor{acc}{HTML}{4A6FA5}
  \node (A)   at (0,0)    {$A$};
  \node (GB)  at (2.8,0)  {$G(B)$};
  \node (GBp) at (5.8,0)  {$G(B${'}$)$};
  \draw[->, thick] (A) -- (GB) node[midway, above] {$\overline{g}$};
  \draw[->, thick] (GB) -- (GBp) node[midway, above] {$G(q)$};
  \draw[->, acc, thick] (A) to[bend right=28] node[midway, below] {$\overline{q g}$} (GBp);
\end{tikzpicture}
$$

Naturality promotes the pointwise family of bijections into a single
[natural isomorphism](/category-theory/foundations/natural-transformations)
between the functors $\mathcal{B}(F(-), -)$ and $\mathcal{A}(-, G(-))$ from
$\mathcal{A}^{\mathrm{op}} \times \mathcal{B}$ to $\mathbf{Set}$.[^bw-homset] Here
we use it only as compatibility with composition.

## Free and forgetful

The archetype is a **free** construction sitting left-adjoint to a **forgetful**
functor. Forgetful functors between categories of algebraic structures almost
always have left adjoints, and the adjunction is the precise statement of
freeness.[^lein-free]

> **Example (Free vector space).** Fix a field $k$. Let
> $U \colon \mathbf{Vect}_k \to \mathbf{Set}$ send a vector space to its
> underlying set, and $F \colon \mathbf{Set} \to \mathbf{Vect}_k$ send a set $S$
> to the vector space $F(S)$ with basis $S$ (formal $k$-linear combinations
> $\sum_{s} \lambda_s\, s$). Then $F \dashv U$.

The bijection $\mathbf{Vect}_k(F(S), V) \cong \mathbf{Set}(S, U(V))$ says a linear
map out of the free space is the same data as a function on the basis. Both
directions are explicit:

- **Restrict to the basis.** Given a linear map $g \colon F(S) \to V$, define
  $\bar{g} \colon S \to U(V)$ by $\bar{g}(s) = g(s)$. A linear map is determined
  by its values on a basis, so nothing is lost.
- **Extend linearly.** Given a function $f \colon S \to U(V)$, define
  $\bar{f} \colon F(S) \to V$ by $\bar{f}\!\left(\sum_s \lambda_s\, s\right) =
  \sum_s \lambda_s\, f(s)$, the unique linear extension.

Extending a restriction recovers $g$, and restricting an extension recovers $f$,
so the two assignments are mutually inverse.[^lein-free] The correspondence is the ordinary fact
that "a linear map is determined by, and can be freely prescribed on, a basis" —
now recorded as an adjunction.

$$
% caption: Freeness as a transpose: a set map $S \to U(V)$ on the basis extends
% uniquely to a linear map $F(S) \to V$, and every linear map restricts back.
\begin{tikzpicture}[>=stealth, font=\small]
  \definecolor{acc}{HTML}{4A6FA5}
  \node (S)  at (0,1.1)   {$S$};
  \node (UV) at (3.2,1.1) {$U(V)$};
  \node (FS) at (0,-1.1)  {$F(S)$};
  \node (V)  at (3.2,-1.1) {$V$};
  \draw[->, thick] (S) -- (UV) node[midway, above] {$f$ (on basis)};
  \draw[->, acc, thick] (FS) -- (V) node[midway, below] {$\overline{f}$ (linear)};
  \draw[<->, black, dashed] (1.6,0.75) -- (1.6,-0.75);
  \node[font=\footnotesize, anchor=west] at (4.3,1.1) {$\mathbf{Set}$};
  \node[font=\footnotesize, anchor=west] at (4.3,-1.1) {$\mathbf{Vect}_k$};
\end{tikzpicture}
$$

The same pattern recurs across algebra. The forgetful functor
$U \colon \mathbf{Grp} \to \mathbf{Set}$ has the free-group functor as its left
adjoint. The free group on a set is awkward to build by hand, yet the adjunction
characterizes it, since a left adjoint is unique up to
isomorphism.[^lein-free2] The relation $F \dashv U$ therefore determines $F$
without an explicit construction.[^lein-uniq]

## Adjunctions beyond algebra

Free-over-forgetful is one family; adjoints appear far more widely. Whenever two
functors run between the same pair of categories, there is a good chance one is
adjoint to the other.[^lein-everywhere]

### Discrete and indiscrete topologies

Let $U \colon \mathbf{Top} \to \mathbf{Set}$
send a space to its set of points. It has adjoints on both sides:

$$
D \;\dashv\; U \;\dashv\; I,
$$

where $D$ equips a set with the **discrete** topology (every subset open) and $I$
with the **indiscrete** topology (only $\varnothing$ and the whole set
open).[^lein-top] The left adjoint $D$ is free: a continuous map $D(S) \to Y$ is
any function $S \to U(Y)$, because every function out of a discrete space is
continuous. The right adjoint $I$ is dual: a continuous map $X \to I(S)$ is any
function $U(X) \to S$, because every function into an indiscrete space is
continuous.

### Currying

In $\mathbf{Set}$, fix a set $B$. Taking the product with $B$ is a
functor $- \times B$, and forming the function set $(-)^B$ is another. They are
adjoint:

$$
(- \times B) \;\dashv\; (-)^B,
\qquad
\mathbf{Set}(A \times B, C) \;\cong\; \mathbf{Set}(A, C^B).
$$

The transpose only reassociates the arguments. A map $g \colon A \times B \to C$
transposes to $\bar{g} \colon A \to C^B$ by $\big(\bar{g}(a)\big)(b) = g(a, b)$,
and back by $\bar{f}(a, b) = \big(f(a)\big)(b)$.[^lein-curry] A function of two
arguments is the same as a function of the first argument returning a function of
the second, the currying of functional programming. Requiring
$(- \times B) \dashv (-)^B$ for every $B$ is the defining condition of a
[cartesian closed category](/category-theory/cartesian-closed-lambda/cartesian-closed-categories).

$$
% caption: Currying as a transpose: a map $A \times B \to C$ on pairs corresponds
% to a map $A \to C^B$ sending each $a$ to the partial function $g(a, -)$.
\begin{tikzpicture}[>=stealth, font=\small]
  \definecolor{acc}{HTML}{4A6FA5}
  \node (AB) at (0,1.1)   {($A$, $B$)};
  \node (C)  at (3.4,1.1) {$C$};
  \node (A)  at (0,-1.1)  {$A$};
  \node (CB) at (3.4,-1.1) {$C^{B}$};
  \draw[->, thick] (AB) -- (C) node[midway, above] {$g$};
  \draw[->, acc, thick] (A) -- (CB) node[midway, below] {$\overline{g}$};
  \draw[<->, black, dashed] (1.7,0.75) -- (1.7,-0.75);
  \node[font=\footnotesize, anchor=west] at (4.4,1.1) {pairs};
  \node[font=\footnotesize, anchor=west] at (4.4,-1.1) {curried};
\end{tikzpicture}
$$

> **Worked example (Currying on finite sets).** Take $A = \{a_1, a_2\}$,
> $B = \{b_1, b_2\}$, and $C = \{x, y, z\}$. Both hom-sets have the same size,
>
> $$
> \lvert \mathbf{Set}(A \times B, C)\rvert = 3^{4} = 81,
> \qquad
> \lvert \mathbf{Set}(A, C^{B})\rvert = (3^{2})^{2} = 81,
> $$
>
> because $A \times B$ has $4$ elements and $C^{B}$ has $9$. The bijection matches
> them one for one. For the map $g$ with $g(a_1, b_1) = x$, $g(a_1, b_2) = y$,
> $g(a_2, b_1) = z$, $g(a_2, b_2) = x$, the transpose $\bar{g} \colon A \to C^{B}$
> is
>
> $$
> \bar{g}(a_1) = (b_1 \mapsto x,\; b_2 \mapsto y),
> \qquad
> \bar{g}(a_2) = (b_1 \mapsto z,\; b_2 \mapsto x).
> $$
>
> Evaluating $\bar{g}(a)$ at $b$ returns $g(a, b)$.

### The diagonal functor and its adjoints

Let $\Delta \colon \mathcal{C} \to \mathcal{C} \times
\mathcal{C}$ be the diagonal functor, $\Delta(A) = (A, A)$. A right adjoint to
$\Delta$ assigns to a pair $(A, B)$ an object $\Pi(A, B)$ with

$$
(\mathcal{C} \times \mathcal{C})\big(\Delta(C), (A, B)\big)
\;\cong\; \mathcal{C}\big(C, \Pi(A, B)\big).
$$

Unwinding the left side, a map $\Delta(C) \to (A, B)$ is a pair of maps
$C \to A$ and $C \to B$. So a right adjoint to $\Delta$ is a choice of
[product](/category-theory/universal-properties/products-and-coproducts) for
every pair, and the counit is the pair of projections. Dually, a left adjoint to
$\Delta$ is a choice of coproduct.[^bw-diag] The universal properties of product
and coproduct are the two adjoints of $\Delta$: coproduct on the left, product on
the right.

> **Worked example (Product and coproduct from $\Delta$ in $\mathbf{Set}$).** Take
> $A = \{0, 1\}$, $B = \{p, q, r\}$, and $C = \{u, v\}$. A map $\Delta(C) \to (A, B)$
> is a pair of functions $C \to A$ and $C \to B$, matched with a single function
> $C \to A \times B$:
>
> $$
> \lvert\mathbf{Set}(C, A)\rvert \cdot \lvert\mathbf{Set}(C, B)\rvert
> = 2^{2} \cdot 3^{2} = 36 = 6^{2}
> = \lvert\mathbf{Set}(C, A \times B)\rvert.
> $$
>
> Dually, a map $(A, B) \to \Delta(C)$ is a pair $A \to C$ and $B \to C$, matched
> with a single map $A + B \to C$:
>
> $$
> \lvert\mathbf{Set}(A, C)\rvert \cdot \lvert\mathbf{Set}(B, C)\rvert
> = 2^{2} \cdot 2^{3} = 32 = 2^{5}
> = \lvert\mathbf{Set}(A + B, C)\rvert.
> $$
>
> The right adjoint assembles a product of $6 = 2 \cdot 3$ elements, the left
> adjoint a coproduct of $5 = 2 + 3$.

## A catalogue

The examples share one shape and differ only in which categories and functors
fill the slots.

| Left adjoint $F$ | Right adjoint $G$ | Bijection | Reading |
| --- | --- | --- | --- |
| free vector space | underlying set | $\mathbf{Vect}_k(F S, V) \cong \mathbf{Set}(S, UV)$ | prescribe a map on a basis |
| free group | underlying set | $\mathbf{Grp}(F S, H) \cong \mathbf{Set}(S, UH)$ | prescribe generators' images |
| abelianization | inclusion $\mathbf{Ab} \hookrightarrow \mathbf{Grp}$ | $\mathbf{Ab}(G^{\mathrm{ab}}, A) \cong \mathbf{Grp}(G, A)$ | maps to abelian groups factor |
| discrete space | underlying set | $\mathbf{Top}(D S, Y) \cong \mathbf{Set}(S, UY)$ | any function is continuous |
| $- \times B$ | $(-)^B$ | $\mathbf{Set}(A \times B, C) \cong \mathbf{Set}(A, C^B)$ | currying |
| coproduct | diagonal $\Delta$ | $(A + B \to C) \cong ((A,B) \to \Delta(C))$ | pair of maps out |
| diagonal $\Delta$ | product | $(C \to A \times B) \cong (\Delta(C) \to (A,B))$ | pair of maps in |

### Composition of adjunctions

Adjunctions compose: if $F \dashv G$ between $\mathcal{A}$ and
$\mathcal{A}'$ and $F' \dashv G'$ between $\mathcal{A}'$ and $\mathcal{A}''$,
then $F' \circ F \dashv G \circ G'$, because the hom-set bijections
chain:[^lein-comp]

$$
\mathcal{A}''\big(F'F(A), A''\big) \cong \mathcal{A}'\big(F(A), G'(A'')\big)
\cong \mathcal{A}\big(A, GG'(A'')\big).
$$

### Adjunctions between posets

View posets as categories with at most one arrow
between objects. Then order-preserving maps $f \colon A \to B$ and
$g \colon B \to A$ form an adjunction $f \dashv g$ exactly when

$$
f(a) \le b \iff a \le g(b) \quad\text{for all } a, b.
$$

Both hom-sets are empty or singletons, so a bijection between them is just the
biconditional; naturality is automatic. Such a pair is a **Galois
connection**.[^lein-poset][^bw-poset] Topological closure is one instance:
$\mathrm{Cl}(A) \subseteq B \iff A \subseteq B$ for closed $B$ exhibits closure
as left adjoint to the inclusion of closed sets into all sets.[^lein-closure]

The hom-set bijection is one of three equivalent descriptions of $F \dashv G$.
The other two rebuild it from two natural transformations, the
[unit and counit](/category-theory/adjunctions/units-and-counits), and from a
family of [universal arrows](/category-theory/adjunctions/adjunctions-via-universal-arrows).
Each is convenient for a different purpose.

[^lein-intro]: **Leinster**, _Basic Category Theory_, Ch. 2 opening — "adjoint functors arise everywhere," Mac Lane's slogan; the three equivalent viewpoints on adjunction and the plan to prove them equivalent.
[^simm-def]: **Simmons**, _An Introduction to Category Theory_, §5.1 — source and target categories, the naming convention $F \dashv G$ with $F$ left and $G$ right, and the left/right slot mnemonic for the hom-sets.
[^lein-def]: **Leinster**, §2.1, Definition 2.1.1 and the naturality axioms (2.2), (2.3) — the transpose bar, its self-inverse property, and compatibility of transposition with composition on each side.
[^lein-ex]: **Leinster**, §2.1, Exercise 2.1.14 — the two naturality equations combine into a single equation covering pre- and post-composition together.
[^bw-homset]: **Barr & Wells**, _Category Theory for Computing Science_, §13.3.1, Theorem 13.3.2 — $F \dashv U$ iff $\mathrm{Hom}(F-,-)$ and $\mathrm{Hom}(-,U-)$ are naturally isomorphic as functors $\mathcal{A}^{\mathrm{op}} \times \mathcal{B} \to \mathbf{Set}$.
[^lein-free]: **Leinster**, §2.1, Examples 2.1.3(a) — the free vector space adjunction $F \dashv U$ between $\mathbf{Set}$ and $\mathbf{Vect}_k$, with the restriction/linear-extension bijection worked out in full.
[^lein-free2]: **Leinster**, §2.1, Examples 2.1.3(b) — free group left adjoint to the forgetful functor $\mathbf{Grp} \to \mathbf{Set}$; the free group is hard to build explicitly but characterized by the adjunction.
[^lein-uniq]: **Leinster**, §2.1, Remark 2.1.2(d) — a functor has at most one left adjoint up to isomorphism, so "the left adjoint of $G$" is well defined and the adjunction characterizes $F$.
[^lein-everywhere]: **Leinster**, §2.1, Remark 2.1.2(c) — whenever a pair of functors runs between two categories, there is an excellent chance one is adjoint to the other.
[^lein-top]: **Leinster**, §2.1, Example 2.1.5 — the double adjunction $D \dashv U \dashv I$ between $\mathbf{Set}$ and $\mathbf{Top}$, discrete and indiscrete topologies as adjoints to the points functor.
[^lein-curry]: **Leinster**, §2.1, Example 2.1.6 — the currying adjunction $(- \times B) \dashv (-)^B$ in $\mathbf{Set}$, with the transpose given by reassociating arguments.
[^bw-diag]: **Barr & Wells**, §13.2.4 and Exercise 13.2.9(2) — the right adjoint to the diagonal $\Delta$ is the binary product functor and the left adjoint is the coproduct; counit = projections.
[^lein-comp]: **Leinster**, §2.1, Remark 2.1.11 — adjunctions compose, with the composite hom-set bijection obtained by chaining the two.
[^lein-poset]: **Leinster**, §2.1, Example 2.2.7 — adjunctions between ordered sets are exactly Galois connections $f(a) \le b \iff a \le g(b)$; naturality and the triangle identities are automatic.
[^bw-poset]: **Barr & Wells**, §13.2.8 — adjoints between preordered sets, the equivalence of the two order conditions with the biconditional, and Galois connections from contravariant pairs.
[^lein-closure]: **Leinster**, §2.2, after Example 2.2.7 — topological closure as left adjoint to the inclusion of closed subsets, witnessed by $\mathrm{Cl}(A) \subseteq B \iff A \subseteq B$.
