Skip to main content
3 of 3
added 15 characters in body
Qiaochu Yuan
  • 118.2k
  • 40
  • 447
  • 741

The nLab page you're looking for is called factorization systems. Here is my favorite one, which I think answers your question. In any category with finite limits and colimits, every morphism $f : X \to Y$ has a canonical factorization

$$X \to \text{coim}(f) \to \text{im}(f) \to Y$$

where $\text{im}(f)$, the regular image, is the equalizer of the cokernel pair of $f$ (this is the "nonabelian" version of "kernel of the cokernel") and $\text{coim}(f)$, the regular coimage, is the coequalizer of the kernel pair of $f$ (again, the "nonabelian" version of "cokernel of the kernel"). These two constructions are categorically dual and so, among other things, the coimage-image factorization of $f$ in the opposite category is the same sequence of maps but in the opposite order.

In $\text{Set}$, the coimage and image are both the image of a function in the usual sense, but computed in different ways, which I think match the distinction you're getting at. $\text{coim}(f)$ is computed, more or less, by constructing the equivalence relation on $X$ defined by $x_1 \sim x_2 \Leftrightarrow f(x_1) = f(x_2)$, then quotienting $X$ by it. $\text{im}(f)$ is computed in a categorically dual way, although it looks a little strange at first: by first constructing the pushout $Y \sqcup_X Y$, then isolating the subset of $Y$ of elements which are sent to the same element by both of the canonical maps $Y \to Y \sqcup_X Y$.

In particular, the factorization you want for an injection is the regular image factorization, and the factorization you want for a surjection is the regular coimage factorization, so they are in fact categorically dual. The full coimage-image factorization combines these.

It's a nontrivial theorem that the map $\text{coim}(f) \to \text{im}(f)$ is an isomorphism in $\text{Set}$. It's also an isomorphism in any abelian category and in $\text{Grp}$ (this is an abstract form of the first isomorphism theorem), but in general it's just both a monomorphism and an epimorphism. A very instructive example is $\text{Top}$, where $\text{coim}(f)$ is the set-theoretic image topologized as a quotient of $X$, and $\text{im}(f)$ is the set-theoretic image topologized as a subspace of $Y$. (Note that these coincide for compact Hausdorff spaces!)

Qiaochu Yuan
  • 118.2k
  • 40
  • 447
  • 741