According to this article, $X\to X\cup_f Y$ is a closed embedding if $A\subset X$ is closed. I wonder how to prove this.
The adjunction space $X\cup_f Y$ is $X\sqcup Y/{\sim}$. So the map above is the composition of the inclusion map $X\to X\sqcup Y$ and the quotient map $X\sqcup Y\to X\sqcup Y /{\sim}$. The latter map is continuous because if I have a subset of the quotient is open iff its preimage under the quotient map is open. The former map is continuous because given an open set of the disjoint union, it is a union of open sets of $X$ and $Y$, and the preimage of such a union is just the corresponding union of open subsets of $X$, which is open. Thus the composition is continuous. Is this argument correct?
Further, I need to prove injectivity and that the inverse is continuous (on the image); and also that it maps closed sets to closed sets. But I'm stuck at these points.
Suppose that $A \subseteq Y$ is a closed subspace, and $f : A \to X$ is a continous map. Define an equivalence relation on $X \sqcup Y$ by $a \sim f(a), \forall a \in A$. Denote $X \cup_f Y = (X \sqcup Y)/{\sim}$ to be the quotient space, with $q : X \sqcup Y \to X \cup_f Y$ to be the quotient map. So $q|_X : X \to X\cup_f Y$.
Let $B \subseteq X$ is any closed subset. Note that \begin{align*} &(q|_X)(B) = q(B)\subseteq (X\sqcup Y)/{\sim} \quad \text{ is closed }\\ &\Leftrightarrow q^{-1}(q(B)) \subseteq X \sqcup Y \quad \text{ is closed} \\ &\Leftrightarrow q^{-1}(q(B)) \cap X \text{ and } q^{-1}(q(B)) \cap Y \text{ are both closed} \end{align*}
From the equivalence relation, you should be able to show that $$q^{-1}\big(q(B)\big) \cap X = B, \quad q^{-1}\big(q(B)\big) \cap Y = f^{-1}(B).$$ Both subsets above is closed, since $B$ is closed by assumption and $f$ is continous. So $q(B) \subseteq X \cup_f Y$ is closed. Thus $q|_X$ is a closed map. In particlular, $q(X)$ is closed subspace of $X \cup_f Y$.
Given any two points $x_1,x_2 \in X$, the condition $[x_1] = q(x_1) = q(x_2) = [x_2]$ immidiately imply that $x_1=x_2$. So $q|_X$ is injective. This completes the proof that $q|_X : X \to X\cup_f Y$ is a closed embedding.