mielu_istetz's Avatar
mielu_istetz 6
148 Asked
780 Answered
405 Best
1
No one has voted on this question yet :(
2 years, 1 month ago

Which of these is a metric ?

x=(x1,x2,...xn),
y=(y1,y2,...,yn)
d1(x,y)=sum (xi-yi)^2
or
d2(x,y)=sqrt( sum (xi-yi)^2) (the Euclidean distance)

sqrt means square root
Is d1 or d2 a metric that makes R^n a metric space?
Can you prove it?
Tip for best answer: M$2.03
Separate topics with commas, or by pressing return. Use the delete or backspace key to edit or remove existing topics.

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

What is Your Answer?

0
0
0

1 Answer

1
utahouck's Avatar
utahouck | 2 years, 1 month ago
2
Here is my proposal: Let's verify the criteria for d1 and d2 to be a metric for R^n.Quite obviously d1 and d2 are applications from R^n to R+.Condition 1 is the separation condition:d1(x,y)=0 <=> sum (xi-yi)^2=0 <=> xi=yi for any (i) <=> x=y VERIFIEDd2(x,y)=0 <=> sqrt (sum (xi-yi)^2=0) <=> xi=yi for any (i) <=> x=y VERIFIED Condition 2 is the symmetry condition:d1(x,y) = sum (xi-yi)^2 = sum (yi-xi)^2 = d1(y,x) VERIFIEDd2(x,y) = sqrt(sum (xi-yi)^2) = sqrt(sum (yi-xi)^2) = d2(y,x) VERIFIEDCondtion 3 is the triangular inequality:d2(x,z)^2 = sum(xi-zi)^2 = sum(xi-yi+yi-zi)^2 = sum(xi-yi)^2+sum(yi-zi)^2 + 2 sum((xi-yi)*(yi-zi))d2(x,z)^2=d2(x,y)^2+d2(y,z)^2+2 sum((xi-yi)*(yi-zi))Using the Cauchy-Schwarz inequality on vectors (x-y) and (y-z) in space R^n endowed with scalar product = sum(ai*bi):d2(x,z)^2<=d2(x,y)^2+d2(y,z)^2+2* sqrt(sum xi-yi) * sqrt(sum (yi-zi))d2(x,z) <= d2(x,y) + d2(y,z) VERIFIEDThe same calculation can be performed with d1, using a different scalar product =sqrt sum(ai*bi) instead.All 3 criteria are fulfilled therefore both d1 and d2 can be declared as a metric for R^n.

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$
mielu_istetz's Avatar
mielu_istetz | 2 years ago Report

I will prove d2 is a metric based on your idea; however d1 is not a metric

(d2(x,z))^2=sum (xi-zi)^2=sum (xi-yi+yi-zi)^2=sum(xi-yi)^2+sum(yi-zi)^2+2*sum(xi-yi)*(yi-zi)

Now from the Cauchy-Schwartz applied to the vectors (x-y) an (y-z) we get
sum (xi-yi)(yi-zi) <= sqrt( sum (xi-yi)^2)* sqrt (sum(yi-zi)^2)

so if we go back
(d2(x,z))^2=sum (xi-zi)^2=sum (xi-yi+yi-zi)^2=sum(xi-yi)^2+sum(yi-zi)^2+2*sum(xi-yi)*(yi-zi) <=sum(xi-yi)^2+sum(yi-zi)^2 + 2sqrt( sum (xi-yi)^2)* sqrt (sum(yi-zi)^2)=
=(sqrt(sum(xi-yi)^2)+sqrt(sum(yi-zi)^2))^2
by taking square roots we get
d2(x,z)<=d2(x,y)+d2(y,z)

As for d1, sqrt sum(xi*yi) is not a dot product
In fact, d1 is not a metric
for example if x=-1, z=1, y=0,
d1(x,z)=(x-z)^2=4 > d1(x,y)+d(y,z)=(x-y)^2+(y-z)^2=2

utahouck's Avatar
utahouck | 2 years ago Report

I agree with your point about d1. I switched too fast from d2 to d1 and was not careful enough.

mielu_istetz's Avatar
mielu_istetz | 2 years, 1 month ago Report

It seems Cauchy-Schwarz is a roundabout but I was interested to see if they are indeed metrics and if Cauchy-Schwartz say so, it's fine

utahouck's Avatar
utahouck | 2 years, 1 month ago Report

My answer appears in one block in my browser, I hope this is not the case for you, otherwise this is hardly readable...

Report Abuse

Post Reply Cancel

Learn something new with our FREE educational apps!

Private lessons in the comfort of your own home. Get back in shape or finally pick up a guitar with our great experts guiding you the whole way!
Learn Guitar
Learn Hip Hop
Learn Pilates