A question about Hom functor in category theory

Suppose $\mathcal{C}$ is a category and $f: A \rightarrow B $ is a morphism from an object $A$ to another object $B$ such that $f_*:Hom(C,A) \to Hom(C,B)$ is bijective $\forall C \in ob(\mathcal{C})$. Can it be concluded that $f$ is an equivalence ? I am able to see that $\exists g: B \to A$ such that $fg=id_B$ but am unable to find an $h$ such that $hf=id_A$. We can assume that the category is small if it helps. If it is not true, how can we find a counterexample ? Thanks


Solution 1:

Yes indeed, you just found the famous Yoneda Lemma (http://en.wikipedia.org/wiki/Yoneda_lemma). Concretely, while you only needed surjectivity of $f_{\ast}$ to deduce the existence of $g: B\to A$ with $fg=\text{id}_B$, you can use injectivity to deduce from $f_{\ast}(gf)=f(gf)=(fg)f=\text{id}_B\ f=f\ \text{id}_A=f_{\ast}(\text{id}_A)$ that $gf=\text{id}_A$ as well, hence $g$ is a two-sided inverse of $f$.

Addendum concerning the relation to the Yoneda Lemma:

The Yoneda-Lemma says that for any category ${\mathscr C}$ the Yoneda-functor $${\mathbb Y}: {\mathscr C}\to\text{Func}({\mathscr C}^{\text{op}},\textsf{Set}), \quad X\mapsto{\mathbb Y}(X) := \text{Hom}_{{\mathscr C}}(-,X)$$ is fully faithful. In particular - as does any fully faithful functor - it reflects isomorphisms.

Now, your assumption is that for all $C\in{\mathscr C}$ the map $f_{\ast}:\text{Hom}_{\mathscr C}(C,X)\to \text{Hom}_{\mathscr C}(C,Y)$ is bijective, which means that the morphism ${\mathbb Y}(f): {\mathbb Y}(X)\to{\mathbb Y}(Y)$ of functors ${\mathscr C}^{\text{op}}\to\textsf{Set}$ is a pointwise isomorphism. However, pointwise isomorphisms of functors are already isomorphisms (check this), so your assumption implies that ${\mathbb Y}(f)$ is an isomorphism, and hence so is $f$.