TITLE: Functors in arrow category
QUESTION [5 upvotes]: I am studying Awodey's Category theory book. I have trouble understanding the following line:
Observe that there are two functors in arrow category i.e.
$$
 \begin{align}
 \mathscr{C}  \xleftarrow{\textbf{dom}}  \mathscr{C}^{\rightarrow} \xrightarrow{\textbf{cod}} \mathscr{C}
 \end{align} 
$$
where $\mathscr{C}^{\rightarrow}$ is the arrow category corresponding to $\mathscr{C}$.
They have not mentioned what these $\textbf{dom}$ and $\textbf{cod}$ are? How do we prove that these are functors?
My understanding:
Now, in the diagram given below:

$\textbf{dom}:\mathscr{C}^{\rightarrow}  \xrightarrow{\textbf{dom}} \mathscr{C}$. So,
$[f:A \to B] \mapsto A $ (object mapping of functor $\textbf{dom}$) and
if $g=(g_1,g_2):[f:A \to B] \to [f':A' \to B'] $, then $(g_1,g_2) \mapsto  [f:A \to B]$ (the morphism mapping of functor $\textbf{dom}$ ).
Using this definition, If I proceed to prove the statement:
(a)
$$
\textbf{dom} ( g:f \to f'  ) = \textbf{dom}(g): \textbf{dom}(f) \to \textbf{dom}(f') 
$$
LHS = $f:A \to B$ and RHS = $\textbf{dom}(g): A \to A'$ (which seems absurd)
I am not sure if this makes sense.

REPLY [4 votes]: The functor $\mathbf{dom}$ takes the object $f$ to $A,$ the object $f'$ to $A';$ and takes the arrow $(g_1,g_2):f\to f'$ to $g_1.$ Notice $g_1$ is an arrow $A\to A'$ as it should be. 
The identity morphism $\mathrm{id}_f$ is simply $(\mathrm{id}_A, \mathrm{id}_{A'}),$ so $\mathbf{dom}(\mathrm{id}_f) = \mathrm{id}_A$ as required. 
The composition of two morphisms $(g_1,g_2)\circ (h_1,h_2)$ is $(g_1\circ h_1, g_2\circ h_2),$ as can be seen by drawing two commuting squares side by side. So $\mathbf{dom}((g_1,g_2)\circ (h_1,h_2)) = g_1\circ h_1 = \mathbf{dom}((g_1,g_2))\circ\mathbf{dom}((h_1\circ h_2))$