Characteristic Function in the subset E Let $E \subseteq \mathbb R$. Then the  characteristic function $\chi_{E}:\mathbb R \to \mathbb R$ is continuous if and only if 
a) $E$ is closed.
b) $E$ is Open.
c) $E$ is both Open and Closed.
d) $E$ is neither Open Nor closed.
choose the correct options.
According to me, a) $E$ is closed,
because the function maps to only $0$ and $1$, so the range set is closed and function is continuous, the inverse mapping of closed set is closed, hence E is closed.
This is my argument, please correct me if my logic is wrong. 
 A: Solution
$\chi_E$ is continuous iff the inverse image of any open subset $U \subset \mathbb{R}$ under $\chi_E$ is open.


*

*If $0 \notin U$ and $1 \notin U$ then $\chi_E^{-1}(U) = \emptyset$ which is open.

*If $0 \in U$ and $1 \notin U$ then $\chi_E^{-1}(U) = \mathbb{R} \setminus E$ has to be open. So $E$ has to be closed.

*If $0 \notin U$ and $1 \in U$ then $\chi_E^{-1}(U) = E$ which therefore has to be open.

*If $0 \in U$ and $1 \in U$ then $\chi_E^{-1}(U) = \mathbb{R}$ which is open.


Conclusion $E$ has to be both open and closed, which is only possible when $E$ is equal to $\emptyset$ or to $\mathbb{R}$.
Issue with what you did
You were not considering all the closed sets to look at inverse image.
A: Thanks for the answers, but I understood the concept clearly after my friend told me the explanation.
First, Characteristic function maps the element in domain to either $0$ or $1$, here if the element $x \in E$, then $\chi_{E}(x)=1$ and if the element $y$ is not in $E$, then $\chi_{E}(y)=0$. So $\{0,1\}$ is the range set.
Now $\{1\}$ is the closed set, since $\chi_{E}$ is continuous, "inverse mapping of closed set is closed" hence inverse image of $\{1\}$ which is the subset $E$, is closed.
Now $\{0\}$ is the closed set, since $\chi_{E}$ is continuous, "inverse mapping of closed set is closed" hence inverse image of $\{0\}$ which is the subset $E^c$, is closed.
According to the first argument, $E$ is closed so $E^c$ is open. According to the second argument, $E^c$ is closed so $E$ is open.
Hence $E$ should be both open and closed. 
A: A late answer; still:
$\chi_E$ is continuous $\implies\forall x\in\Bbb R,\chi_E=1\ or\ \forall x\in\Bbb R,\chi_E=0$
Case 1: $\forall x\in\Bbb R,\chi_E=1\implies E=\Bbb R$
Case 2: $\forall x\in\Bbb R,\chi_E=0\implies E=\phi$
Both of which are open and closed (in fact, the only open and closed sets in $\Bbb R$)
