# Definition of continuity in topological spaces does not seem quite right.

Here's how continuity is defined in most standard topology texts

A function from $X$ to $Y$ is continuous iff the inverse image of each open set of $Y$ is open in $X$.

This definition does not quite seem right to me because it assumes that each element of $Y$ has an inverse image in $X$ and the image is unique. Clearly the definition does not quite hold if the function is not bijective. So how does one define continuity for topological functions which are not bijective?

• The definition makes no reference to the inverse images of elements of $Y$. – Michael Albanese Jan 6 '15 at 3:15
• if $f:X\to Y$ is continous then $f^{-1}:\tau(Y)\to\tau(X)$ indeed is a map – janmarqz Jan 6 '15 at 3:20
• It is perfectly fine for inverse images of open sets to be empty. Empty sets are vacuously open. – graydad Jan 6 '15 at 3:24
• @graydad: The empty set is open because it is an axiom of topological spaces. But it is not vacuously open, which would mean one could do without that axiom. (The empty set is vacuous all right, but that is not the point here.) – Marc van Leeuwen Jan 6 '15 at 8:20

The inverse image of a set $V \subset Y$ under function $f$ is defined as: $$\{x \in X \mid f(x) \in V\}.$$ This set is defined for any function $f$ from $X$ to $Y$ and any subset $V$ of $Y$.
Furthermore, I will try to give some intuition as to why the definition of continuity is as it is. Consider metric spaces $X$ and $Y$. An open set in a metric space is a set $U$ such that for every $u \in U$, $U$ contains an open ball centered at $u$. That is, no point in $U$ is on the boundary of $U$.
If a function $f$ is continuous and maps $x \in X$ to $y \in Y$, then if $y$ is in an open set $V \subset Y$, and if $B$ is a ball centered at $y$ contained in $U$, changing $x$ slightly enough - say by some amount $\varepsilon$ - should change $f(x)$ slightly enough that $f(x)$ remains in $B$, thereby remaining in $V$. Thus $x$ lies in a ball with radius $\varepsilon$ that gets mapped entirely within $V$. So simply by virtue of $x$ being mapped into $V$, a ball around $x$ is also mapped into $V$. Therefore the inverse image of $V$ under $f$ is open.