Metric and Hilbert Spaces

Arun Ram
Department of Mathematics and Statistics
University of Melbourne
Parkville, VIC 3010 Australia
aram@unimelb.edu.au

Last updated: 4 November 2014

Assignment 1 Solutions

  1. Let A and B be bounded subsets of a metric space (X,d) such that A∩B≠∅. Show that diam(A∪B)≤diam (A)+diam(B). What can you say if A and B are disjoint?

    Solution.
    The definition of diam(A) is diam(A)=sup {d(x,y) | x,y∈A}. Assume A⊆X and B⊆X and A∩B=∅ and diam(A)<∞ and diam(B)<∞. To show: diam(A∪B)≤diam(A)+diam(B).
    To show: diam(A)+diam(B) is an upper bound of {d(x,y) | x,y∈A∪B}.
    To show: If x,y∈A∪B then d(x,y)≤diam(A)+diam(B).
    Assume x,y∈A∪B.
    Case 1: x,y∈A. Then d(x,y)≤ diam(A)≤ diam(A)+ diam(B). Case 2: x,y∈B. Then d(x,y)≤ diam(B)≤ diam(A)+ diam(B). Case 3: x∈A and y∈B. Let z∈A∩B. Then d(x,y)≤ d(x,z)+ d(z,y)≤ diam(A)+ diam(B). Case 4: x∈B and y∈A. Let z∈A∩B. Then d(x,y)≤ d(x,z)+ d(z,y)≤ diam(A)+ diam(B). So diam(A)+diam(B) is an upper bound of {(x,y) | x,y∈A∪B}.
    So diam(A∪B)≤diam(A)+diam(B).

    □

  2. Let X=C[0,1]={f:[0,1]→ℝ | f is continuous}. The supremum metric d∞:X×X→ℝ≥0 and the L1 metric d1:X×X→ℝ≥0 are defined by d∞(f,g) = sup { |f(x)-g(x)|  | x∈[0,1] } and d1(f,g) = ∫01∣f(x)-g(x)∣ dx. Consider the sequence {f1,f2,f3,…} in X where fn(x)=nxn(1-x) for 0≤x≤1.
    1. Determine whether {fn} converges in (X,d1).
    2. Determine whether {fn} converges in (X,d∞).
    (You may use any standard results about limits of real sequences.)

    Solution.
    The graph of y=x-x2 1 1 and y=xn-1 1 1 help to determine the graph of y=nxn(1-x)=nxn-1(x-x2). 1 1 4 Since limn→∞nxn-1=0 for x∈[0,1) and nxn-1=n for x=1 and x-x2=0 for x=1, then limn→∞nxn-1(x-x2)=0 for x∈[0,1].
    So the pointwise limit of {fn} is the zero function f:[0,1]→ℝ given by f(x)=0.
    {fn} converges in (X,d1) if limn→∞d1(fn,f)=0.
    {fn} converges in (X,d∞) if limn→∞d∞(fn,f)=0.
    Compute: d1(fn,f). d1(fn,f) = ∫01 ∣fn(x)-f(x)∣dx = ∫01 (nxn(1-x)-0)dx = ∫01 (nxn-nxn+1)dx = ( nxn+1n+1- nxn+2n+2 ) |x=0x=1 = ( nn+1- nn+2 ) = n(n+1)(n+2). So limn→∞ d1(fn,f) = limn→∞ n(n+1)(n+2) = limn→∞ 1(1+1n) 1(n+2) = 1·0 = 0. So {fn} converges in (X,d1).
    Compute d∞(fn,f):
    To compute d∞(fn,f)=sup{∣nxn(1-x)-0∣ | x∈[0,1]} find the maximum of fn(x)=nxn(1-x) on the interval [0,1].
    This maximum occurs at x=0 or x=1 or at a critical point.
    Since dfndx= dnxn(1-x)dx= n2xn-1-n (n+1)xn=n xn-1 (n-nx-x) the critical points are at x=0 and x=nn+1.
    Since fn(0)=0 and fn(1)=0 and fn(nn+1)=n(nn+1)n(1-nn+1) the maximum of fn is (nn+1)n+1= (1-1n+1)n+1. So d∞(fn,f) = sup{∣fn(x)-f(x)∣ | x∈[0,1]} = sup{nxn(1-x) | x∈[0,1]} = (1-1n+1)n+1 and limn→∞ (1-1n+1)n+1 = limn→∞ elog(1-1n+1)n+1 = limn→∞ e(n+1)log(1-1n+1) = limn→∞ e-(n+1)(1n+1+12(1n+1)2+13(1n+1)3+⋯) since -log(1-x)=∫11-xdx=∫(1+x+x2+⋯)dx=x+12x2+13x3+⋯.
    So limn→∞ d∞(fn,f)= limn→∞ (1-1n+1)n+1= e-(1+12·0+13·02+⋯)= e-1. So {fn} does not converge in (X,d∞).

    □

  3. Let X and Y be topological spaces. Let A⊆X and B⊆Y. Show that A‾×B‾= A×B‾.

    Solution.
    To show:
    (a) A‾×B‾⊆A×B‾.
    (b) A×B‾⊆A‾×B‾.
    (a) Assume (x,y)∈A‾×B‾.
    To show: (x,y)∈A×B‾.
    To show: (x,y) is a close point of A×B.
    Let N be a neighbourhood of (x,y) in X×Y.
    By the definition of the product topology on X×Y there exist NX, a neighbourhood of x in X, and Ny, a neighbourhood of y in Y, such that Nx×Ny⊆N.
    Since x∈A‾ there exists a∈A with a∈Nx.
    Since y∈B‾ there exists b∈B with b∈Ny.
    So (a,b)∈Nx×Ny⊆N and (a,b)∈A×B.
    So (x,y) is a close point of A×B.
    So (x,y)∈A×B‾.
    So A‾×B‾⊆A×B‾.
    (b) To show: A×B‾⊆A‾×B‾.
    Assume (x,y)∈A×B‾.
    To show: (x,y)∈A‾×B‾.
    To show: x∈A‾ and y∈B‾.
    Let Nx be a neighbourhood of x∈X and let Ny be a neighbourhood of y∈Y.
    Then Nx×Ny is a neighbourhood of (x,y)∈X×Y.
    Since (x,y) is a close point of A×B, there exists (a,b)∈A×B with (a,b)∈Nx×Ny.
    So a∈Nx and b∈Ny and a∈A and b∈B.
    So x is a close point of A and y is a close point of B.
    So x∈A‾ and y∈B‾.
    So (x,y)∈A‾×B‾.

    □

  4. Let (X,d) be a metric space and let A be a non-empty subset of X. Recall that for each x∈X, the distance from x to A is d(x,A)=inf {d(x,a) | a∈A}.
    1. Prove that A‾={x∈X | d(x,A)=0}.
    2. Prove that |d(x,A)-d(y,A)|≤d(x,y) for all x,y∈X. [Hint: first show that d(x,A)≤d(x,y)+d(y,A).]
    3. Deduce the function f:X→ℝ defined by f(x)=d(x,A) is continuous.
    4. Show that if x∉A‾ then U={y∈X | d(y,A)<d(x,A)} is an open set in X such that A‾⊂U and x∉U.

    Solution.
    (a)
    To show:
    (aa) {x∈X | d(x,A)=0}⊆A‾.
    (ab) A‾⊆{x∈X | d(x,A)=0}.
    (aa) Assume x∈X and d(x,A)=0.
    To show: x∈A‾.
    Let N be a neighbourhood of x in X.
    Then there exists ε∈ℝ>0 such that B(x,ε)⊆N.
    Since d(x,A)=inf{d(x,a) | a∈A}=0, there exists a∈A such that d(x,a)<ε.
    Then a∈B(x,ε)⊆N and a∈A.
    So x is a close point of A.
    So {x∈X | d(x,A)=0}⊆A‾.
    (ab) To show: A‾⊆{x∈X | d(x,A)=0}.
    Let x∈A‾.
    So x is a close point of A.
    To show: d(x,A)=0.
    Let ε∈ℝ>0.
    Then B(x,ε) is a neighbourhood of x in X.
    Since x is a close point of A there exists a∈A such that a∈B(x,ε).
    So d(x,a)<ε.
    So d(x,A)<ε for all ε∈ℝ>0.
    So d(x,A)=0.
    So x∈{x∈X | d(x,A)=0}.
    So A‾⊆{x∈X | d(x,A)=0}.
    Thus A‾={x∈X | d(x,A)=0}.
    (b)
    Assume x,y∈X.
    To show:
    (ba) d(x,A)-d(y,A)≤d(x,y).
    (bb) -(d(x,A)-d(y,A))≤d(x,y).
    (ba) Since d(x,A) is a lower bound of {d(x,a) | a∈A}, if a∈A then d(x,A)≤d(x,a).
    Using d(x,a)≤d(x,y)+d(y,a), if a∈A then d(x,A)≤d(x,y)+d(y,a).
    So d(x,A) is a lower bound of {d(x,y)+d(y,a) | a∈A}.
    Since d(x,y)+d(y,A) is the greatest lower bound of {d(x,y)+d(y,a) | a∈A} then d(x,A)≤ d(x,y)+ d(y,A). So d(x,A)-d(y,A)≤d(x,y).
    So d(y,A)-d(x,A)≤d(y,x)=d(x,y).
    So -(d(x,A)-d(y,A))≤d(x,y).
    So d(x,A)-d(y,A)≤d(x,y) and -(d(x,A)-d(y,A))≤d(x,y).
    So ∣d(x,A)-d(y,A)∣≤d(x,y).
    (c) To show: If ε∈ℝ>0 and x∈X then there exists δ∈ℝ>0 such that if y∈X and d(x,y)<δ then d(f(x),f(y))<ε. Assume ε∈ℝ>0 and x∈X.
    To show: There exists δ∈ℝ>0 such that if y∈X and d(x,y)<δ then d(f(x),f(y))<ε. Let δ=ε.
    To show: If y∈X and d(x,y)<δ then d(f(x),f(y))<ε.
    Assume y∈X and d(x,y)<δ.
    To show: d(f(x),f(y))<ε.
    By part (b), d(f(x),f(y))= ∣d(y,A)-d(x,A)∣≤ d(x,y)<δ=ε. So f is continuous.
    (d)
    Assume x∉A‾ and let U={y∈X | d(y,A)<d(x,A)}.
    To show:
    (da) x∉U.
    (db) U is open.
    (dc) A‾⊆U.
    (da) Let D=d(x,A).
    Since x∉A‾ and, by part (a), A‾={y∈X | d(y,A)=0} then d(x,A)≠0.
    So D≠0.
    We know U={y∈X | d(y,A)<D}.
    Since d(x,A)=D, x∉U.
    (db) Since U=f-1(ℝ<D)=f-1((-∞,D)) and f is continuous, then U is open.
    (dc) By part (a), A‾= { y∈X |  d(y,A)=0 } ⊆{y∈X | d(y,A)<D} =U. So A‾⊆U.

    □

  5. Determine whether the following sequences of functions converge uniformly.
    1. fn=e-nx2,x∈[0,1];
    2. gn=e-x2/n,x∈[0,1].
    3. gn=e-x2/n,x∈ℝ.

    Solution.
    Let (X,ρ) be a metric space and let fn:X→ℝ, n∈ℤ>0, be a sequence of functions from X to ℝ.
    Assume that f:X→ℝ defined by f(x)=limn→∞ fn(x) is well defined.
    The sequence f1,f2,f3,… converges uniformly to f if limn→∞ ( sup {ρ(fn(x),f(x)) | x∈X} ) =0.
    (a) Define fn:[0,1]→ℝ by fn(x)= e-nx2= e-(nx)2, for n∈ℤ>0.
    Then limn→∞ e-n·02= e-0=1 and limn→∞ e-n·12= e-∞=0 and if x∈(0,1) then limn→∞ e-nx2= e-∞=0. 1 Let f:[0,1]→ℝ be given by f(x)= { 1, if x=0, 0, if x∈(0,1]. Let n∈ℤ>0. Then sup{ρ(fn(x),f(x)) | x∈X} = sup ( { ∣e-nx2-0∣  | x∈(0,1] } ∪{∣1-1∣} ) = sup{e-nx2 | x∈(0,1]} = 1. So limn→∞ ( sup {∣e-nx2∣ | x∈[0,1]} ) =limn→∞1=1. So f1,f2,f3,… is not uniformly convergent.
    (b) Define gn:[0,1]→ℝ by gn(x)= e-x2/n= e-(x/n)2, for n∈ℤ>0.
    Then limn→∞ e-02/n= e-0=1and limn→∞ e-12/n= e-1/∞= e-0=1 and if x∈(0,1) then limn→∞ e-x2/n= e-0=1. 1 Let g:[0,1]→ℝ by given by g(x)=1.
    Let n∈ℤ>0.
    Then sup{ρ(gn(x),g(x)) | x∈X} = sup{∣e-x2/n-1∣ | x∈[0,1]} = ∣e-12/n-1∣ = 1-e-1/n. So limn→∞ (sup{∣e-x2/n-1∣ | x∈[0,1]}) = limn→∞1-e-1n = 1-e-1/∞ = 1-e0 = 1-1 = 0. So g1,g2,g3,… uniformly converges to g.
    (c) Define gn:ℝ→ℝ by gn(x)=e-x2/n= e-(x/n)2, for n∈ℤ>0.
    Let x∈ℝ.
    Then limn→∞ e-x2/n= e-x2/∞= e-0=1. Let g:ℝ→ℝ be given by g(x)=1.
    Let n∈ℤ>0.
    Then sup{ρ(gn(x),g(x)) | x∈X} = sup{∣e-x2/n-1∣ | x∈ℝ} = ∣e-∞2/n-1∣ = ∣e-∞-1∣ = ∣0-1∣ = 1. So limn→∞sup {ρ(gn(x),g(x)) | x∈X} =limn→∞1=1. So g1,g2,… is not uniformly convergent.

    □

  6. Let X be the set of all real sequences with finitely many non-zero terms with the supremum metric: if x=(xi) and y=(yi) then d(x,y)=sup{|xi-yi| | i∈ℤ>0}.
    For each n∈ℕ, let xn=(1,1/2,1/3,…,1/n,0,0,…).
    1. Show that {xn} is a Cauchy sequence in X.
    2. Show that {xn} does not converge to a point in X. (So X is not complete.)

    Solution.
    Let X= { (x1,x2,…)  | xi∈ℝ  and all but a finite number of xi are zero } and define d:X×X→ℝ>0 by d(x,y)=sup {∣xi-yi∣ | i∈ℤ>0}. Let fn=(1,12,13,…,1n,0,0,…,0).
    (a) Show that {fn} is a Cauchy sequence in X.
    To show: If ε∈ℝ>0 then there exists N∈ℤ>0 such that if m,n∈ℤ>0 and m>N and n>N then d(fm,fn)<ε.
    Assume ε∈ℝ>0.
    To show: There exists N∈ℤ>0 such that if m,n∈ℤ>0 and m>N and n>N then d(fm,fn)<ε.
    Let N=1ε.
    Assume m,n∈ℤ>0, m>N and n>N and m<n.
    To show: d(fn,fm)<ε. d(fn,fm) = sup { 1-1, 12-12,…, 1m-1m, 1m+1, 1m+2,…, 1n,0-0,0-0,… } = 1m+1 < 1N+1 = 11ε+1 = εε+1 < ε1 = ε. So {fn} is a Cauchy sequence in X.
    (b) The limit of {f1,f2,…} is the sequence f=(1,12,13,14,…). If k∈ℤ>0 the kth entry of f is 1k which is not equal to 0.
    So all entries of f are nonzero.
    So f∉X.
    So {f1,f2,…} is a Cauchy sequence in X which does not converge to a point in X.
    So X is not complete.

    □

  7. Let X be a nonempty set and let (Y,d) be a complete metric space. Let f:X→Y be an injective function and define df(x,y)=d (f(x),f(y)) for x,y∈X.
    1. Explain briefly why df is a metric on X.
    2. Show that (X,df) is a complete metric space if f(X) is a closed subset of Y.

    Solution.
    (a)
    To show:
    (aa) If x,y∈X then df(x,y)=df(y,x).
    (ab) If x∈X then df(x,x)=0.
    (ac) If x,y∈X and df(x,y)=0 then x=y.
    (ad) If x,y,z∈X then df(x,y)≤df(x,z)+df(z,y).
    (aa) Assume x,y∈X.
    To show: df(x,y)=df(y,x). df(x,y)= d(f(x),f(y))= d(f(y),d(x))= df(y,x).
    (ab) Assume x∈X.
    To show: df(x,x)=0. df(x,x)= d(f(x),f(x))=0.
    (ac) Assume x,y∈X and df(x,y)=0.
    To show: x=y.
    Since 0=df(x,y)=d(f(x),f(y)) and d is a metric, then f(x)=f(y).
    Since f:X→Y is injective and f(x)=f(y) then x=y.
    (ad) Assume x,y,z∈X.
    To show: df(x,y)≤df(x,z)+df(z,y). df(x,y) = d(f(x),f(y)) ≤ d(f(x),f(z))+ d(f(z),f(y)) = df(x,z)+ df(z,y).
    (b) Assume f(x) is a closed subset of Y.
    Since f:X→Y is injective and f:X→f(X) is surjective, then f:X→f(X) is bijective.
    Since df(x,y)=d(f(x),f(y)) for x,y∈X then f:(X,df)⟶ (f(X),d) is an isometry.
    To show: (X,df) is complete.
    To show: (f(X),d) is complete.
    To show: If z1,z2,… is a Cauchy sequence in f(X) then z1,z2,… converges with limn→∞zn in f(X).
    Assume z1,z2,… is a Cauchy sequence in f(X).
    Then z1,z2,… is a Cauchy sequence in Y.
    Since Y is complete z=limn→∞zn exists with z∈Y.
    Since z is a close point of z1,z2,…, then z is a close point of f(X).
    So z∈f(X).
    So f(X) is complete.
    So (X,df) is complete.

    □

  8. Let f:ℝ≥0→ℝ≥0 be given by f(x)=22+x.
    1. Show that f defines a contraction mapping f:ℝ≥0→ℝ≥0.
    2. Fix x0≥0 and xn+1=f(xn) for all n≥0. Show that the sequence {xn} converges and find its limit with respect to the usual metric on ℝ.

    Solution.
    (a) A function f:X→X is a contraction mapping if there exists α∈(0,1) such that if x,y∈X then d(f(x),f(y))≤αd(x,y). Let f:ℝ≥0→ℝ≥0 be given by f(x)=22+x.
    Let α=12.
    To show: If x,y∈ℝ>0 then d(f(x),f(y))≤αd(x,y).
    Assume x,y∈ℝ>0.
    To show: ∣f(y)-f(x)∣≤α∣y-x∣. ∣f(y)-f(x)∣ = ∣22+x-22+y∣ = 2∣2+y-(2+x)(2+x)(2+y)∣ = 2(2+x)(2+y) ∣y-x∣ ≤ 24∣y-x∣ = 12∣y-x∣. So f is a contraction mapping.
    (b) The Banach fixed point theorem gives that the sequence xn+1=f(xn) for x0∈X converges to the (unique) fixed point of f.
    In our case the fixed point is p∈ℝ>0 such that p=f(p)=22+p. So p2+2p=2 and p=-2±4+4·22=-1±3.
    Since p∈ℝ>0 then p=-1+3.

    □

  9. Let X be a connected topological space. Let f:X→ℝ be continuous with f(X)⊆ℚ. Show that f is a constant function.

    Solution.
    To show: If f is not a constant function then X is not connected.
    Assume f is not a constant function.
    Let a,b∈f(X) with a<b.
    Let z∈ℝ, z∉ℚ with a<z<b.
    Let A=f-1((-∞,z)) and B=f-1((z,∞)).
    Then A≠∅sincea∈A, B≠∅sinceb∈B, A∩B=∅since (-∞,z)∩ (z,∞)=∅. Since z∈ℚ then z∉f(X) and since (-∞,z)∪(z,∞)=ℝ-{z} then A∪B=X.
    So X is not connected.

    □

  10. Show that X={(x,y)∈ℝ2 | xy=0} is not homeomorphic to ℝ.

    Solution.
    Let X = {(x,y)∈ℝ2 | xy=0} = {(x,y)∈ℝ2 | x=0}∪ {(x,y)∈ℝ2 | y=0}. y = 0 x = 0 Assume that f:X→ℝ is a homeomorphism.
    Let a=f((0,0)).
    Then f:X-{(0,0)}→ℝ-{a} is a homeomorphism.
    So X-{(0,0)} and ℝ-{a} have the same number of connected components.
    Since X-{(0,0)} has 4 connected components and ℝ-{a} has 2 connected components, this is a contradiction.
    So X is not homeomorphic to ℝ.

    □

Notes and References

These are a typed copy of Assignment 1 Solutions from a series of handwritten lecture notes for the class Metric and Hilbert Spaces.

page history