Universal property of one-point compactification Let $X$ be a locally compact Hausdorff space and $f:X\to X^*$ be its one-point compactification.
Is it true that for every compactification $g:X\to Y$, there is only one continuous map $\varphi:Y\to X^*$ such that $f= \varphi\circ g$?
I guess $\varphi(x)=*$ when $x\notin g(X)$. If this and the proposition are true, $g(X)(=\varphi^{-1}(f(X)))$ must be open, but I do not know how to prove this.
"compactification $g:X\to Y$" means:


*

*$Y$ is compact.

*$g$ is embedding.

*$\overline{g(X)}=Y$.

*$Y$ is Hausdorff.

 A: The commutativity $f = \phi \circ g$ forces the definition of $g$: if $x \in X$, then $g(x) \in g[X]$ and $\phi$ must map $g(x)$ to $f(x)$, which is essentially $x$ but seen in its one-point compactification $X^\ast$. So $\phi(x)$ is determined on the dense set $g[X]$ of $Y$ so is unique as $X^\ast$ is Hausdorff.
(Theorem: if $f,g: X \to Y$ are continuous, $D$ is dense in $X$, and $Y$ Hausdorff, then $f\restriction_D = g\restriction_D$ implies $f=g$ on $X$.) And defining $\phi(x)$ to be $\infty$ (what you call $\ast$) on $Y\setminus g[X]$ does not affect the commutativity of the diagram and is a choice that makes $\phi$ continuous, as we'll see. But first:

Theorem: if $X$ is locally compact Hausdorff and $Y \subseteq X$ is locally compact in the subspace topology, then $Y=C \cap O$ where $O \subseteq X$ is open and $C\subseteq X$ is closed. 

From the theorem we have that $g[X]$ is open in $Y$ when $g:X \to Y$ is a Hausdorff compactification and $X$ is locally compact Hausdorff.
Now to the continuity of $\phi$ as we defined above: if $U \subseteq X^\ast$ is open, it's either a subset of $X$ (I'll forget about $f$, $X^\ast=X \cup \{\infty\}$ and the embedding is standard: $f(x)=x$) and then $\phi^{-1}[U]$ is $g[U]$, which is open in $Y$ (as $g[U]$ is open in $g[X]$ and $g[X]$ is open in $Y$), or 
$U=X^\ast \setminus K$ where $K \subseteq X$ is compact. Then $\phi^{-1}[U]= Y\setminus g[K]$ which is open in $Y$ too ($g[K]$ is compact, hence closed, as $Y$ is Hausdorff). So $\phi$ is continuous and we already saw it commutes in the right way and is unique by the denseness argument.
