
The distance between two vectors $\stackrel{\u27f6}{v}$ and $\stackrel{\u27f6}{w}$ is the length of the difference vector $\stackrel{\u27f6}{v}\stackrel{\u27f6}{w}$ .
There are many different distance functions that you will encounter in the world. We here use "Euclidean Distance" in which we have the Pythagorean theorem.
If the concepts of distance and length are used without additional description this is what we will mean:
The square of the length of a vector $\stackrel{\u27f6}{w}$ is the sum of the squares (or more generally the sum of the absolute values of the squares, when the components are complex numbers) of its components. It is the dot product $(\stackrel{\u27f6}{w},\stackrel{\u27f6}{w})$ or $\stackrel{\u27f6}{w}\xb7\stackrel{\u27f6}{w}$ ).
But that is not the only concept of distance you will encounter in life.
What properties should the length of a vector have?
The traditional requirements are as follows:
It should be positive, and zero for the zero vector.
It should obey the triangle inequality: the length of the sum of two vectors is no greater than the sum of their lengths.
It is nice if length 0 means that the vector is the
$\stackrel{\u27f6}{0}$
vector.
What other concepts of length or distance are around?
Manhattan distance: the length of a vector is the sum of the absolute values of its components.
Hamming distance: length is number of nonzero components.
Maximum component distance: length is Maximum component absolute value.
Suppose we call the components ${x}_{i}$ , and a small quantity of any of them $d{x}_{i}$ , and the resulting value of distance with components $d{x}_{i}$ let us call $ds$ .
Then in Euclidean space we have $d{s}^{2}={\displaystyle \sum _{i}^{}}{\leftd{x}_{i}\right}^{2}$ .
We define the metric ${L}_{j}$ by $d{s}^{j}={\displaystyle \sum _{i}^{}}{\leftd{x}_{i}\right}^{j}$ .
Euclidean space can then be described as ${L}_{2}$ .
Exercise 3.14 Which values of $j$ in the definition of ${L}_{j}$ correspond to Hamming, Manhattan, and Maximum component size? (Hints: $j$ can be infinite; also for Hamming distance the notions are similar but not exactly the same, and only similar in a limit.)
Length in Euclidean space when nonrectilinear coordinates are used:
When you describe ordinary vectors in Euclidean space by their polar coordinates, then these do not obey the linear properties of ordinary rectangular coordinates. For example, the length of the sum of two vectors is not the sum of their lengths, and the angle made with the $x$ axis of a sum is not the sum of the angles of the summands.
We can ask, what is the length of a small vector, whose endpoints differ by $r$ coordinate $dr$ and by angle $d\theta $ ?
If we are at a specific point with given coordinates, the $r$ direction is the direction pointing away from the origin toward it, and distance in this direction is measured just as in the $x$ or $y$ direction. The length of a vector in this direction with coordinate $dr$ is $\leftdr\right$ .
The
$\theta $
direction is perpendicular to the
$r$
direction, increasing in the counterclockwise direction, but distance is not
$d\theta $
. The distance around a circle is proportional to the radius of the circle, and distance in the angular direction in consequence is proportional to
$r$
as well.
The result is that distance in polar coordinates is measured by
Length in nonorthonal coordinates:
Any $k$ linearly independent kvectors may be used as a basis: any other kvector can be expressed as a linear combination of them. (Why? By exercise 3.11 any other kvector is in a linear dependence with them which can be solved for that kvector in terms of the basis.)
Thus, in two dimensions, for example, any two vectors
$\stackrel{\u27f6}{a}$
and
$\stackrel{\u27f6}{b}$
with different directions can form a basis and any vector
$\stackrel{\u27f6}{v}$
can be described by coordinates that are the coefficients of these two: if
$\stackrel{\u27f6}{v}=s\stackrel{\u27f6}{a}+t\stackrel{\u27f6}{b}$
then we can describe
$\stackrel{\u27f6}{v}$
by the 2vector
$(s,t)$
.
However, if we are describing Euclidean space and the vectors
$\stackrel{\u27f6}{a}$
and
$\stackrel{\u27f6}{b}$
are not orthogonal the length of
$\stackrel{\u27f6}{v}$
squared will not be
${s}^{2}+{t}^{2}$
. In general though, if we define
$(s,t)$
to be
$\stackrel{\u27f6}{v\text{'}}$
, we get length squared is
$\stackrel{\u27f6}{v\text{'}}\leftG\right\stackrel{\u27f6}{v\text{'}}$
for some matrix
$G$
which depends on the angle between
$\stackrel{\u27f6}{a}$
and
$\stackrel{\u27f6}{b}$
.
Thus, if $\stackrel{\u27f6}{a}$ and $\stackrel{\u27f6}{b}$ are unit vectors at angle $\theta $ the matrix $G$ is
The matrix $G$ is called the metric tensor for the given basis.
Different metrics: Minkowski space:
There are even vector spaces in which the concept of distance is replaced by something that can be positive or imaginary: such is Minkowski space: it has four dimensions, three spatial and also time. In it the analog of distance is described by
Vectors with ${s}^{2}$ positive or negative are said to be spacelike or timelike respectively; those with ${s}^{2}=0$ are said to lie on the "light cone".
Why does anyone bother with such things ?
Linear changes in the coordinates in Euclidean space that have the property that they do not alter distances (so that the distance between two points remains after the changes exactly what it was before), are rotations in space. Similar changes in Minkowski space are symmetries of Maxwell's equations of electrodynamics, and correspond to both rotations in space and "Lorentz transformations". Thus even this last concept has important physical application. All the others do as well, in appropriate contexts.
