Note on the Extreme Value Theorem
The Extreme Value Theorem states that a continuous function from a compact set to the real numbers takes on minimal and maximal values on the compact set. (A compact subset of n-dimensional Euclidean space may be taken as any set that is closed (contains the limits of all convergent sequences made of points from the set) and bounded (contained within some finite n-dimensional "box").
We first prove the Bounded Value Theorem - the range of a continuous function on a compact set is bounded. Suppose not. Now proceed by successive bisection: bisect the original compact set (here is where we use the boundedness); on at least one piece, the function is unbounded. Bisect that piece again. (If the function is unbounded on both pieces, pick either one). Proceeding in this way, we obtain a nested sequence of boxes, of arbitrarily small maximum dimension, converging to a single point, say, c, in the original set (here is where we use the closedness). Since the function is continuous at c, there is a box, say B, containing c, such that for points within the box, all the function values differ by, say, no more than 1 from the value of the function at c - in other words, the function is bounded on the box B. But we claim to have produced a sequence of boxes around c of arbitrarily small size (some of which must necessarily fit entirely inside the box B) on which the function is unbounded. This contradiction proves the Bounded Value Theorem
To prove the Extreme Value Theorem, suppose a continuous function f does not achieve a maximum value on a compact set. Since the function is bounded, there is a least
upper bound, say M, for the range of the function. Consider the function