Examples of vector spaces
In the previous part we defined vector spaces, also called linear spaces, and looked at the classic example of a vector space, ℝ2. In this article we look at some more examples.
The vector space Rn
We already know the vector space ℝ2, which consists of vectors of the form (a, b), where a, b are real numbers. We will show that in fact any set of ordered n-tuples ℝn, for n > 0, forms a vector space.
For n = 2 we get the set of pairs (a, b). If we increase n to n = 3, we get the set of triples. That takes us from the plane into space. So ℝ2 represents the ordinary plane and ℝ3 ordinary three-dimensional space.
Addition and scalar multiplication are defined just as in the case n = 2; we simply have to add or multiply all the parts of the vectors:
Now we should prove that the vector space ℝ3, or more generally ℝn, satisfies all seven points of the definition of a vector space. However, the proofs would be essentially the same; we would just work with a vector with three components instead of two. For example, we would prove the first point, about the commutativity of vector addition, for n = 3 like this:
We have to prove that x + y = y + x, where x, y ∈ ℝ3. We would write out the sum of the two vectors:
If we swap the vectors on the left-hand side, we get:
But the addition of two real numbers is commutative, so the resulting vectors are the same, that is, (a + d, b + e, c + f) = (d + a, e + b, f + c).
If you compare this with the proof for n = 2 in the previous article, you will see that it is practically identical. The other six points can be proved in a similar way.
It is interesting that ℝ1 = ℝ, the set of real numbers itself, is also a vector space. Addition and multiplication of vectors then become ordinary addition and multiplication of real numbers, and these certainly satisfy all 7 points.
We will certainly meet the space ℝn again; it is a fairly common vector space.
The vector space of m × n matrices
The set of all matrices with m rows and n columns that contain only real numbers forms a vector space, together with the operations of matrix addition and multiplication of a matrix by a scalar. We will write this space as ℝm × n.
For m = 2, n = 3 we would get matrices with two rows and three columns. An example of a specific matrix is
We define addition as follows:
That is ordinary matrix addition. We define multiplication by a scalar in a similar way:
With these operations, the set of all matrices ℝm × n forms a vector space. It is important that we always take the set of all matrices of the same size. If a matrix of a different size sneaked in, for example if we added a 3 × 1 matrix to ℝ2 × 2, we would have a problem, because a 3 × 1 matrix cannot even be added to a 2 × 2 matrix.
Again, we should check that this vector space satisfies all 7 conditions that we place on a vector space. Since with matrices we would be writing for ages – well, mainly I would – we will keep it brief:
Adding two matrices gives us a new matrix of the same size. Multiplying by a scalar gives us a new matrix of the same size, so the types of our operations match.
- x + y = y + x: matrix addition is clearly commutative, because the entry in position ij of the resulting matrix has the form xij + yij = yij + xij.
- (x + y) + z = x + (y + z): matrix addition is also associative, because (xij + yij) + zij = xij + (yij + zij)
- a · (b · x) = (a · b) · x: again, a · (b · xij) = (a · b) · xij
- a · (x + y) = a · x + a · y: again, for the entries in position ij we get equality: a · (xij + yij) = a · xij + a · yij
- (a + b) · x = a · x + b · x: again we just write out the entry in position ij: (a + b) · xij = a · xij + b · xij
- 1 · x = x: since 1 · xij = xij, this point holds too.
- Existence of a zero element. This is the zero matrix, because for every matrix x of our vector space, 0 · xij = 0
The vector space of polynomials
A polynomial is written p(x) and is an expression of the form:
We assume that an ≠ 0. The degree of such a polynomial is then exactly the number n. The real numbers a0, …, an are called the coefficients of the polynomial. An example of a polynomial is the expression 4 + 3x − 7x2, where a0 = 4, a1 = 3, a2 = −7 and the degree of the polynomial is 2. Some coefficients may be zero, so the expression x2 + π x7 is a polynomial of degree 7 with a2 = 1, a7 = π and all the other coefficients zero.
Polynomials are easy to add – we simply add their coefficients. For example:
In general, we can define the addition of polynomials like this:
where q is the larger of the numbers m and n. The scalar multiple k · p(x) of a polynomial is obtained by multiplying all the coefficients by k:
For example:
The set of all polynomials, which we denote P(X), forms a vector space with the operations of addition and multiplication defined in this way. Checking:
The sum of two polynomials is again a polynomial, and multiplying by a scalar also gives a new polynomial. So the types of the operations we defined match.
You can check the other seven properties that a vector space must satisfy as homework. The proof is practically the same as for matrices, except that you write xi instead of xij. The zero polynomial is the polynomial p(x) = 0.
For matrices we required that the vector space contain only matrices of the same size, but for polynomials we do not require this. We cannot even require it. If we took the set of all polynomials of degree two, this set would not form a vector space. Why? We can show it with a counterexample. Let's add these two polynomials:
Because the first polynomial contains 3x2 and the second contains −3x2, after adding them we get 0x2, which lowers the degree of the polynomial. The polynomial 2 + 4x has degree 1, not 2.
Chapters: Vector spaces, Examples of vector spaces, Vector subspace, Linear combination of vectors, Span, Basis of a vector space, Dimension of a vector space, Change-of-basis matrix