Extreme value

An **extreme value**, or **extremum** (plural *extrema*), is the smallest (minimum) or largest (maximum) value of a function, either in an arbitrarily small neighborhood of a point in the function's domain — in which case it is called a *relative* or *local* extremum — or on a given set contained in the domain (perhaps all of it) — in which case it is called an *absolute* or *global* extremum (the latter term is common when the set is all of the domain).

As a special case, an extremum that would otherwise be considered a relative/local extremum but occurs at an endpoint (or more generally a boundary) of the function's domain is sometimes called an *endpoint* or *boundary* extremum and is not considered a relative/local extremum, although it may be an absolute/global one.

Note that in the case of relative/local extrema, it is common to concentrate on *where* the extrema occur (i.e., the "

x

{\displaystyle x}

-values") rather than what the extreme values actually are (the "

y

{\displaystyle y}

-values"), whereas in the case of absolute/global extrema it is common to concentrate on the extreme value itself (the "

y

{\displaystyle y}

-value"). However, in either case both values may be given — e.g.,

f
(
2
# )
5

{\displaystyle f(2)=5}

 if the extreme value 5 occurs at

# x
2

{\displaystyle x = 2 }

 .

Extrema can be found by taking the derivative of a function and setting it to equal zero. If the second derivative at this point is positive, it is a minimum, and vice versa..

## Definitions

### For a real-valued function of a single real variable

Given

f
:

R

→

R

{\displaystyle f:\mathbb{R} \to \mathbb{R}}

 ,

* f

{\displaystyle f}

 achieves a *relative maximum* (or *local maximum*) at

x
0

{\displaystyle x\_0}

 if there is some open interval

I

{\displaystyle I}

 containing

x
0

{\displaystyle x\_0}

 for which

f
(
x
)
≤
f
(

x
0

)

{\displaystyle f(x)\le f(x\_0)}

 for all

x
∈
I

{\displaystyle x \in I}
* f

{\displaystyle f}

 achieves a *relative minimum* (or *local minimum*) at

x
0

{\displaystyle x\_0}

 if there is some open interval

I

{\displaystyle I}

 containing

x
0

{\displaystyle x\_0}

 for which

f
(
x
)
≥
f
(

x
0

)

{\displaystyle f(x)\ge f(x\_0)}

 for all

x
∈
I

{\displaystyle x \in I}
* f

{\displaystyle f}

 achieves its *absolute maximum* (or *global maximum*) value

f
(

x
0

)

{\displaystyle f(x\_0)}

 on a set

D

{\displaystyle D}

 if

x
→

0

∈
D

{\displaystyle \vec x\_0\in D}

 and

f
(
x
)
≤
f
(

x
0

)

{\displaystyle f(x)\le f(x\_0)}

 for all

x
∈
D

{\displaystyle x \in D}
* f

{\displaystyle f}

 achieves its *absolute minimum* (or *global minimum*) value

f
(

x
0

)

{\displaystyle f(x\_0)}

 on a set

D

{\displaystyle D}

 if

x
→

0

∈
D

{\displaystyle \vec x\_0\in D}

 and

f
(
x
)
≥
f
(

x
0

)

{\displaystyle f(x)\ge f(x\_0)}

 for all

x
∈
D

{\displaystyle x \in D}

Note also that a relative/local extremum cannot happen at an endpoint of the function's domain.

### For a real-valued function of more than one real variable

Given

f
:

R

n

→

R

{\displaystyle f: \R^n \to \R}

 , for some integer

n
>
1

{\displaystyle n>1}

 ,

* f

{\displaystyle f}

 achieves a *relative maximum* (or *local maximum*) at

x
→

0

{\displaystyle \vec x\_0}

 if there is some open ball

B

{\displaystyle B}

 containing

x
→

0

{\displaystyle \vec x\_0}

 for which

f
(

x
→

)
≤
f
(

x
→

0

)

{\displaystyle f(\vec x)\le f(\vec x\_0)}

 for all

x
→

∈
B

{\displaystyle \vec x\in B}
* f

{\displaystyle f}

 achieves a *relative minimum* (or *local minimum*) at

x
→

0

{\displaystyle \vec x\_0}

 if there is some open ball

B

{\displaystyle B}

 containing

x
→

0

{\displaystyle \vec x\_0}

 for which

f
(

x
→

)
≥
f
(

x
→

0

)

{\displaystyle f(\vec x)\ge f(\vec x\_0)}

 for all

x
→

∈
B

{\displaystyle \vec x\in B}
* f

{\displaystyle f}

 achieves its *absolute maximum* (or *global maximum*) value

f
(

x
→

0

)

{\displaystyle f(\vec x\_0)}

 on a set

D

{\displaystyle D}

 if

x
→

0

∈
D

{\displaystyle \vec x\_0\in D}

 and

f
(

x
→

)
≤
f
(

x
→

0

)

{\displaystyle f(\vec x)\le f(\vec x\_0)}

 for all

x
→

∈
D

{\displaystyle \vec x\in D}
* f

{\displaystyle f}

 achieves its *absolute minimum* (or *global minimum*) value

f
(

x
→

0

)

{\displaystyle f(\vec x\_0)}

 on a set

D

{\displaystyle D}

 if

x
→

0

∈
D

{\displaystyle \vec x\_0\in D}

 and

f
(

x
→

)
≥
f
(

x
→

0

)

{\displaystyle f(\vec x)\ge f(\vec x\_0)}

 for all

x
→

∈
D

{\displaystyle \vec x\in D}

Here

x
→

{\displaystyle \vec{x}}

 is a vector representing the n-tuple

(

x
1

,
…
,

x
n

)
∈
dom
f

{\displaystyle (x\_1,\ldots,x\_n)\in\text{dom}f}

 .

Note that a relative/local extremum cannot happen on the boundary of the function's domain.

## Finding extrema

### Single-variable functions

The simplest way to find extrema of single variable functions is to take the derivative and find the stationary points, or the points at which the derivative is equal to 0 (at extrema, with the exception of endpoints on a closed interval, the slope of the tangent line is 0). The second derivative test will determine the concavity of the function at the point; if the second derivative is negative, the function will be concave down, and it will have a maximum. On a closed interval, the value of the endpoints must also be found.

### Multivariable functions

For a multivariable function, the points to be tested are those on which all the partial derivatives are equal to 0. To determine whether a point is maximum, minimum, or saddle point, one must take every possible second derivative and construct a matrix, known as a Hessian matrix. For example, with a function of two variables, the Hessian matrix is

[

f

x
x

f

x
y

f

x
y

f

y
y

]

{\displaystyle \begin{bmatrix}f\_{xx}&f\_{xy}\\f\_{xy}&f\_{yy}\end{bmatrix}}

For three variables, this becomes

[

f

x
x

f

x
y

f

x
z

f

y
x

f

y
y

f

y
z

f

z
x

f

z
y

f

z
z

]

{\displaystyle \begin{bmatrix}f\_{xx}&f\_{xy}&f\_{xz}\\f\_{yx}&f\_{yy}&f\_{yz}\\f\_{zx}&f\_{zy}&f\_{zz}\end{bmatrix}}

If the determinant of the Hessian positive, it will be a maximum if

f

x
x

{\displaystyle f\_{xx}}

 ,

f

y
y

{\displaystyle f\_{yy}}

 , or

f

z
z

{\displaystyle f\_{zz}}

 is negative and a minimum if these second derivatives are positive. If it is negative, there will be a saddle point. If it is zero, another test must be used.