A vector is formally defined as an element of a vector space. In the commonly encountered vector space (i.e., Euclidean n-space), a vector is given by coordinates and can be specified as . Vectors are sometimes referred to by the number of coordinates they have, so a 2-dimensional vector is often called a two-vector, an -dimensional vector is often called an n-vector, and so on.
Vectors can be added together (vector addition), subtracted (vector subtraction) and multiplied by scalars (scalar multiplication). Vector multiplication is not uniquely defined, but a number of different types of products, such as the dot product, cross product, and tensor direct product can be defined for pairs of vectors.
A vector from a point to a point is denoted , and a vector may be denoted , or more commonly, . The point is often called the "tail" of the vector, and is called the vector's "head." A vector with unit length is called a unit vector and is denoted using a hat, .
When written out componentwise, the notation generally refers to . On the other hand, when written with a subscript, the notation (or ) generally refers to .
An arbitrary vector may be converted to a unit vector by dividing by its norm (i.e., length; i.e., magnitude),
(1)
|
giving
(2)
|
A zero vector, denoted , is a vector of length 0, and thus has all components equal to zero.
Since vectors remain unchanged under translation, it is often convenient to consider the tail as located at the origin when, for example, defining vector addition and scalar multiplication.
A vector may also be defined as a set of numbers , ..., that transform according to the rule
(3)
|
where Einstein summation notation has been used,
(4)
|
are constants (corresponding to the direction cosines), with partial derivatives taken with respect to the original and transformed coordinate axes, and , ..., (Arfken 1985, p. 10). This makes a vector a tensor of tensor rank one. A vector with components in called an -vector, and a scalar may therefore be thought of as a 1-vector (or a 0-tensor rank tensor). Vectors are invariant under translation, and they reverse sign upon inversion. Objects that resemble vectors but do not reverse sign upon inversion are known as pseudovectors. To distinguish vectors from pseudovectors, the former are sometimes called polar vectors.
A vector is represented in the Wolfram Language as a list of numbers a1, a2, ..., an. Vector addition is then simply written using a plus sign, e.g., a1, a2, ..., an+b1, b2, ..., bn , and scalar multiplication is indicated by placing a scalar next to a vector (with or without an optional asterisk), sa1, a2, ..., an.
Let be the unit vector defined in spherical coordinates by
(5)
|
Then the average value of the -component of the over the surface of the unit sphere is given by
(6)
| |||
(7)
| |||
(8)
|
More generally,
(9)
|
for , , or (indexed as 1, 2, 3), and
(10)
| |||
(11)
| |||
(12)
|
Given vectors , , , , the average values of a number of quantities over the unit sphere are given by
(13)
| |||
(14)
| |||
(15)
| |||
(16)
| |||
(17)
|
and
(18)
|
where is the Kronecker delta, is a dot product, and Einstein summation has been used.
A map that assigns each a vector function is called a vector field.