Vectors in n-dimensional space. Orthogonal vectors. Pythagorean theorem. Orthogonal and orthonormal bases.
Length of a vector in n-dimensional space. If x is a vector in n-space, its length is given by
i.e. the square root of the dot product xx.
Distance between points in n-space. If x and y represent two points in n-space the distance between them is given by
(i.e. the length of the vector x - y )
Angle between two vectors in n-space. If x and y are two vectors in n-space the angle θ between them is given by
This formula is a direct generalization of the formula xy = ||x|| ||y|| cos θ for three dimensional space. By the Schwarz inequality (theorem),
|xy|
||x|| ||y||
for any two n-vectors x and y. Thus the fraction
is always in the range -1 to +1.
Orthogonal vectors in n-space. Two vectors x and y in n-space are said to be orthogonal if and only if
(i.e. they are orthogonal if cos θ = 0, and thus θ = 90o.)

Pythagorean theorem in n-space. Let x1, x2, ...... , xk be k pairwise orthogonal vectors in n-space. Then
( x1 + x2 + ...... + xk ) · ( x1 + x2 + ...... + xk ) = x1 · x1 + x2 · x2 + ...... + xk · xk
i.e. the square of the diagonal of the k-dimensional rectangular parallelepiped formed by x1, x2, ...... , xk is equal to the sum of the squares of the edges. See Fig. 1 for case k = 3.
Basis for an n-dimensional space. A basis for an n-dimensional space is any set of linearly independent vectors that span the space. Every vector in the space the can be expressed as a unique linear combination of the vectors in this basis.
Orthogonal basis for an n-dimensional space. An orthogonal basis for an n-dimensional space is any set of n pairwise orthogonal vectors in the space. Every vector in the space the can be expressed as a unique linear combination of the vectors in this basis.
Orthonormal basis for an n-dimensional space. An orthonormal basis for an n-dimensional space is any set of n pairwise orthogonal unit vectors in the space. If x1, x2, ...... , xn are a set of n pairwise orthogonal vectors in the space, than the set
constitutes an orthonormal basis for the space. Every vector in the space the can be expressed as a unique linear combination of the vectors in this basis.
Vectors referred to an orthonormal basis. Let the vectors x1, x2, ...... , xn represent an orthonormal basis for an n-dimensional space. Then any vector x in the space can be represented as
x = c1x1 + c2x2 + .......... + cnxn
where c1, c2, ...... , cn are constants. The coefficients c1, c2, ...... , cn represent the projections of the vector x on the basis vectors x1, x2, ...... , xn (they can be viewed as the coordinates of point x in the orthonormal system).