28 I The Expanding Universe of Numbers
In any metric space there is a naturaltopology. A subsetGof a metric spaceE
isopenif for eachx∈Gthere is a positive real numberδ=δ(x)such thatGalso
contains the whole open ballβδ(x)={y∈E:d(x,y)<δ}.AsetF⊆Eisclosedif
its complementE\Fis open.
For any setA⊆E, itsclosureA ̄is the intersection of all closed sets containing it,
and itsinteriorintAis the union of all open sets contained in it.
A subsetFofEisconnectedif it is not contained in the union of two open subsets
ofEwhose intersections withFare disjoint and nonempty. A subsetFofEis (se-
quentially)compactif every sequence of elements ofFhas a subsequence converging
to an element ofF(andlocally compactif this holds for every bounded sequence of
elements ofF).
Amapf:X→Yfrom one metric spaceXto another metric spaceYiscontin-
uousif, for each open subsetGofY,thesetofallx∈Xsuch that f(x)∈Gis an
open subset ofX. The two properties stated at the end of§3 admit far-reaching gen-
eralizations for continuous maps between subsets of metric spaces, namely that under
a continuous map the image of a compact set is again compact, and the image of a
connected set is again connected.
There are many examples of metric spaces:
(i) LetE=Rnbe the set of alln-tuplesa=(α 1 ,...,αn)of real numbers and define
d(b,c)=|b−c|,
whereb−c=(β 1 −γ 1 ,...,βn−γn)ifb=(β 1 ,...,βn)andc=(γ 1 ,...,γn),and
|a|=max
1 ≤j≤n
|αj|.
Alternatively, one can replace thenorm|a|by either
|a| 1 =
∑n
j= 1
|αj|
or
|a| 2 =
(∑n
j= 1
|αj|^2
) 1 / 2
.
In the latter case, d(b,c)istheEuclidean distancebetweenbandc. The triangle in-
equality in this case follows from theCauchy–Schwarz inequality: for any real numbers
βj,γj(j= 1 ,...,n)
(∑n
j= 1
βjγj
) 2
≤
(∑n
j= 1
β^2 j
)(∑n
j= 1
γ^2 j
)
.
(ii) LetE =Fn 2 be the set of alln-tuplesa=(α 1 ,...,αn),whereαj =0or1
for eachj, and define theHamming distanced(b,c) betweenb=(β 1 ,...,βn)and
c=(γ 1 ,...,γn)to be the number ofjsuch thatβj=γj. This metric space plays a
basic role in the theory oferror-correcting codes.