a basic doubt on the theorem that $f$ is continuous iff the inverse image of every open set is open Suppose $f:X \to Y$ and some "not open set" in $X$ is the inverse image of an open set in $Y$. then the function is not continuous as there is an open set whose inverse image is not open. But, intuitively thinking, what is the reason behind this ? why the function is not continuous at the point (say $p$) which is not an interior point. What is the value of $\epsilon$ such that for any neighbourhood around $p$ there exists a point $x$ (this point is nothing but the point which is not an interior point) in that neighbourhood such that the distance between the images of $f(p)$ and $f(x)$ is greater than $\epsilon$.

Suppose $U \subset Y$ is open but $f^{-1}(U)$ is not open, so there is a point $p \in f^{-1}(U)$ which is not an interior point of $f^{-1}(U)$.  Now we have $f(p) \in U$, and $U$ is open, so there is an $\epsilon$ such that the ball $B(f(p), \epsilon) \subset U$.  This is the $\epsilon$ you requested: since $p$ is not an interior point of $f^{-1}(U)$, every neighborhood of $p$ contains a point $x$ with $x \notin f^{-1}(U)$.  That is, $f(x) \notin U$, so in particular, $d_Y(f(x), f(p)) \ge \epsilon$.
