# Show that the set given is closed

A question that I encountered which looks different than a normal open/closed sets proofs:

Let $(E, d)$ be a metric space, let $f : E\to R$ be continuous and $a$ element of $R$. Show that the set $$A = \{x \in\ E : f(x) = a \}$$ is closed.

There is no inequality, instead there is equality, so do we still prove it the same way?

Thank you.

PS. I am a beginner and want to learn these for an exam soon.

-
$A = \{x \in\ E : f(x) = a \} = \{x \in\ E : f(x) \ge a \} \cap \{x \in\ E : f(x) \le a \}$ which you know are closed and you know an intersection of closed sets is closed. – xavierm02 Dec 15 '12 at 16:54

HINT: Since $f$ is continuous, the sets $f^{-1}[(a,\to)]$ and $f^{-1}[(\leftarrow,a)]$ are both open in $E$. (Note: If you’ve not seen the notation before, $(a,\to)$ is also written $(a,\infty)$, and $(\leftarrow,a)$ is another notation for $(-\infty,a)$.)

-

$\{a\}$ is closed in $\mathbb R$ and $f$ is continuous, so $f^{-1}(a)$ is closed in $E$.

-

Show that it contains all its accumulation points, instead of trying to show that its complement is open.

-

Suppose you have sequence $x_n \to x$, where $\{x_n\} \subset A$, then what can you say about the sequence $\{f(x_n)\}$? What can you conclude about $x$ from this?

-