TITLE: Why do we first introduce the open set definition for continuity instead of the neighborhood definition?
QUESTION [14 upvotes]: After (nearly) completing my course in topology, something weird just stuck out to me which I hadn't considered before. When first discussing continuity, we often use the following definition:

Let $X$ and $Y$ be topological spaces. We say that $f:X\to Y$ is continuous if for every open set $V\in Y$, $f^{-1}(V)$ is open in $X$.

This is a rather opaque definition and isn't quite as easily relatable to the notion we develop on $\Bbb R$ as the following definition:

Let $X$ and $Y$ be topological spaces. We say that $f:X\to Y$ is continuous if for each $x\in X$ and neighborhood $V$ containing $f(x)$, there is a neighborhood $U$ of $x$ such that $f(U)\subseteq V$.

These are of course equivalent definitions. However the latter is quite easy to connect to our normal intuition built up from real analysis: if our $x$-values are "close", then our $y$-values must be "close." Pedagogically, why have we somewhat cast away the latter definition as a mere equivalence and opted for the former? Clearly the latter is what led to the former and is, arguably, easier to latch on to. Is this somewhat of a byproduct of the category-theoretic nature of the former (with $f$ being a morphism of topological spaces) and math's general trend towards category-theoretic personifications? Can it also be attributed to early topologists wanting to separate topology from analysis in this way?

REPLY [3 votes]: I think it is a pity that the definition of a continuous function isn't more intuitive. A lot of students have difficult to grasp topology even though it shouldn't be so and a more intuitive approach would make their studies much easier. The usual definition should be a theorem in my opinion. Given a function $f:X\to Y$, my favorite definition is:

For all sets $B\subset Y$, it holds that $x\in
   \overline{f^{-1}(B)}\Rightarrow f(x)\in \overline{B}$

that tells me something like "if $x$ is close to $f^{-1}(B)$ then $f(x)$ must be close to 
$B$".