Skip to main content
Home
Pimath

Menu EN

  • Home
  • 🌐 EN
    • 🇮🇹 IT
    • 🇪🇸 ES
    • 🇵🇹 PT
    • 🇫🇷 FR
    • 🇷🇴 RO
  • 👨‍🎓 About Me
  • 🚧 Theory & Exercises
User account menu
  • Log in

Breadcrumb

  1. Home

Weierstrass Theorem: Statement and Proof

Profile picture for user Pimath
By Pimath, 8 June, 2025

The Weierstrass Theorem is one of the fundamental results of mathematical analysis. It states that a continuous function defined on a closed and bounded interval necessarily attains a maximum value and a minimum value.

In other words, a continuous function on an interval of the form \([a,b]\) is not merely bounded, but actually attains both its absolute maximum and its absolute minimum at points of the interval.


Contents

  • Statement of the Weierstrass Theorem
  • Existence of the maximum
  • Existence of the minimum
  • Why the hypotheses are necessary

Statement of the Weierstrass Theorem

Let

\[ f:[a,b]\to\mathbb R \]

be a continuous function on the closed and bounded interval \([a,b]\subseteq\mathbb R\), with \(a\leq b\). Then \(f\) is bounded and attains an absolute maximum and an absolute minimum on \([a,b]\).

This means that there exist two points \(x_M,x_m\in[a,b]\) such that

\[ f(x_m)\leq f(x)\leq f(x_M) \]

for every \(x\in[a,b]\).

The number \(f(x_M)\) is the absolute maximum of \(f\) on \([a,b]\), while the number \(f(x_m)\) is the absolute minimum of \(f\) on \([a,b]\).

Existence of the maximum

We first prove that \(f\) attains an absolute maximum on \([a,b]\).

Suppose, for contradiction, that \(f\) is not bounded above on \([a,b]\). Then, for every integer \(n\geq 1\), there exists a point \(x_n\in[a,b]\) such that

\[ f(x_n)>n. \]

The sequence \((x_n)\) is contained in the closed and bounded interval \([a,b]\), and is therefore bounded. By the Bolzano–Weierstrass theorem, it admits a convergent subsequence:

\[ x_{n_k}\to x_0. \]

Since \(a\leq x_{n_k}\leq b\) for every \(k\), passing to the limit gives

\[ x_0\in[a,b]. \]

As \(f\) is continuous at \(x_0\), we have

\[ f(x_{n_k})\to f(x_0). \]

In particular, the sequence \((f(x_{n_k}))\) must be bounded, since every convergent sequence is bounded.

On the other hand, by construction we have

\[ f(x_{n_k})>n_k. \]

Since \(n_k\to+\infty\), it follows that \(f(x_{n_k})\to+\infty\), which contradicts the fact that \((f(x_{n_k}))\) is convergent, and hence bounded.

Therefore \(f\) is bounded above on \([a,b]\).

Since \([a,b]\) is non-empty and \(f\) is bounded above on \([a,b]\), the set \(f([a,b])\) is non-empty and bounded above. We may therefore define

\[ M=\sup f([a,b]). \]

We now show that this supremum is in fact attained by the function.

By the defining property of the supremum, for every integer \(n\geq 1\) there exists \(x_n\in[a,b]\) such that

\[ M-\frac{1}{n}\lt f(x_n)\leq M. \]

It follows that

\[ f(x_n)\to M. \]

The sequence \((x_n)\) is contained in \([a,b]\), and is therefore bounded. By the Bolzano–Weierstrass theorem, there exists a subsequence

\[ x_{n_k}\to x_M \]

with \(x_M\in[a,b]\).

By continuity of \(f\), we have

\[ f(x_{n_k})\to f(x_M). \]

But, since \(f(x_n)\to M\), the subsequence \((f(x_{n_k}))\) also converges to \(M\). By uniqueness of the limit,

\[ f(x_M)=M. \]

Hence \(f\) attains an absolute maximum on \([a,b]\).

Existence of the minimum

We now prove that \(f\) attains an absolute minimum on \([a,b]\).

The argument is analogous to the one carried out for the maximum.

First of all, \(f\) is bounded below. Indeed, if this were not the case, then for every integer \(n\geq 1\) there would exist a point \(w_n\in[a,b]\) such that

\[ f(w_n)<-n. \]

The sequence \((w_n)\), being contained in \([a,b]\), is bounded. By the Bolzano–Weierstrass theorem, there exists a subsequence

\[ w_{n_k}\to w_0 \]

with \(w_0\in[a,b]\).

By continuity of \(f\), we would have

\[ f(w_{n_k})\to f(w_0). \]

But by construction \(f(w_{n_k})<-n_k\), and hence \(f(w_{n_k})\to-\infty\), which is impossible for a sequence converging to a real number.

Therefore \(f\) is bounded below on \([a,b]\).

Since \([a,b]\) is non-empty and \(f\) is bounded below on \([a,b]\), the set \(f([a,b])\) is non-empty and bounded below. We may therefore define

\[ m=\inf f([a,b]). \]

By the defining property of the infimum, for every integer \(n\geq 1\) there exists \(y_n\in[a,b]\) such that

\[ m\leq f(y_n)\lt m+\frac{1}{n}. \]

It follows that

\[ f(y_n)\to m. \]

Since \((y_n)\) is contained in \([a,b]\), the Bolzano–Weierstrass theorem guarantees the existence of a subsequence

\[ y_{n_k}\to x_m \]

with \(x_m\in[a,b]\).

By continuity of \(f\), we have

\[ f(y_{n_k})\to f(x_m). \]

But also \(f(y_{n_k})\to m\). By uniqueness of the limit,

\[ f(x_m)=m. \]

Hence \(f\) attains an absolute minimum on \([a,b]\).

We have thus shown that a continuous function on a closed and bounded interval is bounded and attains both its absolute maximum and its absolute minimum.

Why the hypotheses are necessary

The hypotheses of the Weierstrass Theorem are essential. If continuity fails, or if the interval is not closed or not bounded, the conclusion may be false.

If the interval is not closed. Consider the function

\[ f(x)=x \]

defined on the open interval \((0,1)\). The function is continuous and bounded, yet it attains neither a maximum nor a minimum. Indeed, the values of the function can come arbitrarily close to \(0\) and to \(1\), but the points \(0\) and \(1\) do not belong to the domain.

If the interval is not bounded. Consider the function

\[ f(x)=x \]

defined on \(\mathbb R\). The function is continuous, but it is bounded neither above nor below. Consequently, it admits neither an absolute maximum nor an absolute minimum.

If continuity fails. Consider the function \(f:[0,1]\to\mathbb R\) defined by

\[ f(x)= \begin{cases} x, & 0\leq x\lt 1,\\ 0, & x=1. \end{cases} \]

The domain \([0,1]\) is closed and bounded, but \(f\) is not continuous at \(x=1\). The function is bounded, yet it does not attain an absolute maximum: indeed

\[ \sup f([0,1])=1, \]

but there exists no \(x\in[0,1]\) such that \(f(x)=1\). Indeed, for \(0\leq x\lt 1\) we have \(f(x)=x\lt 1\), while \(f(1)=0\).

These examples show that the Weierstrass Theorem depends essentially on all of its hypotheses: continuity of the function, together with a closed and bounded domain.


Your feedback is important to us! Leave a comment and help us improve this content. Thank you!

Feedback

Support us by liking the page:
Or, share:

Tags

  • Mathematical Analysis 1

Support us by liking the page:
Or, share:

Copyright © 2026 | Pimath | All Rights Reserved