Fiber product with diagonal morphism [duplicate]

Stacks tag 01KR states that the diagram of schemes

is "by general category theory" "a fibre product diagram". I tried to show this using the universal property, but didn't obtain anything useful. How do you prove $X\times_TY$ is a fiber product of $X\times_SY$ and $T$ with respect to $T\times_ST$?

marked as duplicate by Najib Idrissi, Community♦Dec 7 '15 at 22:06

• If people don't want to spend time converting the notations in the duplicate: $X \leadsto X_1$, $Y \leadsto X_2$, $T \leadsto Y$, $S \leadsto Z$. – Najib Idrissi Dec 7 '15 at 21:25

You have to show that if an arbitrary scheme $P$ (weird name but out of letters!) maps to $X \times_S Y$ and to $T$, commuting with the given maps to $T \times_S T$, then this map factors through a map $X \times_T Y$.
To get a map $P \to X \times_T Y$, you'd better make a map $P \to X$ and a map $P \to Y$, commuting with the given map to $T$. There's only one reasonable guess for the maps $P \to X$ and $P \to Y$; namely the factors of the given map $P \to X \times_S Y$, so you're forced to check that these commute with the given map $P \to T$.
To check this, build a square diagonally to the bottom right of your picture, giving the definition of $T \times_S T$, and note the definition of the map $\Delta$ implies the two compositions $T \to T$ are both the identity. Now add a copy of $X$ and $Y$ to your picture, mapping to the two different $T$s. I claim these copies receive maps from the $X \times_S Y$ in your picture making everything commute. This is because $Y$ and $X$ both receive their $S$-scheme structure via a given map $T \to S$ (as can be confirmed by reading the link in your question).