My notes claim the following theorem:
A function $f: \mathbb{R}^n \to \mathbb{R}^m$ is continuous if and only if whenever $U \subseteq R^m$ is an open set, then $f^{-1}(U) \subseteq \mathbb{R}^n$ is an open set.
Why do we require both sets to be open? What if they were closed?