You are on page 1of 6

MATH 368: CHAPTER 3: TYPES OF SETS,

CONTINUOUS FUNCTIONS, AND WEIERSTRASS THEOREM


We have discussed convergence of sequences, suprema, and inma. The Weierstrass Theorem, which we
are heading toward, says that a continuous real valued function on a closed and bounded set (a compact set)
obtains its maximum and minimum. We need to dene these terms. First we dened open and closed sets.
Then bounded and compact sets. Then a continuous function: it can be dened in terms of convergence
sequences, values getting close in terms of the norm, or open sets. Finally, we put these ingredients together
to state and prove the Weierstrass Theorem.
1.2.7: Open and closed sets
Notation: Let a R
n
and r > 0. The set
B(a, r) = { x R
n
: x a < r }
is called the open ball of radius r about a. The set
B(a, r) = { x R
n
: x a r }
is called a closed ball of radius r about a.
The intuitive idea of an open set is a set such that none of its points are one the boundary, so that each
point can be surrounded by an open ball of points entirely inside the set.
Denition. A set S R
n
is said to be open provided that for any point x
0
S there exists an r > 0 such
that B(x
0
, r) S.
Example 1. An open ball B(a, r) and the complement of a closed ball B(a, r)
c
are open.
Let x
0
B(a, r). Set r

= r x
0
a > 0. We claim that B(x
0
, r

) B(a, r): Take x B(x


0
, r

).
Then
x a x x
0
+x
0
a < r

+x
0
a = r.
Thus x B(a, r). This shows that B(a, r) is open.
Now take x
0
B(a, r)
c
. It follows that x
0
a > r. Let r

= x
0
a r > 0. If x B(x
0
, r

), then
x a a x
0
x
0
x > x
0
a r

= r,
and x B(a, r)
c
. Thus, B(x
0
, r

) B(a, r)
c
and B(a, r)
c
is open.
The denition of a closed set is given in terms of an open set and its meaning is not very transparent.
Denition. A set S R
n
is said to be closed provided that S
c
= R
n
\ S is open.
Example 2. It follows directly from the previous example that an closed ball B(a, r) and the complement of
a open ball B(a, r)
c
are closed.
Similar arguments prove that the intervals (a, b), (a, ), and (, b) are open and the intervals [a, b],
[a, ), and (, b] are closed.
Note that the two sets R
n
and are both open and closed.
The following theorem gives more insight into what it means for a set to be closed.
Theorem (1.20). A set S R
n
is closed iff all limit points of sequences in S are in S, i.e., if {x
k
} is a
sequence of points in S that converge to a point x

R
n
then x

S.
We need some results about unions and intersections of open and closed sets. Some hold for arbitrary
combinations and others for only nite combinations.
1
2 WEIERSTRASS THEOREM
Theorem. 1.23. Suppose {G

}
A
is an arbitrary family of open sets in R
n
. Then

A
G

is open.
1.25. Suppose {G
j
}
k
j =1
is a nite collection of open sets. Then
_
k
j =1
G
j
is open.
1.24. Suppose {H

}
A
is an arbitrary family of closed sets in R
n
. Then
_
A
H

is closed.
1.26. Suppose {H
j
}
k
j =1
is a nite collection of closed sets in R
n
. Then

k
j =1
H
j
is closed.
Proof. (1.23) Let a

A
G

. Then a G

0
for some
0
A. Since G

0
is open, there exists an r > 0
such that B(a, r) G

0


A
G

. This shows that the union is open.


(1.25) Let a
_
k
j =1
G
j
. For each 1 j k, there exists an r
j
> 0 such that B(a, r
j
) G
j
. Let
r = min
1j k
r
j
> 0. Then, for each 1 j k, B(a, r) B(a, r
j
) G
j
, and so B(a, r)
_
k
j =1
G
j
.
This proves that the nite intersection is open.
(1.24)
__
A
G

_
c
=

A
G
c

, so the result follows from (1.23).


(1.26)
_

k
j =1
H
j
_
c
=
_
k
j =1
H
c
j
, so the result follows from (1.25).
Example 3.

_
k=1
_
1
k
,
1
k
_
= {0} is not open,

_
k=1
_
1 +
1
k
, 1
1
k
_
= (1, 1) is open,

_
k=1
_
1
k
,
1
k
_
= {0} is closed,

_
k=1
_
1 +
1
k
, 1
1
k
_
= (1, 1) is not closed.

