Vectors can be arranged in a column, or a row; we usually write vectors in column format:
We denote by denotes the set of real vectors with components. If denotes a vector, we use subscripts to denote components, so that is the -th component of . Sometimes the notation is used to denote the -th component.
Geometry. A vector represents both a direction from the origin and a point in the multi-dimensional space , where each component corresponds to coordinate of the point.
Example: The vector in . It is both a point (at the tip of the arrow) and a direction from the origin.
Sometimes we use the looser, in-line notation , to denote a row or column vector, the orientation being understood from context.
Matlab syntax: declare and transpose a vector
>> x = [2; 3.1; -4]; % declares a column vector using ";".
>> y = x'; % the prime operator ' transposes the vector.
>> y = [2,3.1,-4]; % can also declare a row vector with commas.
>> x(2) % this produces the second component of x.
>> x([1,3]) % this produces the 2-vector with the first and the third component of x.
A set of vectors in , is said to be independent if and only if the following condition on a vector :
implies . This means that no vector in the set can be expressed as a linear combination of the others.
Example: the vectors and are not independent, since .
Subspaces. A subspace of is a subset that is closed under addition and scalar multiplication. Geometrically, subspaces are ‘‘flat’’ (like a line or plane in 3D) and pass through the origin.
An important result of linear algebra, which we will prove later, says that a subspace can always be represented as the span of a set of vectors , , that is, as a set of the form
Affine sets. An affine set is a translation of a subspace — it is ‘‘flat’’ but does not necessarily pass through , as a subspace would. (Think for example of a line, or a plane, that does not go through the origin.) So an affine set can always be represented as the translation of the subspace spanned by some vectors:
for some vectors . In shorthand notation, we write .
Example: In , the span of the two vectors
is the plane passing through the origin pictured in blue.
Special case: lines. When is the span of a single non-zero vector, the set is called a line passing through the point . Thus, lines have the form
where determines the direction of the line, and is a point through which it passes.
Example: A line in passing through the point
with direction .
for appropriate numbers .
The standard basis (alternatively, natural basis) in consists of the vectors , where 's components are all zero, except the -th, which is equal to . In , we have
Example: A basis in .
for appropriate numbers .
The number of vectors in the basis is actually independent of the choice of the basis (for example, in you need two independent vectors to describe a plane containing the origin). This number is called the dimension of . We can accordingly define the dimension of an affine subspace, as that of the linear subspace of which it is a translation.
The dimension of a line is , since a line is of the form for some non-zero vector .