sci.math
[Top] [All Lists]

Re: euclidean distance question

Subject: Re: euclidean distance question
From: quasi
Date: Sat, 30 Jul 2005 16:26:20 -0700
Newsgroups: sci.math
On 30 Jul 2005 10:55:40 -0700, "asdf" <qjohnny2000@xxxxxxxxx> wrote:

>Okay here is a example
>Square A ( or Block A )
>1  2
>3  4
>Square B ( or Block B )
>2 3
>4 6
>
>d( A, B ) = 7 = ( 1-2)^2 + (2-3)^2 + (3-4)^2 + (4-6)^2
>
>now replace each entry with the means.
>New A
>2.5 2.5
>2.5 2.5
>
>New B
>3.75  3.75
>3.75  3.75
>
>distance is 4*(3.75-2.5)^2 = 6.25
>
>Calling these things squares is not the best way of wording things !

Yes, better to call them points in R^n.

So in your example, if we view the "squares" as points in R^4, we can
write:

   A=(1,2,3,4)

   B=(2,3,4,6)

   A'=(5/2,5/2,5/2,5,2)

   B'=(15/4,15/4,15/4,15/4)

and the distances being compared are d(A,B), d(A',B'). The standard
distance in R^n is given by:

   d(x,y)=sqrt(sum (x[i]^2-y^[i]^2, i=1..n))

but comparing distances squared will give the same order. Therefore

In the example above, the distance squared from A to B is 7 while the
distance squared from A' to B' is 6.25.

So the general question is:

   If A,B are any arbitrary points of R^n, must d(A,B)>=d(A',B')?

The answer is yes. Here is a sketch of the proof:

Interpret A,B, A',B' as vectors.

Let u be a unit vector in R^n in the direction of (1,1,...1).

Note that A'=proj_u(A) and B'=proj_u(B) so

   A'-B'=proj_u(A)-proj_u(B)=proj_u(A-B)

Then:

   d(A,B)=|A-B|>=|proj_u(A-B)|=|A'-B'|=d(A',B')

Therefore d(A,B)>=d(A',B')

quasi

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy