# continuous constant function general topology

I've read that if $X$ and $Y$ are topological spaces, and if the constant function $f: X \rightarrow Y$ mapping all of $X$ into the single point $y_{0}$ of $Y$, then $f$ is continuous. (Munkres page 107)
Munkres gives the following brief proof: Let $f(x) = y_{0}$ for every $x$ in $X$. Let $V$ be open in $Y$. The set $f^{-1}(V)$ equals $X$ or $\emptyset$, depending on whether $V$ contains $y_{0}$ or not. In either case, it is open.
My question is: $f$ is clearly not injective, so what does Munkres mean by the inverse function $f^{-1}$? What am i missing?
Thanks for any help/clarification!

Sincerely,

Vien

-

$f^{-1}(V)$ is the preimage of $V$ under $f$. It is defined to be the set of all $x \in X$ such that $f(x) \in V$. So if $y_0 \in V$, then $f^{-1}(V) = X$ because all points of $X$ map into the single point $y_0$ that is now in $V$. If $y_0 \notin V$, then the entirety of $f(X)$ is disjoint from $V$, so that $f^{-1}(V) = \emptyset$.