# The “magic diagram” is cartesian

I am trying to solve an exercise from Vakil’s lecture notes on algebraic geometry, namely, I want to show that
$$\require{AMScd}\require{AMScd}$$
$$\begin{CD} X_1\times_Y X_2 @>>> X_1\times_Z X_2\\ @V V V @VV V\\ Y @>>> Y \times_Z Y \end{CD}\begin{CD} X_1\times_Y X_2 @>>> X_1\times_Z X_2\\ @V V V @VV V\\ Y @>>> Y \times_Z Y \end{CD}$$

is a cartesian diagram. I think I’ve figured out where the maps come from: The lower map is the diagonal induced from the universal property of $$Y \times_Z YY \times_Z Y$$, the upper map is coming from the universal property of $$X_1\times_Z X_2X_1\times_Z X_2$$ (this is one of the previous exercises in Vakil’s notes), the map on the right also comes from the universal property of $$Y \times_Z YY \times_Z Y$$ since we have two maps from $$X_1\times_Z X_2X_1\times_Z X_2$$ to $$YY$$ whose composition with $$Y\rightarrow ZY\rightarrow Z$$ coincides, and finally the map on the left side is either composition $$X_1\times_Y X_2 \rightarrow X_i \rightarrow YX_1\times_Y X_2 \rightarrow X_i \rightarrow Y$$. At this point, I don’t even see why this diagram should be commutative.

But even discarding the issue of commutativity, given some $$TT$$ instead of $$X_1\times_Y X_2X_1\times_Y X_2$$ making the above diagram commute, I have no clue how to obtain a canonical map $$T \rightarrow X_1\times_Y X_2T \rightarrow X_1\times_Y X_2$$.

I could solve all the other problems in this section of his notes, but this one eludes me. Any help or solution (preferably just using the universal properties that we’re given) would be greatly appreciated.

First, why is the diagram commutative: you’ve got the following commutative diagram: It is commutative precisely because this is how we defined the map $X_1 \times_Y X_2 \to X_1 \times_Z X_2$. The bottom right square is used to define $Y \to Y \times_Z Y$.

Now, you diagram is commutative iff the two maps $X_1 \times_Y X_2 \to Y \times_Z Y$ are equal, iff each component maps are equal.

• The red path is used to define the (first component of the) map that factors through $X_1 \times_Y X_2 \to X_1 \times_Z X_2 \to Y \times_Z Y$
• The blue path is used to define the (first component of the) map that factors through $X_1 \times_Y X_2 \to Y \to Y \times_Z Y$.

As you can see, they are equal. Therefore the magic diagram commutes.

Now, the universal property. Suppose you’re given $T \to X_1 \times_Z X_2$ and $T \to Y$ such that the two maps $T \to Y \times_Z Y$ are equal. In other words, you’re given maps $T \to X_1$, $T \to X_2$ and $T \to Y$, such that the two maps $T \to X_i \to Z$ are equal, and the maps the blue path and the red path are equal (where $T$ is in the position of $X_1 \times_Y X_2$). As you can see, this is precisely the same thing as giving two maps $T \to X_i$ such that $T \to X_i \to Y$ are equal, because then the fact that the maps into $Z$ are equal is a consequence of the fact that the maps into $Y$ are equal. So there’s a unique map $T \to X_1 \times_Y X_2$ making everything commute.

Considering that Vakil introduces the Yoneda lemma after this exercise, I didn’t dare give the proof using it. But by the Yoneda lemma, you can just consider the case of sets; in the equations that you’ll write, you’ll arrive at the same conclusion — that giving a maps that make everything commute will give you a redundant condition that the images in $Z$ are the same, and that the fibered product of the whole thing is the fibered product over $Y$.