Vectors: Distance, angle, dot product and cross product
Length and distance
Length in 2D and 3D
We denote the length of a vector in the coordinate plane , more precisely the Euclidean length, by . It can be calculated via the Pythagorean theorem:
When we deal with a vector in , the notion of length becomes
Examples
This can be generalized to the -dimensional coordinate space .
Length The Euclidean length of a vector in the -dimensional space , also called the (Euclidean) norm, we denote by . It can be calculated as follows:
Distance The distance between two vectors and is noted as . This is by definition the length of the difference vector , so .
Unit vector A vector is called a unit vector if its norm (i.e., its length) is equal to : . Division of a nonzero vector by its norm, that is, multiplication by the reciprocal value of the norm, leads to a unit vector with the same direction as , but with length equal to .
Properties of the Euclidean norm, the Euclidean norm has the following properties:
The properties are exactly what is needed to turn a vector space via norm into a so-called normed vector space.
The last inequality is called the triangle inequality or Minkowski inequality.
Two vectors and in or are perpendicular to one another if and only if
Distance from a point to a line or plane Let be a line or a plane in space and a point. There is a unique point on that has the shortest distance from all points on to . This point is characterized by the property that the vector is perpendicular to the direction vector(s) of state. The point is called the perpendicular projection or orthogonal projection of on .
Projection on a line In the visualisation below, is the span of the vector and we have drawn a perpendicular projection of a vector on the line . The vector is a scalar multiple of the vector . The length of the vector is minimal when this vector is perpendicular to the line . By dragging the terminal point of the vector along the line you can explore this.
Projection on a plane In the visualisation below, is a plane through the origin and we have drawn a perpendicular projection of a vector on the plane. The length of the vector is minimal under the lengths of for all choices of the vectors in the plane.
The length of a vector is given by .
In the case of , and thus: