TITLE: There are two types of functors; covariant and contravariant. Is it right?
QUESTION [5 upvotes]: In the category theory, there are lots of functors between the categories. I thought that however each functor must be either covariant or contravariant, for instance, the identity functor is covariant. But the following example made me confused;
Let $\mathfrak C$ be any category. Consider the functor that assigns to each pair $\left(A, B\right)$ of objects of $\mathfrak C$ the set hom$_\mathfrak C\left(A, B\right)$ and to each pair of motphisms $f : A\rightarrow A', g : B\rightarrow B'$ the function hom$\left(f, g\right) : $ hom$_\mathfrak C\left(A', B\right)\rightarrow$ hom $_\mathfrak C\left(A, B'\right)$ given by $h \mapsto ghf$. Then hom$_\mathfrak C \left(-, -\right)$ is a functor of two variables from $\mathfrak C$ to the category $\mathfrak S$ of sets, contravariant in the first variable and covariant in the second.
Is this functor either covariant or contravariant? or is it wrong?

REPLY [2 votes]: Look at Giorgio's answer. This is an addition for your example.
Your example is a bifunctor $\hom_{\mathcal{C}}\left(-,-\right):\mathcal{C}^{op}\times\mathcal{C}\rightarrow\mathbf{Set}$.
For every object $A$ you have the covariant functors $\hom_{\mathcal{C}}\left(A,-\right):\mathcal{C}\rightarrow\mathbf{Set}$
and $\hom_{\mathcal{C}}\left(-,A\right):\mathcal{C}^{op}\rightarrow\mathbf{Set}$.
You can also look at functor $\hom_{\mathcal{C}}\left(-,A\right):\mathcal{C}\rightarrow\mathbf{Set}$
as a contravariant functor.