Demystifying the Magic Diagram
Vakil calls the following pullback diagram the magic diagram. I have also seen it being called the magic square. It often shows up in fiber product diagram chases such as those associated with separatedness assertions. $\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}
On the other hand, I'm a firm believer that mathematics is the art of demystifying magic. So I'm interested in some intuition of this diagram. Maybe there is some geometric intuition or maybe there is a nice toy example for this?
The diagram looks much less mysterious in the special case that $Z$ is the terminal object. Then the fibered products over $Z$ are just ordinary products, i.e., we have the diagram: $\require{AMScd}$ \begin{CD} X_1\times_Y X_2 @>>> X_1\times X_2\\ @V V V @VV V\\ Y @>>> Y \times Y \end{CD} The fact that this is a pullback square can be explained intuitively as follows. Given maps $f_1\colon X_1\to Y$ and $f_2\colon X_2\to Y$, we have a natural map $(f_1,f_2)\colon X_1\times X_2\to Y\times Y$. Pulling back this map along the diagonal $\Delta\colon Y\to Y\times Y$ extracts those fibers which lie over the diagonal, which gives us the fiber product $X_1\times_Y X_2$.
Ok, now let's move the discussion to happen over an arbitrary object $Z$, i.e., in the slice category $\mathcal{C}/Z$. Then $Z$ (with the identity map) is the terminal object, and products in this category are fiber products over $Z$. So in the diagram above, we replace $X_1\times X_2$ and $Y\times Y$ with $X_1\times_Z X_2$ and $Y\times_Z Y$, respectively. On the other hand, fiber products in $\mathcal{C}/Z$ agree with fiber products in $\mathcal{C}$, since a square is a pullback square in $\mathcal{C}/Z$ if and only if it is a pullback square in $\mathcal{C}$ after forgetting the maps to $Z$. So we don't need to modify $X_1\times_Y X_2$ in the upper left corner. Thus we get a pullback square: \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} in $\mathcal{C}/Z$, which (as we just noted) is also a pullback square in $\mathcal{C}$ after forgetting the maps to $Z$.