TITLE: how to prove that pullback preserves monomorphisms?
QUESTION [12 upvotes]: I am self-reading a book, and was stuck in proving this property that the pullback of a monomorphism is a monomorphism. I am still not very familiar with how to use the universal mapping property (which I guess I need in this) to prove things, though I can understand some examples of using UMP. 
Searching around, I only found this Math SE answer about what it means for pullbacks to preserve monomorphisms (which is the same as what the book says). Based on that answer:
Given a pullback square,
$$\require{AMScd}
\begin{CD}
X' @> p_1 >> X \\
@V p_2 VV @VV f V \\
Y' @>> g > Y
\end{CD}$$
if $f: X \to Y$ is a monomorphism, then $p_2: X' \to Y'$ is also a monomorphism.
How can I prove this property?

REPLY [17 votes]: 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.