# How to prove hom functor preserves pullbacks

I saw some answers in Hom-functor preserves pullbacks but the replies are too short, could someone please give me a more detailed solution to this?

-
What is your definition of pullback? This fact is by definition if you have the right definition of pullback. – Dori Bejleri Jan 4 '14 at 18:12
Look back at the link. Someone has posted a complete answer. – user43687 Jan 4 '14 at 18:19
I dont understand the bit how to show hom(A,X×SY)→hom(A,X)×hom(A,S)hom(A,Y) is an isomorphism @user43687 – user119099 Jan 4 '14 at 18:33
In my understanding, pullback of f along g is the terminal object of Cone(f,g) @Dori Bejleri – user119099 Jan 4 '14 at 18:35
@user119099, I gave an alternate (detailed) approach here. – Robert Cardona Sep 12 '15 at 10:51

Following Martin's answer from the link, we want to show that the natural map $$Hom(A,X\times_{S}Y)\to Hom(A,X)\times_{Hom(A,S)}Hom(A,Y)$$ is a bijection. Now in the category of sets, the pullback of two maps $f:X\to S$ and $g:Y\to S$ can be identified with $\{(x,y)\in X\times Y: f(x)=g(y)\}$. For the above example, using the definition of the $Hom$ functor along with this fact, we can identify the RHS pullback as the set of commuting squares $$\begin{array}{ccc} A & \to & Y \\ \downarrow & & \downarrow \\ X & \to & S \end{array}$$ By universal property of pullback, there is a unique morphism $\eta:A\to X\times_{S} Y$ making the pullback diagram commute (I don't want to draw the picture) which depends only on the above commuting square. The uniqueness condition provides us with a well defined function from commuting squares to morphisms $A\to X\times _{s} Y$. Hence a backwards map $$Hom(A,X)\times_{Hom(A,S)}Hom(A,Y)\to Hom(A, X\times_{S} Y).$$ Now one needs to check that the composite of this map with the above gives identity. However, this follows immediately from the universal property of pullback.
A similar argument works to show that $Hom(A,-)$ preserves all limits. – user43687 Jan 4 '14 at 19:10