# Proving continuity using the topological definition?

Let $f$ be a function from $\mathbb{R}$ to $\mathbb{R}$, and suppose that $f(x) = 0$, $\forall x \in \mathbb{R}$, except when $x=c$, for a fixed $c \in \mathbb{R}$. Now, $f$ is clearly discontinuous at $c$, and I can easily show this using the $\delta$-$\epsilon$ definition, but how do I show discontinuity using the definition of continuity that the preimage of every open set is open? I just don't see any nontrivial open sets in the image of the function, as $f(\mathbb{R}) = \{0,f(c)\}$.

Any ideas?

EDIT: Note that $f(c) \neq 0$.

You know that $f(c)\neq 0$. So take some open neighborhood $U$ such that $f(c)\in U$ but $0\notin U$. So $f^{-1}(U)=\{c\}$. However, singletons are not open in the usual topology.
To see this, note that $c\in\{c\}$. But $\{c\}$ does not contain any open interval about $c$, hence it cannot possibly be open, since any open set contains an open neighborhood of any of its points.
• You can think of it as a subset of the image endowed with the subset topology derived from $\mathbb{R}$. – Alfonso Fernandez Jan 26 '13 at 21:02
As I understand it, we're taking $$f(x)=\begin{cases}0 &: x\in\Bbb R\setminus\{c\}\\ d &:\ x=c\end{cases}.$$Assuming $d\neq0$, then there is an open interval around $d$, say $U$, so that $U\cap\{0\}=\varnothing$. This implies that $\{d\}$ is open in the image of $f$, but $f^{-1}(d)=\{c\}$ is not open in $\Bbb R$, the domain.