Suppose f be a continuous function from X to Y (where X and Y are domain and range). If Y is a closed set (closed interval if we working in \(R^1 \) ) then can we say that the domain is also closed?

There is a simple counter example. Suppose X = \(( -3pi,pi)\). Then Y (the range) is [-1, 1]. Surely the range is closed and domain is open. When can we say that if the range is closed, domain is also closed? Only when the function is one-one and onto.

Continuous functions generally give a good picture of the domain set if we know the nature of range set in some detail. For example inverse image of open sets in Y (range) is always open in X (domain). This is easy to prove from the definition of continuity. After all continuity means that for every \(epsilon \) neighborhood V of f(c) we get will get a \(delta \) neighborhood U of c (c being a point in domain) such that when we pick a x from U, f(x) will lie in V. Now let V be a open set containing f(c) (that is it is some neighborhood of f(c) and V is the subset of range set Y). Then \(f^{-1} (V) \) consists of all the points in X (domain set) that maps into V. Let \(x_1 in f^{-1} (V) \). Thus \(f(x_1) in V \). Since V is open we will get an \(epsilon\) neighborhood M of \(f(x_1) \) which is entirely inside M and such that there exists a \(delta \) neighborhood N of \(x_1 \) such that all points in N maps to M. In other word N is in \(f^{-1} (V) \). Thus \(f^{-1} (V) \) is open (we have found a open set N containing \(x_1 \) which is entire inside \(f^{-1} (V) \) ).

As we have seen, a continuous function does not necessarily map open sets to open sets (the sin function that we discussed earlier) but preimage of open sets are open. Preimage of closed sets are however not necessarily closed (we have the previous example again to our rescue). However if the continuous function is monotone (that is it is either increasing or decreasing) a lot more can be said about the domain set by looking at the range set and vice versa (you may put some of your observations in the comment section about monotone continuous functions).