Vector Spaces
This note introduces vector spaces, one of the most fundamental structures in mathematics, and explores why they are so useful. For example,
- Google search uses vector space.
- Machine learning embeddings are vectors.
- Error-correcting codes are vector spaces. ...
Once you start looking vectors appear everywhere.
What is a vector ?
To explain it in one simple line :
Vector is an element of vector space
Although vectors are often represented as lists of numbers, they can also be polynomials, matrices, functions, or many other mathematical objects. What makes them vectors is not their appearance, but the operations defined on them.
Vector Space
Let's begin with the familiar vector space :
For example, consider vectors in We define two operations on these vectors :
Here
- Vector Addition
- Scalar Multiplication
Suppose , then :
Together with the vector space axioms, these operations make a vector space.
A subset is called subspace if it satisfies the following properties :
- If , then
- If and , then
- Zero vector belongs to
Defining Vector Spaces over
A vector space over a field is a set together with two operations :
-
Addition : This operation takes two vectors and returns another vector in :
defined by
-
Scalar Multiplication : This operation takes a scalar from and a vector from , and returns another vector in :
defined by
These two operations must satisfy the collection of axioms which are defined below.
Axioms for Vector Spaces
- Addition makes into a commutative group , with identity denoted by .
- , .
- , .
- Associative Law :
- Distributive Law :
So far, we have defined the objects and operations of a vector space. The next question is: how can we build new vectors from existing ones ?
Span
Let's define a vector where is vector. Define to be a column in
The set of all vectors that are linear combinations of form a subspace of , this is known as subspace spanned by set.
This span is the smallest subspace of that contains , and it is denoted by .
To give a small example where we have a span which equals to the whole of vector space :
Example in Consider the vectors :
And any vector Can be written as :
Therefore in this case we can say that :
Basis
A Basis of vector space is a set of vector that are independent and also spans . Set is a basis of if can be written in a unique combination
Dimension of a finite dimensional vector space is the number of vectors in the basis, denoted by .
Computing with Basis
Suppose we choose the standard basis of
Now consider the vector
Since is a basis, the vector can be written uniquely as a linear combination of the basis vectors:
The coefficients and are called the coordinates of with respect to the basis .
We denote the coordinate vector of by
The vector itself has not changed. We are simply recording how to construct it from the chosen basis vectors.
Now consider a different basis
The same vector
can now be written as
Therefore,
Although the coordinates have changed, the vector itself remains exactly the same. Only its representation with respect to the chosen basis has changed.
A vector is independent of the basis, but its coordinates are not.
Vector Spaces and Linear Codes
One of the most useful applications of vector spaces is in coding theory. In a linear error-correcting code, every codeword is simply a vector over a finite field such as . The collection of all valid codewords forms a vector space (or more precisely, a subspace of ). Concepts such as span, basis, dimension, and coordinates become fundamental in constructing and analyzing these codes.
For example, a basis of a linear code allows every codeword to be represented uniquely as a linear combination of basis vectors. These coefficients correspond to the information being encoded, while the resulting vector is the transmitted codeword.