# Distance is independent of coordinates

I am asked to show $d(x,y) = ((x_2 - x_1)^2 + (y_2 -y_1)^2)^{1/2}$ does not depend on the choice of coordinates. My try is:

$V$ has basis $B = b_1 , b_2$ and $B' = b_1' , b_2'$ and $T = [[a c], [b d]]$ is the coordinate transformation matrix $Tv_{B'} = v_B$ and $x_{B'} = x_1 b'_1 + x_2 b'_2$ and $y_{B'} = y_1b_1' + y_2b_2'$ are the vectors and the distance in the coordinates of $B'$ is $d(x_{B'},y_{B'}) = ((x_2 - x_1)^2 + (y_2 -y_1)^2)^{1/2}$.

The coordinates in $B$ are $x_B = (x_1 a + x_2 c)b_1 + (x_1 b + x_2 d) b_2$ and similar for $y$. I compute the first term in the distance $((x_1 b + x_2 d) - (x_1 a + x_2 c))^2$. I may assume these are Cartesian coordinates so that $a^2 + b^2 = c^2 + d^2 = 1$ and $ac + bd = 0$.

With this I have $((x_1 b + x_2 d) - (x_1 a + x_2 c))^2 = x_2^2 + x_2^2 - 2(x_1^2 ab + x_1 x_2 bc + x_1 x_2 ad + x_2^2 cd)$. My problem is that $x_1^2 ab + x_1 x_2 bc + x_1 x_2 ad + x_2^2 cd \neq x_1 x_2$. How to solve this? How to show that $x_1^2 ab + x_2^2 cd = 0$ and that $bc + ad = 1$? Thank you.

-
As far as I know not every linear transform preserve the distances. – user26857 Jan 7 '13 at 16:41
@YACP: Yes, but the conditions $a^2+b^2=c^2+d^2=1$ and $ac+bd=0$ mean that $T^\top T=I$, i.e. the linear transformation is orthogonal, so it should preserve distances. – Rahul Jan 7 '13 at 16:50
In the first line, you've mis-copied the definition of distance. The two numbers that get squared should be $x_1-y_1$ and $x_2-y_2$, not $x_2-x_1$ and $y_2-y_1$. (This is assuming that $x=(x_1,x_2)$ and $y=(y_1,y_2)$.) – Andreas Blass Jan 7 '13 at 20:39
@AndreasBlass I let the points $P(x_1, y_1)$ and $P(x_2, y_2)$. – Anna Jan 7 '13 at 21:16

## 1 Answer

I would try a little bit more abstract approach. Sometimes a little bit of abstraction helps.

First, distance can be computed in terms of the dot product. So, if you have points with Cartesian coordinates $X,Y$, the distance between them is

$$d(X,Y) = \sqrt{(X-Y)^t(X-Y)} \ .$$

Now, if you make an orthogonal change of coordinates of matrix $S$, the new coordinates $X'$ and the old ones $X$ are related through the relation

$$X = SX'$$

where $S$ is an orthogonal matrix. This is exactly your condition that the new coordinates are "Cartesian". That is, if

$$S = \begin{pmatrix} a & c \\ b & d \end{pmatrix}$$

the fact that $S$ is orthogonal means that $S^tS = I$, that is

$$\begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} a & c \\ b & d \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \qquad \Longleftrightarrow \qquad a^2 + b^2 = c^2 + d^2 =1 \quad \text{and} \quad ac + bd = 0 \ .$$

So, let's now compute:

$$d(X,Y) = \sqrt{(SX' - SY')^t(SX' - SY')} = \sqrt{(X'-Y')^tS^tS(X'-Y')} = \sqrt{(X'-Y')^t(X'-Y')} \ .$$

Indeed, distance does not depend on the Cartesian coordinates.

-
Thank you. But I want to find where I made the mistake. – Anna Jan 8 '13 at 7:34
It's ok, I can do it. – Anna Jan 8 '13 at 11:29
Of course you can. For instance, redo my computations putting $X = (x_1,x_2)^t$ and $Y = (y_1,y_2)^t$. – a.r. Jan 8 '13 at 17:20