The definition from Table 1 of a vector space reflects everyday
experience with vectors in Euclidean geometry, and it is common to
refer to such vectors by descriptions in a Cartesian coordinate
system. For example, a position vector
within the plane can be referred through the pair of coordinates .
This intuitive understanding can be made precise through the
definition of a vector space , called the real 2-space. Vectors
within are
elements of , meaning that a vector is specified
through two real numbers, .
Addition of two vectors, ,
is defined by addition of
coordinates . Scaling
by scalar is defined by . Similarly, consideration of
position vectors in three-dimensional space leads to the definition of
the , or more generally a real -space , ,
.
Addition rules for
Closure
Associativity
Commutativity
Zero vector
Additive inverse
Scaling rules for
,
Closure
Distributivity
Distributivity
Composition
Scalar identity
Note however that there is no mention of coordinates in the definition of a vector space as can be seen from the list of properties in Table 1. The intent of such a definition is to highlight that besides position vectors, many other mathematical objects follow the same rules. As an example, consider the set of all continuous functions , with function addition defined by the sum at each argument , and scaling by defined as . Read this as: “given two continuous functions and , the function is defined by stating that its value for argument is the sum of the two real numbers and ”. Similarly: “given a continuous function , the function is defined by stating that its value for argument is the product of the real numbers and ”. Under such definitions is a vector space, but quite different from . Nonetheless, the fact that both and are vector spaces can be used to obtain insight into the behavior of continuous functions from Euclidean vectors, and vice versa. This correspondence principle between discrete and continuous formulations is a recurring theme in scientific computation.
(1) |
with the components arranged vertically and enclosed in square brackets. Given two vectors , and a scalar , vector addition and scaling are defined in by real number addition and multiplication of components
(2) |
∴ |
u=[1; 2; 3]; v=[-1; -2; -3]; [u v] |
(3)
∴ |
a=2; b=5; a*u+b*v |
(4)
∴ |
The vector space is defined using the real numbers as the set of scalars, and constructing vectors by grouping together scalars, but this approach can be extended to any set of scalars , leading to the definition of the vector spaces . These will often be referred to as -vector space of scalars, signifying that the set of vectors is .
To aid in visual recognition of vectors, the following notation conventions are introduced:
vectors are denoted by lower-case bold Latin letters: ;
scalars are denoted by normal face Latin or Greek letters: ;
the components of a vector are denoted by the corresponding normal face with subscripts as in equation (1);
related sets of vectors are denoted by indexed bold Latin letters: .
∴ |
u=[1; 2; 3]; u' |
(5)
∴ |
and is the notation used to denote a row vector.
In Julia, horizontal placement of successive components in a row is denoted by a space.
∴ |
u=[4 5 6] |
(6)
∴ |
The ellipsis symbol in the mathematical notation is transcribed in Julia by the notion of a range, with 1:m denoting all the integers starting from to , organized as a row vector. The notation is extended to allow for strides different from one, and the mathematical ellipsis is denoted as m:-1:1. In general r:s:t denotes the set of numbers with , and real numbers and a natural number, , . If there is no natural number such that , an empty vector with no components is returned.
The expression expresses the idea of scaling vectors within a set and subsequent addition to form a new vector . The matrix groups these vectors together in a single entity, and the scaling factors are the components of the vector . To bring all these concepts together it is natural to consider the notation
∴ |
I |
UniformScaling{Bool}(true)
∴ |
Matrix(1I,3,3) |
(7)
∴ |
Matrix(1.0I,3,3) |
(8)
∴ |
as a generalization of the scalar expression . It is clear what the operation should signify: it should capture the vector scaling and subsequent vector addition . A specific meaning is now ascribed to by identifying two definitions to one another.
∴ |
θ=π/6.; c=cos(θ); s=sin(θ); t=[c; s]; n=[-s; c]; |
∴ |
and can be combined into a matrix . The value of the components are the scaling factors and can be combined into a vector . The same force must result irrespective of whether its components are given along the Cartesian axes or the inclined plane directions leading to the equality
(9) |
∴ |
b=[0.2; 0.4]; I*b |
(10)
∴ |
Interpret equation (9) to state that the vector could be obtained either as a linear combination of , , or as a linear combination of the columns of , . Of course the simpler description seems to be for which the components are already known. But this is only due to an arbitrary choice made by a human observer to define the force in terms of horizontal and vertical components. The problem itself suggests that the tangential and normal components are more relevant; for instance a friction force would be evaluated as a scaling of the normal force.
The components of in this more natural reference system are not known, but can be determined by solving the vector equality , known as a linear system of equations, implemented in many programming environments (Julia, Matlab, Octave) through the backslash operator x=A\b.
|
|
Linear combinations in and .
Linear combinations in a real space can
suggest properties or approximations of more complex objects such as
continuous functions. Let denote the vector space of continuous
functions that are periodic on the interval , . Recall that vector addition is
defined by , and scaling
by , for ,
.
Familiar functions within this vector space are ,
with ,
and these can be recognized to intrinsically represent periodicity on
, a role analogous to the normal and
tangential directions in the inclined plane example. Define now another
periodic function by repeating the values
from the interval on all intervals , for .
The function is not given in terms of the
“naturally” periodic functions ,
, but could it thus be expressed? This
can be stated as seeking a linear combination
as studied in Fourier analysis. The coefficients
could be determined from an analytical formula involving calculus
operations
but we'll seek an approximation using a linear combination of terms
Organize this as a matrix vector product , with
The idea is to sample the column vectors of at the components of the vector , , , . Let , and , denote the so-sampled functions leading to the definition of a vector and a matrix . There are coefficients available to scale the column vectors of , and has components. For it is generally not possible to find such that would exactly equal , but as seen later the condition to be as close as possible to leads to a well defined solution procedure. This is known as a least squares problem and is automatically applied in the x=A\b instruction when the matrix A is not square. As seen in the following numerical experiment and Figure 2, the approximation is excellent and the information conveyed by samples of is now much more efficiently stored in the form chosen for the columns of and the scaling coefficients that are the components of .
![]() |
|
|
A widely used framework for constructing additive approximations is the vector space algebraic space structure in which scaling and addition operations are defined
In a vector space linear combinations are used to construct more complicated objects from simpler ones