I am practicing topology with a book, and I'm trying to understand the following definition.
A map $f$: $\mathbb{R} \rightarrow \mathbb{R}$ is said to be continuous if for every open subset $U \subseteq \mathbb{R}$, its preimage $f^{-1}(U)$ is open in $\mathbb{R}$.
But I don't get it. For example I'll use a function that I know is not continuous:
$f: \mathbb{R} \rightarrow \mathbb{R} $
$ f(x) = \left\{ \begin{array}{ll} \frac{1}{x} & \quad x \neq 0 \\ 0 & \quad x = 0 \end{array} \right. $
How to show that f is not continuous using the previous definition?.
Thank you.
The preimage of the open set $(-1,1)$ under $f$ is $(-\infty,-1)\cup \{0\}\cup (1,\infty),$ which is not open.