# Characterize continuous functions $f : X → Y$ for which $f^{− 1} ( \{ a\} )$ is open [closed]

Let X and Y be topological spaces and f : X → Y be a continuous function. Prove that for every a ∈ Y the set $f^{−1}$({a}) is a closed set. Assume that X is connected. Characterize all continuous functions f : X → Y for which $f^{−1}$ ( { a } ) is open as well.

I used the answer of Can continuity be proven in terms of closed sets? to proof the first part (for sets instead of a single element of Y). But I cannot characterize all continuous functions.

## closed as unclear what you're asking by copper.hat, Ayman Hourieh, user91500, Tom-Tom, k170Nov 17 '15 at 12:05

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• What happens if a set is both open and closed? – Zircht Nov 16 '15 at 18:55
• For arbitrary topological spaces the claim "Prove that for every $a\in Y$ the set $f^{-1}(\{a\})$ is closed" is false. Let $X$ and $Y$ be the topological space with underlying set $\{1,2\}$ and with the indescrete topology and let $f$ be the identity map then $f^{-1}(\{1\})$ is neither open nor closed. – Nex Nov 16 '15 at 18:56
• @Nex: What claim are you referring to? – copper.hat Nov 16 '15 at 18:57
• This is true if $Y$ is a $T_1$ space. – Henno Brandsma Nov 16 '15 at 18:58
• @Nex He's probably asumming points are closed in $Y$. – Zircht Nov 16 '15 at 18:58

If $Y$ is $T_1$, then all sets $\{a\}$ for $a \in Y$ are closed subsets, so $f^{-1}[\{a\}]$ is closed as the inverse image of a closed set under a continuous function.
If there is some $a_0 \in Y$ such that $f^{-1}[\{a_0\}]$ is non-empty and open, and if $X$ is connected, then $f^{-1}[\{a_0\}]$ is closed, open and non-empty, and in a connected space this means that $f^{-1}[\{a_0\}] = X$ (otherwise the set and its complement disconnect $X$!). And this in turn is equivalent to $f$ being constant (with value $a_0$). Note that then all $f^{-1}[\{a\}]$ are open, as for $a \neq a_0$ the set is just the (open) empty set. (And if all inverse images of singletons are open, one of them at least is non-empty, and the previous applies).
These are the functions $f:\>X\to Y$ which are constant on the connected components of $X$.
Proof. If $f$ is constant on the connected components of $X$ then $f^{-1}\bigl(\{a\}\bigr))$ is either empty, or a union of open components of $X$, whence open for every $a\in Y$.
Conversely: Assume that $f^{-1}\bigl(\{a\}\bigr)$ is open for every $a\in Y$. Let $\Omega$ be a component of $X$, choose a point $x_0\in \Omega$, and put $a:=f(x_0)$. The sets $$\Omega_0:=f^{-1}(\{a\})\cap\Omega$$ and $$\Omega_1=\left(\bigcup_{y\in Y\setminus\{a\}} f^{-1}\bigl(\{y\}\bigr)\right)\cap\Omega$$ are open and disjoint subsets of $\Omega$ whose union is $\Omega$. As $x_0\in\Omega_0$ it follows that $\Omega_1=\emptyset$, which then implies that $f(x)\equiv a$ on $\Omega$.