A basic question on inverse image of an open set being open Inverse image of every open set (in "range" or "co-domain" which one is true ??) of a continuous function must be open. if it is co-domain then how openness of a set which is not part of a mapping determines whether the mapping is continuous or not ? 
 A: The answer is "both." This is for two reasons. Let's say that $f:X\to Y$ is a continuous function with range $Z$. Then the open subsets of $Z$ are precisely those of the form $Z\cap U,$ where $U$ is an open subset of $Y.$ This is reason number 1. Reason number 2 is that by definition of inverse image, it can be shown that for any subsets $A,B$ of $Y$, we have $$f^{-1}[A\cap B]=f^{-1}[A]\cap f^{-1}[B],$$ which is a good exercise to prove. Putting these two pieces of information together, we see that for any open subset $Z\cap U$ of the range, we have $$f^{-1}[Z\cap U]=f^{-1}[Z]\cap f^{-1}[U]=X\cap f^{-1}[U]=f^{-1}[U].$$ Now, it's entirely possible that $U$ is disjoint from $Z$, in which case this isn't very interesting (since then the inverse image is the empty set), but those that aren't disjoint from $Z$ tell us all we need to know about its topology.
Upshot: $f$ is continuous if and only if every open subset of $Y$ has an open inverse image if and only if every open subset of $Z$ has an open inverse image.
