Continuous function on compact set attains its maximum and minimum.

1.7k Views Asked by At

If $A$ is compact, prove that every continuous function $f\colon A\to \mathbb{R}$ takes on a maximum and a minimum value.

My attempt: Since $A$ is compact and $f$ continuous $f(A)$ is also compact and hence closed and bounded. Moreover, the boundedness of $f(A)$ implies the existence of a supremum $s$ and infimum $l$. It remains to show that $s, l \in f(A)$. Suppose, for the sake of contradiction, that $s \in \mathbb{R}-f(A)$ so there is some $\epsilon>0$ s.t. $B_{\epsilon}\left(s\right) \subseteq \mathbb{R}-f(A).$ However, this would mean that $(s-\epsilon / 2)\in \mathbb{R}-f(A)$ and $f(a)\le s-\epsilon / 2 < s$ for all $f(a)\in f(A)$. This contradicts the fact that $s$ is the supremum of $f(A)$. The argument for the infimum is analogous.

Is this proof correct?

1

There are 1 best solutions below

0
On

I just rephrase your last comment in a more suitable way for the sake of clarity.

The set $f(A)$ is the continuous image of a compact so it is a compact subset of $\mathbb{R}$. It is thus bounded and admites both supremum and infimum. Let us show the supremum is reached in $A$. Denote the supremum $s$, by definition of the real supremum there exists a sequence $(y_n)$ of points of $f(A)$ converging to $s$. But then $f(A)$ being closed we have $s \in f(A)$.