how to prove that pullback preserves monomorphisms?

Solution 1:

Suppose $f$ is a monomorphism, and suppose we have some object $Z$ with two maps $\alpha, \beta: Z \to X'$ such that $p_2 \alpha = p_2 \beta$. We must show that $\alpha = \beta$. By hypothesis, it follows that $g p_2 \alpha = g p_2 \beta$, so $f p_1 \alpha = f p_1 \beta$ since the diagram commutes. But $f$ is a monomorphism, so $p_1 \alpha = p_1 \beta$. Now $\alpha$ and $\beta$ agree after applying either $p_1$ or $p_2$, so by the universal property of the fibered product, $\alpha = \beta$ as desired.