I'm not so sure if my "solution" to the following problem is correct. Can you please let me know if is? or what is wrong? I'm new with this stuff so sometimes I get confused with it.
Anyway here it is:
Suppose $Y$ is an arbitrary compactification of $X$, if $\beta X$ is the Stone-Cech compactification, prove there is a continuous, surjective closed map $g: \beta X \rightarrow Y$ that equals the identity on X.
My work:
Since $Y$ is a compactification of $X$ then by definition it is a Hausdorff compact space which contains a dense copy of $X$, so we can view $X$ as a subspace of $Y$. Hence we can consider the inclusion map $i: X \rightarrow Y$. This is certainly continuous so by the universal property of extension there exists a cts extension:$g: \beta X \rightarrow Y$. So all it remains to show is that $g$ is surjective and closed. Now it is closed because $\beta X$ is compact , $Y$ is Hausdorff and any continuous map from a compact space to a Hausdorff space is closed.
Now to show $g$ is surjective I'm kinda stuck. Here's what I tried. By definition $X$ is dense in $Y$. But $\beta X$ contains $X$ so $\beta X$ is dense in $Y$ as well. Now the continuous image of a dense set is dense hence:
$\overline{g(\beta X)} = Y$
But $\beta X$ is compact and the continuous image of a compact set is compact and a compact subset in a Hausdorff space (Y) is closed so $\overline{g(\beta X)} = g(\beta X)$. Thus $g(\beta X) = Y$.