The set of minimums of a continuous function is closed. Is this statement true or false? I was asked to prove that it is true in my homework but I think it is false. Just think of the $f(x)=x$ where between the values $x=\frac{1}{2^k}$ and $x=\frac{1}{2^{k+1}}$ I add a little bump. Then the minimums would acummulate towards $x=0$ and that set would not be closed. Am I wrong?
 A: The question as asked is straightforward to answer and is a consequence of continuity.
If $f$ is continuous and $m = \min_x f(x)$, then the set of minimums $f^{-1}(\{m\})$ is closed.
However, I suspect the question was about the set of local minimisers
in which case the answer is in the negative.
Here is an example of a continuous function where the global maximiser is an accumulation point of the local minimisers.
Let $u(x) = -|x|, l(x) = -{3 \over 2}|x|$.
Define $f(0) = 0$, and define $f$ on $[{1 \over n+1},{1 \over n}]$ as
follows:
Choose some point $x_n \in ({1 \over n+1},{1 \over n})$ such that
$l(x_n) < \min (u({1 \over n+1}), u({1 \over n}))$ and define
the graph of $f$ by joining the points
$({1 \over n+1}, u({1 \over n+1}))$,
$(x_n,l(x_n))$,
$({1 \over n}, u({1 \over n}))$.
Let $f$ be even to complete the definition.
It is clear that each $x_n$ is a local minimiser and $x_n \to 0$, the
global maximiser.
A: Suppose $f:(a,b) \to \mathbb{R}$, continuous.
We denote m := min f(x) with $x \in (a,b)$.
Without further restriction we can assume that $f(a)≠ m, f(b)≠m$

Suppose: $x_0 \in (a,b), \quad f(x_0)≠m, \quad \varepsilon := f(x_0) - m > 0$
f is continous => $\exists \delta > 0$ : $\forall x \in (a,b)$:
$$|x-x_0| < \delta \quad => \quad x \in (a,b) \quad |f(x)-f(x_0)| < \varepsilon$$
E.g. $B_\delta \subset (a,b)$ and $f(x) \ne m$ $\forall x \in B_\delta$ 
but $B_\delta \subset \mathbb{R}$ is open and $B:= \bigcap\limits_{f(x) \ne m} B_\delta(x) \subset \mathbb{R}$ is too.
Now remark that $B' := B \cap (a,b)$ is the set of all $x \in (a,b)$ such that $f(x) \ne m$. $B'$ is open in the subspace (a,b), and it's complement e.g {$x \in (a,b) | f(x) = m$} is closed.
QED 
Edit: If we can't find such a $a$ or $b$ there is a $c \in \mathbb{R}$ such that f(x) constant is for $x \le c$ or $x \ge c$. And if you can't either of them f is a constant function.
