Definition (continuity on topological space)

Let $(X,\tau)$ and $(Y,\rho)$ be topological spaces.

We say a function $f: X\to Y$ is continuous at $x_0\in X$ if for all neighbourhood $V$ of $f(x_0)$, we have $f\inv(V)$ being a neighbourhood of $x$.

If $(X,d)$ and $(Y,d')$ are metric spaces, this is equivalent to any of the following:

We say $f$ is continuous if this holds for all $x_0\in X$.