Denition. Let S R
n
. The interior of S, denoted by int(S), is the set of points p S such that there exists
an r > 0 such that B(p, r) S. The interior is also the largest open set contained in S,
int(S) =
_
{ U : U S, U is open }.
Notice that int(S) is the union of open sets, so it is open. Also, int(S) S, and if U S is open, then
U int(S). In particular, if S is open then int(S) = S.
The closure or S, denoted by cl(S) or S, is the smallest closed set containing S,
cl(S) =
_
{ C : C S, C is closed }.
Again, cl(S) is a closed set and is contained any closed set what contains S.
Finally, the boundary of S. denoted by (S), is the set cl(S) \ int(S) = cl(S) (int(S))
c
.
Example 4. The int([0, 1]) = (0, 1), cl((0, 1)) = [0, 1], and ([0, 1]) = ((0, 1)) = {0, 1}. In R
n
,
int B(a, r) = B(a, r) and cl B(a, r) = B(a, r), so B(a, r) = B(a, r) = { x R
n
: x a = r }.
Also, cl (Q (0, 1)) = [0, 1], int (Q (0, 1)) = , and (Q (0, 1)) = [0, 1].
Proposition. Let S R
n
.
a. cl(S) = [int(S
c
)]
c
= { x R
n
: B(x, r) S = for all r > 0 } = { y : y is a limit point of S }.
b. (S) = cl(S) cl(S
c
) = { x R
n
: B(x, r) S = and B(x, r) S
c
= for all r > 0 }.
Proof. (a) The int(S
c
) S
c
so S [int(S
c
)]
c
. Since the right side of the last inclusion is closed, cl(S)
[int(S
c
)]
c
. On the other hand, if cl(S) is a closed set containing S, so [cl(S)]
c
is an open set contained in S
c
,
and so [cl(S)]
c
int(S
c
). Taking complements, [int(S
c
)]
c
cl(S). Thus the two sets are equal.
WEIERSTRASS THEOREM 3
If x [int(S
c
)]
c
, then B(x, r) S = for every r > 0. This shows that [int(S
c
)]
c
{ x R
n
: B(x, r)
S = for all r > 0 }. Considering the other inclusion, if x { x R
n
: B(x, r) S = for all r > 0 },
then x / int(S
c
) and x [int(S
c
)]
c
. This shows that the second and third sets are equal.
By considering r
k
=
1
/k, we can see that if a point x is in the third set then there are points x
k
B(x,
1
/k)S
for all k > 0. The sequence {x
k
} converges to x and x is in the set of limit points. On the other hand, if there
is a sequence of points in S converging to x, then B(x, r) S must be nonempty for all r > 0. This shows
that last two sets are equal.
(b) (S) = cl(S) (int(S))
c
= cl(S) cl(S
c
) by part (a) to S
c
. By applying part (a) to both cl S and cl S
c
,
we get the nal characterization of the boundary.
1.2.8: Bounded and compact sets
In order to be certain that a function to attain a maximum, the domain cannot go off to innity. bounded
as well as closed. So in this section, we introduce the concepts of (i) a bounded set and (ii) a closed and
bounded set (a compact set).
Denition. A set S R
n
is bounded provided that there exists an r > 0 such that S B(0, r), i.e., x r
for all x S.
A sequence of points {x
k
} in a set S is a sequence where x
k
S for all k. In many of our proofs, from a
sequence of points in a set we need to nd a convergent subsequence. Therefore, we dene the following
property of a set.
Denition. A set S R
n
is called compact provided that, for any sequence of points {x
k
} in S, there exists
a subsequence {x
k
j
} that converges to a point x

in S.
The empty set is compact because the hypothesis is satised vacuously.
Theorem (1.21). Let S R
n
. Then, S is compact iff S is closed and bounded.
Proof. First we show that a compact set is bounded. Assume S is not bounded. Then for each k there must
exist a point x
k
S such that x
k
> k. These points go off to innity so there cannot be any convergent
subsequences. Therefore S cannot be compact. We have proved the contrapositive.
A compact set must be closed: Assume S is not closed. There must exist a sequence {x
k
} of points in S
that converge to a point x

S
c
. Since the limit is unique, any subsequence converges to x

and so cannot
converge to a point in S. This shows that S is not compact.
The fact that a closed and bounded subset of R
n
must be compact is more involved. We leave the proof to
a book on real analysis. One step in many proof involves considering the closed interval [0, 1]. Consider any
sequence of points x
k
in [0, 1]. Let I
0
= [0, 1]. Let I
1
be either the subinterval [0,
1
/2] or [
1
/2, 1] depending
on which has innitely many of the points in the sequence. Then I
j +1
I
j
can be chosen of length
1
/2
j +1
with innitely many of the points in the sequence. In this way, a subsequence x
k
j
can be constructed with
x
k
j
I
j
. For i > j , x
k
i
I
i
I
j
, so |x
k
i
x
k
j
|
1
/2
j
. This shows that the subsequence is Cauchy and
must converge to a point x

. Since I
0
is closed and the subsequence is in I
0
, x

