Skip to main content

Section The Euclidean Metric on Rn

The metric space that is most familiar to us is the metric space (R2,dE), where
dE((x1,x2),(y1,y2))=(x1βˆ’y1)2+(x2βˆ’y2)2
The metric dE called the standard or Euclidean metric on R2.
We can generalize this Euclidean metric from R2 to any dimensional real space. Let n be a positive integer and let x=(x1,x2,…,xn) and y=(y1,y2,…,yn) be in Rn. We define dE:RnΓ—Rnβ†’R by
dE(x,y)=(x1βˆ’y1)2+(x2βˆ’y2)2+β‹―(xnβˆ’yn)2=βˆ‘i=1n(xiβˆ’yi)2.
In the next activity we will show that dE satisfies the first three properties of a metric.
Proving that the triangle inequality is satisfied is often the most difficult part of proving that a function is a metric. We will work through this proof with the help of the Cauchy-Schwarz Inequality.

Activity 3.4.

Before we prove the Cauchy-Schwarz Inequality, let us analyze it in two specific situations.

(a)

Let x=(1,4) and y=(3,2) in R2. Verify the Cauchy-Schwarz Inequality in this case.

(b)

Let x=(1,2,βˆ’3) and y=(βˆ’4,0,βˆ’1) in R3. Verify the Cauchy-Schwarz Inequality in this case.
Now we prove the Cauchy-Schwarz Inequality.

Proof.

Let n be a positive integer and x=(x1,x2,…,xn), y=(y1,y2,…,yn) be in Rn. To verify (3.1) it suffices to show that
(βˆ‘i=1nxiyi)2≀(βˆ‘i=1nxi2)(βˆ‘i=1nyi2).
This is difficult to do directly, but there is a nice trick one can use. Consider the expression
βˆ‘(xiβˆ’Ξ»yi)2.
(All of our sums are understood to be from 1 to n, so we will omit the limits on the sums for the remainder of the proof.) Now
0β‰€βˆ‘(xiβˆ’Ξ»yi)2=βˆ‘(xi2βˆ’2Ξ»xiyi+Ξ»2yi2)(3.2)=(βˆ‘yi2)Ξ»2βˆ’2(βˆ‘xiyi)Ξ»+(βˆ‘xi2).
To interpret this last expression more clearly, let a=βˆ‘yi2, b=βˆ’2βˆ‘xiyi and c=βˆ‘xi2. The inequality defined by (3.2) can then be written in the form
p(Ξ»)=aΞ»2+bΞ»+cβ‰₯0.
So we have a quadratic p(Ξ») that is never negative. This implies that the quadratic p(Ξ») can have at most one real zero. The quadratic formula gives the roots of p(Ξ») as
βˆ’bΒ±b2βˆ’4ac2a.
If b2βˆ’4ac>0, then p(Ξ») has two real roots. Therefore, in order for p(Ξ») to have at most one real zero we must have
0β‰₯b2βˆ’4ac=4(βˆ‘xiyi)2βˆ’4(βˆ‘yi2)(βˆ‘xi2)
(βˆ‘yi2)(βˆ‘xi2)β‰₯(βˆ‘xiyi)2.
This establishes the Cauchy-Schwarz Inequality.
One consequence of the Cauchy-Schwarz Inequality that we will need to show that dE is a metric is the following.

Proof.

Let n be a positive integer and x=(x1,x2,…,xn), y=(y1,y2,…,yn) be in Rn. Now
βˆ‘(xi+yi)2=βˆ‘(xi2+2xiyi+yi2)=βˆ‘xi2+2βˆ‘xiyi+βˆ‘yi2β‰€βˆ‘xi2+2(βˆ‘xi2)(βˆ‘yi2)+βˆ‘yi2=(βˆ‘xi2+βˆ‘yi2)2.
Taking the square roots of both sides yields the desired inequality.
We can now complete the proof that dE is a metric.

Activity 3.6.

Let n be a positive integer and x=(x1,x2,…,xn), y=(y1,y2,…,yn), and z=(z1,z2,…,zn) be in Rn. Use Corollary 3.10 to show that
dE(x,y)≀dE(x,z)+dE(z,y).
This concludes our proof that the Euclidean metric is in fact a metric.
We have seen several metrics in this section, some of which are given special names. Let x=(x1,x2,…,xn) and y=(y1,y2,…,yn)
  • The Euclidean metric dE, where
    dE(x,y)=(x1βˆ’y1)2+(x2βˆ’y2)2+β‹―(xnβˆ’yn)2=βˆ‘i=1n(xiβˆ’yi)2.
  • The Taxicab metric dT, where
    dT(x,y)=|x1βˆ’y1|+|x2βˆ’y2|+β‹―+|xnβˆ’yn|=βˆ‘i=1n{|xiβˆ’yi|}.
  • The max metric dM, where
    dM(x,y)=max{|x1βˆ’y1|,|x2βˆ’y2|,|x3βˆ’y3|,…,|xnβˆ’yn|}=max1≀i≀n{|xiβˆ’yi|}.
We have only shown that dT and dM are metrics on R2, but similar arguments apply in Rn. Proofs are left to Exercise 5 and Exercise 6. In addition, the discrete metric
d(x,y)={0 if x=y1 if xβ‰ y
makes any set X into a metric space. The proof is left to Exercise 1.