Figure %: Graph of function
*f*
on the interval
[*a*, *e*]

If a function has an absolute maximum at
*x* = *b*
, then
*f* (*b*)
is the largest value
that
*f*
can attain. Similarly, if a function has an absolute minimum at
*x* = *b*
, then
*f* (*b*)
is the smallest value that
*f*
can attain.

On the graph above of the function
*f*
on the closed interval
[*a*, *e*]
, the point
(*a*, *f* (*a*))
represents the absolute minimum, and the point
(*d*, *f* (*d* ))
represents the absolute
maximum.

To define these terms more formally: a function
*f*
has an absolute maximum at
*x* = *b*
if
*f* (*b*)≥*f* (*x*)
for all
*x*
in the
domain of
*f*
. A function
*f*
has an absolute minimum at
*x* = *b*
if
*f* (*b*)≤*f* (*x*)
for all
*x*
in the domain of
*f*
. Together, the absolute minimum and the absolute maximum
are known as the absolute extrema of the function.

A function
*f*
has a local maximum at
*x* = *b*
if
*f* (*b*)
is the largest value that
*f*
attains "near
*b*
." Similarly, a function
*f*
has a local minimum at
*x* = *b*
if
*f* (*b*)
is the smallest value that
*f*
attains "near
*b*
." In the graph above,
*f*
has a local
maximum at
*x* = *b*
and at
*x* = *d*
, and has a local minimum at
*x* = *c*
.

Taken together, the local maxima and local minima are known as the local extrema. A local minimum or local maximum may also be called a relative minumum or relative maximum.

To define these terms more formally: a function
*f* (*x*)
has a local (or relative) maximum at
*x* = *b*
if there is an open interval
*I*
in which
*f* (*b*)≥*f* (*x*)
for all
*x*
in
*I*
. A function
*f* (*x*)
has a local (or relative)
minimum at
*x* = *b*
if there is an open interval
*I*
in which
*f* (*b*)≤*f* (*x*)
for all
*x*
in
*I*
.

Both the absolute and local (or relative) extrema have important theorems associated with them.

The extreme value theorem states the following: if
*f*
is a continuous function on the closed interval
[*a*, *b*]
, then
*f*
attains both an absolute maximum and an absolute minimum on
[*a*, *b*]
.

For example, it can be seen in the three continuous functions below that
*f*
attains both
an absolute max and an absolute min on
[*a*, *b*]
:

Figure %: Demonstrating the extreme value theorem on continuous functions

Upon reflection, this theorem should seem intuitively obvious, but it is actually very difficult to prove, so the proof will be omitted here.

Note that the extreme value theorem only applies to continuous functions on a closed
interval. If, for example, we had a continuous function on an open interval, the EVT
would not apply. Consider the example of the function
*f* (*x*) = *x*
on the open interval
(0, 1)
:

Figure %: The EVT does not apply to function defined on an open interval.

Note that
*f* (*x*)
does not attain a minimum value on this open interval, since as
*x*
approaches 0,
*f* (*x*)
gets smaller and smaller, but never actually reaches 0. Similarly,
there is no absolute max, because as
*x*
approaches 1,
*f* (*x*)
gets closer and closer to 1,
but never actually reaches it.

Note that on the graph presented at the start of this section,
*f*
had local extrema at
*x* = *b*
,
*x* = *c*
, and
*x* = *d*
.

Figure %: Graph of function
*f*
on the interval
[*a*, *e*]

It seems as though the tangent to the graph at each of these points is horizontal. It is in
fact always the case that: if
*f*
has a local extrema at
*b*
and
*f'*(*b*)
exists, then
*f'*(*b*) = 0
.

Sometimes, it is also possible for a continuous function to have a local extremum at a
point where the derivative does not exist. For example, the function
*f* (*x*) =|*x* - *b*|
has a local min at
*x* = *b*
.

Figure %:
*f* (*x*) =|*x* - *b*|

Note that the derivative,
*f'*(*b*)
, does not exist in this case.

We can combine these two observations into a single theorem called the Critical Point Theorem. A
critical point of a function
*f*
occurs where
*f'*(*x*) = 0
or
*f'*(*x*)
is undefined. Then the statement of the critical point theorem is that if
*f*
has a local extremum at
*x* = *b*
, then
(*b*, *f* (*b*))
is a critical point.

Note that the converse of this theorem is not true, i,e, it is not the case that all critical
points are local extrema. For example, in the graph below, the point
*x* = *b*
has a
horizontal tangent, so
*f'*(*b*) = 0
, but
*f*
does not have a local extremum at
*b*
:

Figure %: The converse of the critical point theorem is not necessarily true