must be in I
0
= [0, 1].
This proves that [0, 1] is compact.
A sequence of sets S
k
R
n
are called nested provided that S
k+1
S
k
for k N. An arbitrary intersection
of closed sets is closed, but the intersection can be empty. However, if the sets are compact and nested, then
the following results says that the intersection is nonempty.
Corollary (1.29). Suppose S
k
R
n
are each nonempty compact and S
k+1
S
k
for k N. Then
_

k=1
S
k
= .
Proof. Let x
k
S
k
be a choice of a point in each set. Because S
1
is compact, there exists a subsequence
x
k
j
that converges to x

S
1
. For a subsequence, k
j
j , so for j i , x
k
j
S
k
j
S
j
S
i
. Since S
i
is compact, the limit x

must be in S
i
. Since i is arbitrary, x

must be in the intersection


_

k=1
S
k
. This
shows that the intersection in nonempty.
4 WEIERSTRASS THEOREM
Example 5. The following examples illustrate why the nested sets need to be compact.

_
k=1
_
0,
1
/k
_
= {0}, the sets are compact and the intersection is nonempty;

_
k=1
_
-1
/k, 1 +
1
/k
_
= [0, 1], the sets are compact and the intersection is nonempty;

_
k=1
_
0,
1
/k
_
= , the sets are not closed and the intersection is empty;

_
k=1
[k, ) = the sets are not bounded and the intersection is empty.

1.4.1: Continuous functions


In a calculus course, we usually calculate derivatives but only mention continuity in passing near the
beginning of the course. In this more rigorous discussion of optimization, continuity plays a key role.
Therefore, we give a quick introduction to this concept at this time.
For a function of a single real variable, the intuitive denition of a continuous function is that its graph
can be drawn without lifting the pen.
There are various ways in which a function can be discontinuous at a point. Consider the following three
functions:
f (x) =
_
0 if x < 0
1 if x 0,
g(x) =
_
0 if x 0
sin
_
1
/x
_
if x > 0,
F(x, y) =
_
_
_
y
2
x
2
+ y
2
if (x, y) = (0, 0)
0 if (x, y) = (0, 0).
The function f has a jump so is discontinuous at x = 0. The function g oscillates as x approaches zero and
is discontinuous at x = 0. Notice that for the function g, there are some points x > 0 where the value is near
(equal to) g(0) = 0 but the values of all points near to 0 are not near g(0) = 0. The function F approaches
different values as (x, y) approaches the origin from different directions.
It took mathematicians a long time to arrive at the following precise denition of a continuous function.
Denition. A function f : S R
n
R
m
is continuous at a S provided that one of the following
equivalent conditions is valid.
(1) For all > 0 there exists a > 0 such that f (x) f (a) < whenever x a < and x S.
(2) For any sequence {x
k
} in S that converges to a, the sequence f (x
k
) converges to f (a).
(3) lim
xa
f (x) = f (a).
We say that f is continuous on a set S provided that it is continuous at all points in S.
This denition means that given a tolerance > 0 in the values, there is an > 0 of tolerance in the input
such that all points within of a have values within of f (a). For the function g above, there are some
points x
n
> 0 whose values are near g(0) = 0, but no matter how small is taken, there are other points
x

n
=
2
/(4n +) such that g(x

n
) = 1.
WEIERSTRASS THEOREM 5
A function is continuous with respect to the Euclidean norm iff it is continuous with respect to any
equivalent norm such as the max norm. It follows that f is continuous with respect to the Euclidean norm
at a iff each of its coordinate functions is continuous at a.
Example 6. Let f : (0, ) R be dened by f (x) =
1
/x. We claim that f is continuous at all points
a > 0. Fix > 0. If |x a| < , then
| f (x) f (a)| =

1
x

1
a

=
|a x|
|xa|
<

|xa|
.
If <
a
/2, then x = a (a x) >
a
/2,
1
/x <
2
/a, and
| f (x) f (a)| <
2
a
2
.
Thus, if is also less than
a
2
/2, then | f (x) f (a)| < . Therefore, if we take < min{
a
/2,
a
2
/2}, then we
get that | f (x) f (a)| < as desired.
It can be shown that a function is continuous at all points of its domain iff the inverse image of open sets
is open.
Theorem (1.50). Let f : S R
n
R
m
. Then the following are equivalent.
(i) f is continuous at all points of S.
(ii) For each open set V R
m
, there is an open set U R
n
such that f
1
(V) = U S, i.e., f
1
(V) is
open relative to S.
(iii) For each closed set C R
m
, there is an closed set B R
n
such that f
1
(C) = B S, i.e., f
1
(C)
is closed relative to S.
We can use continuity to prove that a set is compact, as the following example illustrates.
Example 7. Let p
i
> 0 for 1 i n be xed prices and w > 0 be the wealth. We claim that the simplex
S = { x R
n
: x
i
0 for 1 i n, p
1
x
1
+ + p
n
x
n
w }.
is compact. For each coordinate 0 x
j

