In calculus, the extreme value theorem states that if a real-valued function
f
{\displaystyle f}
is continuous on the closed interval
[
a
,
b
]
{\displaystyle [a,b]}
, then
f
{\displaystyle f}
must attain a maximum and a minimum, each at least once. That is, there exist numbers
c
{\displaystyle c}
and
d
{\displaystyle d}
in
[
a
,
b
]
{\displaystyle [a,b]}
such that:
The extreme value theorem is more specific than the related boundedness theorem, which states merely that a continuous function
f
{\displaystyle f}
on the closed interval
[
a
,
b
]
{\displaystyle [a,b]}
is bounded on that interval; that is, there exist real numbers
m
{\displaystyle m}
and
M
{\displaystyle M}
such that:
This does not say that
M
{\displaystyle M}
and
m
{\displaystyle m}
are necessarily the maximum and minimum values of
f
{\displaystyle f}
on the interval
[
a
,
b
]
,
{\displaystyle [a,b],}
which is what the extreme value theorem stipulates must also be the case.
The extreme value theorem is used to prove Rolle's theorem. In a formulation due to Karl Weierstrass, this theorem states that a continuous function from a non-empty compact space to a subset of the real numbers attains a maximum and a minimum.