Category of sets with only injective morphisms Suppose that $\mathcal{I}$ is the category where objects are sets and morphisms are injective functions.


*

*Every epimorphism is an isomorphism.
Suppose $f : A \to B$ is an epimorphism in $\mathcal{I}$. Since $f$ is injective, it must be a monomorphism in $\mathcal{I}$. Consider $g, h : B \to C$. By definition, $f \circ g = f \circ h \implies g = h$ and $g \circ f = h \circ f \implies g = h$. So if there is an inverse for $f$, then it must be unique. To construct the inverse for $f$, can we say that if $f(x) = y$, then $f^{-1}(y) = x$? This seems to be a proper inverse.

*Does $\mathcal{I}$ have all equalizers? Coequalizers?
To show that $\mathcal{I}$ has all equalizers, consider morphisms $g, h : A \to B$ in $\mathcal{I}$. We can construct an equalizer for these two functions as follows. Consider the set $E = \{ x \in A : g(x) = h(x)\}$. We say that $f$ is the natural inclusion from $E$ to $A$ (note that this is indeed an injective function). Then of course $g \circ f = h \circ f$ by definition of $f$.
 A: Epimorphism in $\mathcal I$ are surjective functions:
Let $f\colon A\to B$ be an epimorphism and assume $f$ is not a surjective map, say $b\in B$ is not in its image. We can define $g_1\colon B\to B\cup\{B\}$ by letting $$g_1(x)=\begin{cases}B&x=b\\x&x\ne b\end{cases}$$ and let $g_2\colon B\to B\cup\{B\}$ be the inclusion map. Then $g_1\circ f=g_2\circ f$, contradicting $g_1(b)\ne g_2(b)$.
Hence epimorphisms in $\mathcal I$ are bijections, which obviously have an inverse function (that is of course injective).

Let $f,g\colon X\to Y$. Then we have the map $E=\{\,x\in X\mid f(x)=g(x)\,\}$ and the inclusion $\iota\colon E\to X$. This is an equalizer: Clearly $f\circ \iota=g\circ\iota$. If $m\colon O\to X$ is such that $f\circ m=g\circ m$ then - as $f,g$ are injective - clearly $m[O]\subseteq E$ and the inclusion $O\to E$ is an injective map with the desired property. As everything is injective, thsi map is clearly unique.
A: You asked:

Does $\mathcal{I}$ have all [...] [c]oequalizers?

No, it does not. Recall that a coequalizer of $f, g: A \to B$ is $h: B \to C$ so that $h \circ f = h \circ g$. For $f \neq g$ this can only be the case if $h$ as a function (i.e. morphism in Set) is not injective, but then it would not be a morphism in $\mathcal{I}$. Contradiction.
Hence $\mathcal{I}$ only has coequalizers to morphism pairs where both morphisms are equal.

It might be worth pointing out that it would not be sufficient to use the argument: "For specific A, B this C is a coequalizer in Set, but C is not contained in the subcategory $\mathcal{I}$". Even if coequalizers of $f, g: A \to B$ exist in a category and in a subcategory, they are not necessarily equal.
As a non-contrived example you might consider Set and its subcategory $U[Grp]$, i.e. the image of the usual category $Grp$ under the forgetful functor. Coequalizers in Set are built by quotiening $B$ by the smallest equivalence $R$ such that $\forall a \in A. f(a) R g(a)$. Likewise in any other category with algebraic structure on top of it (think of Grp, Vect_K, ...) $R$ is taken to be smallest congruence. That means it encompasses more elements — or that it quotients more. So to conclude this counterexample, in Set you would have a coequalizer, in $U[Grp]$ as well, but such a one which quotients more if in doubt. I haven't thought about a concrete example, but feel to free to comment if you would like to see this worked out.
