]>
|
|
||
The distance between two vectors and is the length of the difference vector .
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 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 or ).
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
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 non-zero components.
Maximum component distance: length is Maximum component absolute value.
Suppose we call the components , and a small quantity of any of them , and the resulting value of distance with components let us call .
Then in Euclidean space we have .
We define the metric by .
Euclidean space can then be described as .
Exercise 3.14 Which values of in the definition of correspond to Hamming, Manhattan, and Maximum component size? (Hints: 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 non-rectilinear 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 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 coordinate and by angle ?
If we are at a specific point with given coordinates, the direction is the direction pointing away from the origin toward it, and distance in this direction is measured just as in the or direction. The length of a vector in this direction with coordinate is .
The
direction is perpendicular to the
direction, increasing in the counterclockwise direction, but distance is not
. The distance around a circle is proportional to the radius of the circle, and distance in the angular direction in consequence is proportional to
as well.
The result is that distance in polar coordinates is measured by
Length in non-orthonal coordinates:
Any linearly independent k-vectors may be used as a basis: any other k-vector can be expressed as a linear combination of them. (Why? By exercise 3.11 any other k-vector is in a linear dependence with them which can be solved for that k-vector in terms of the basis.)
Thus, in two dimensions, for example, any two vectors
and
with different directions can form a basis and any vector
can be described by coordinates that are the coefficients of these two: if
then we can describe
by the 2-vector
.
However, if we are describing Euclidean space and the vectors
and
are not orthogonal the length of
squared will not be
. In general though, if we define
to be
, we get length squared is
for some matrix
which depends on the angle between
and
.
Thus, if and are unit vectors at angle the matrix is
The matrix 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 positive or negative are said to be space-like or time-like respectively; those with 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.
|
|