w
/p
j
so x
m
max
i
{
w
/p
i
}, so the set is bounded.
Why is the set closed? Intuitively, it is closed because the inequalities are all given in terms of less
than or equal to and not strict inequalities. We could prove the result by showing the complement is open.
Instead, we give a proof using some of the earlier theorems about continuous functions. Let g
i
(x) = x
i
for
1 i n and g
n+1
(x) = p
1
x
1
+ + p
n
x
n
. Each of these functions is continuous. The intervals [0, )
and [0, w] are closed. Therefore, each of the sets g
1
i
([0, )) for 1 i n and g
1
n+1
([0, w]) is closed.
Therefore,
S = g
1
n+1
([0, w])
n
_
i =1
g
1
i
([0, ))
is closed. Because S is closed and bounded, it is compact as claimed.
3.1: Existence of a maximum
With the previous denitions of a compact set and a continuous function, we can now state the Weierstrass
Theorem on the existence of a maximum. As stated in the book, it does not give a constructive method for
nding a point that maximizes a function it merely gives sufcient conditions for a maximum to exist. Such
a result gives incentive to search for such a maximizing point. Other techniques, which will be considered
later in the course, are necessary to nd the maximum.
First, we give some examples that illustrate why the domain must be compact.
6 WEIERSTRASS THEOREM
Example 8. Let f (x) = x
3
. Then, f has no maximum nor minimum on D = R,
sup
xR
x
3
= and inf
xR
x
3
= -. The function is continuous, but the domain is not bounded.
For the same function f (x) = x
3
on (-1, 1), the set is bounded but not closed and f has no maximum
nor minimum on (-1, 1); however, sup
x(1,1)
x
3
= 1 and inf
x(1,1)
x
3
= -1 are nite.
Similarly, g(x) = tan(x) does not have a minimum or maximum value on the interval (
-
/2,

/2),
sup
x(
-
/2,

/2)
g(x) = and inf
x(
-
/2,

/2)
g(x) = -. This interval is not closed but it is bounded. Notice
that for this example, the supremum and inmum are not nite.
As a last example, let h(x) = arctan(x) on R. Then sup
xR
arctan(x) =

/2 and
inf x Rarctan(x) =
-
/2 are nite but these value are not attained. In this case, the domain is not bounded
but it is closed. The image is then not closed.
These examples indicate why it is necessary to assume that the domain of a function is compact in order
to be certain that the function attains a maximum value.
Theorem (3.1: Weierstrass Theorem). Assume that D R
n
is a nonempty compact set (closed and
bounded). Assume that f : D R is a continuous function. Then f attains a maximum and a minimum
on D, i.e., there exist points x
m
, x
M
D such that
f (x
m
) f (x) f (x
M
) for all x D,
f (x
m
) = inf
xD
f (x), and
f (x
M
) = sup
xD
f (x).
The book proves the Weierstrass Theorem by proving the following two lemmas.
Lemma (3.9). Assume that f : D R
n
R
m
is continuous and D is compact. Then f (D) is compact.
Lemma (3.10). Let A R be compact. Then sup A A and inf A A.
Instead of using these two lemmas, we prove directly the Weierstrass theorem by means of the two parts
of the following proposition.
Proposition. Assume that f : D R
n
R is continuous and D is compact and nonempty. Then the
following two conditions are true.
(a) The image f (D) is bounded.
(b) The function f attains its supremum and inmum on D.
Proof. (a) Assume the image is not bounded. Then, for each k N, there exists x
k
D such that | f (x
k
)|
k. Because the domain is compact, there exists a subsequence x
k
j
that converges to a point a D. Since f
is continuous, the sequence of real numbers y
j
= f (x
k
j
) converges to f (a). By convergence, there exists
J(1) such that |y
j
f (a)| < 1 for j J(1). Thus for j J(1),
k
j
| f (x
k
j
)|
| f (x
k
j
) f (a)| +| f (a)|
< 1 +| f (a)|.
This inequality cannot hold as j goes to innity. This contradiction proves the result.
(b) Because the image is bounded, M = sup f (D) and m = inf f (D) are nite numbers. By the
properties of a supremum, for each k N, there exists x
k
D such that
M
1
k
f (x
k
) M.
Because the domain is compact, there exists a subsequence x
k
j
that converges to a point a D. Because
the function is continuous,
f (a) = lim
j
f (x
k
j
) = M.
This proves that f attains its supremum on D.
The proof that f attains its inmum is similar.

You might also like