Linear Algebra / Unit 4, Vector Spaces / Topic 4.3
Unit 4. Vector Spaces
This topic defines a basis of a vector space and the dimension of the space. A basis is a set of vectors that builds each vector of the space in exactly one way, and the dimension is the number of vectors in a basis.
You need Topics 4.1 and 4.2 for this topic.
A set of vectors is a basis of a vector space when it has two properties.
The first property says that the set has enough vectors. The second property says that it has no extra vectors.
The standard unit vectors from Topic 1.4 are a basis of ℝⁿ, called the standard basis. In the plane they are (1, 0) and (0, 1). The plane has many other bases. The vectors (1, 1) and (1, −1) are independent, because neither is a multiple of the other, and they span the plane. So they are also a basis of ℝ².
A basis gives each vector exactly one set of coefficients. Suppose that the same vector could be written in two ways with the basis vectors b₁ and b₂:
a₁b₁ + a₂b₂ = c₁b₁ + c₂b₂ so (a₁ − c₁)b₁ + (a₂ − c₂)b₂ = 0The basis vectors are independent, so both coefficients in the last equation are 0. Then a₁ = c₁ and a₂ = c₂, and the two ways are the same.
These coefficients are called the coordinates of the vector in that basis. For example, find the coordinates of (3, 1) in the basis (1, 1), (1, −1).
a 11 + b 1−1 = 31 gives a + b = 3 and a − b = 1The solution is a = 2 and b = 1. The vector (3, 1) has the coordinates (3, 1) in the standard basis and the coordinates (2, 1) in the basis (1, 1), (1, −1). The vector is the same. Only its description changed.
Try it: coordinates in a basis
Drag the tips of the blue and red arrows to choose a basis. Drag the purple point to choose a vector. The light lines are the grid of the basis. The green path shows how to reach the point: along b₁ first, and then along b₂.
A vector space has many bases, but all of them have the same number of vectors. This number is called the dimension of the space.
The reason is the fact from Topic 4.2 that counts vectors. If a space has a basis of n vectors, then each vector of the space is described by n coordinates, and any set of more than n vectors is dependent. So no basis can have more than n vectors. The same argument with the two bases exchanged shows that no basis can have fewer.
| Vector space | A basis | Dimension |
|---|---|---|
| ℝⁿ | The standard unit vectors | n |
| A line through the origin | One vector along the line, other than the zero vector | 1 |
| The plane x + y + z = 0 in ℝ³ | (−1, 1, 0) and (−1, 0, 1) | 2 |
| The set that contains only the zero vector | The empty set | 0 |
| Polynomials of degree 2 or less | 1, x, x² | 3 |
| All 2 by 2 matrices | The four matrices with one entry equal to 1 and the others 0 | 4 |
| Symmetric 2 by 2 matrices | 1000, 0110, 0001 | 3 |
The dimension agrees with the everyday meaning for lines, planes, and space. It also gives a meaning to the dimension of a space of polynomials or matrices: it is the number of independent numbers needed to describe one member of the space.
To find a basis for the span of some vectors, write them as the columns of a matrix and reduce it. The columns of the original matrix that have pivots are a basis. The other columns are combinations of them, so they can be removed without changing the span.
For v₁ = (1, 2, 3), v₂ = (4, 5, 6), and v₃ = (7, 8, 9), Topic 4.2 found pivots in columns 1 and 2. So v₁ and v₂ are a basis of the span, and the span has the dimension 2. It is a plane through the origin.
Use the columns of the original matrix, not the columns of the reduced matrix. Row operations change the columns.
Write the general solution, as in Topic 2.3. The vectors that multiply the parameters are a basis. For the single equation x + y + z = 0, the unknowns y and z are free. With y = s and z = t,
xyz = s −110 + t −101The two vectors (−1, 1, 0) and (−1, 0, 1) are a basis of this plane, which is the third row of the table above. The dimension is the number of free variables.
In a vector space of dimension n, the two properties of a basis are linked.
To test whether n vectors are a basis of ℝⁿ, it is enough to check one property. The fastest test is the determinant of the matrix with these columns: the vectors are a basis exactly when the determinant is not 0.
Some vector spaces have no finite basis. In the space of all polynomials, the powers 1, x, x², x³, and so on are independent, and no finite number of them can make all polynomials. Such a space is said to have infinite dimension. The space of all functions is another example.
The vector spaces of quantum mechanics are of both kinds. The spin of an electron is described in a space of dimension 2. The position of a particle is described in a space of infinite dimension. The ideas of basis and coordinates are used in both, and Unit 9 returns to them.
| Term | Meaning |
|---|---|
| Basis | A set of independent vectors that spans the space |
| Coordinates | The coefficients of a vector in a basis, which are unique |
| Dimension | The number of vectors in any basis of the space |
| Basis for a span | The columns of the original matrix that have pivots |
| Basis for a null space | The vectors that multiply the parameters in the general solution |
Work each problem on paper first. Then open the answer to check your work.
det 2113 = 6 − 1 = 5the determinant is not 0
Two independent vectors in a space of dimension 2 are a basis. So the answer is yes.
a + b = 5the first componentsa − b = −1the second components2a = 4add the two equationsa = 2divide both sides by 2b = 5 − 2 = 3substitute a = 2 into the first equation2(1, 1) + 3(1, −1) = (5, −1)the check
No. The third vector is the sum of the first two, so the vectors are dependent.
The unknowns y and z are free. Let y = s and z = t.
x = 2s − 3tthe equation, solved for x(x, y, z) = s(2, 1, 0) + t(−3, 0, 1)the general solution
A basis is (2, 1, 0), (−3, 0, 1), and the dimension is 2.
A diagonal 3 by 3 matrix is described by its three diagonal entries, so the dimension is 3.
A basis is the three matrices that have one diagonal entry equal to 1 and all other entries equal to 0.
a(1 + x) + b(1 − x) = (a + b) + (a − b)xcollect the constant terms and the terms with xa + b = 2the constant termsa − b = 3the coefficients of xa = 5/2add the two equations, then divide by 2b = 2 − 5/2 = −1/2substitute into the first equation
The coordinates a and b of a vector x in the basis b₁, b₂ satisfy ab₁ + bb₂ = x. This is a system of equations whose matrix has the basis vectors as its columns. The instruction np.column_stack builds that matrix, and np.linalg.solve solves the system. The code below uses the example of Part 2.
Python
The result is [2. 1.], so the coordinates are 2 and 1.
Now find the coordinates of (5, −1) in the same basis, as in Practice Problem 2.
Python
The reverse direction is a linear combination. The first coordinate is c[0] and the second is c[1], because Python counts from 0.
Python
The result is [3 1], the vector of Part 2.
In the next box, change the coordinates so that the code builds the vector (0, 4).
Python
Three vectors are a basis of ℝ³ when the determinant of the matrix with these columns is not 0. The code below tests the vectors of Practice Problem 3.
Python
The determinant is 0, so these vectors are not a basis.
Change one component of v₃ so that the three vectors are a basis of ℝ³.
Python
The dimension of the span of some vectors is the rank of the matrix that has them as columns. The next box has four vectors in ℝ⁴. Before you press Run, decide what the dimension of their span is, and replace the 0 in the line that starts with guess with your answer. The code prints your answer and then the rank.
Python
Practice Problem 4 found the basis (2, 1, 0), (−3, 0, 1) for the solutions of x − 2y + 3z = 0. The code below checks that both vectors are solutions and that they are independent. The @ sign multiplies a matrix by a vector.
Python
The first two results are [0], so both vectors are solutions. The rank is 2, so the two vectors are independent. The space of solutions has the dimension 2, so these two vectors are a basis.
This quiz has 5 questions on this topic. A question asks you either to choose one answer or to type numbers. The page grades your answers and explains each one. A number can be typed as a whole number, a decimal, a fraction such as 1/3, or a calculation such as sqrt(18)/2 or arccos(1/2). The page shows the value of a calculation next to the box. Angles in a calculation are in degrees. The Calculator button under each question opens a calculator. Your answers are saved in your browser, so they are still on the page when you come back to it.
Choose how your answers are checked
1. Which of these sets is a basis of ℝ²?
A basis of ℝ² has two independent vectors. The vectors (1, 2) and (2, 1) are independent, because the determinant 1 − 4 = −3 is not 0. In the first set one vector is a multiple of the other, the second set has three vectors, and the last set contains the zero vector.
2. Find the coordinates of (4, 2) in the basis (1, 1), (1, −1).
Solve a(1, 1) + b(1, −1) = (4, 2).a + b = 4the first componentsa − b = 2the second components2a = 6add the two equationsa = 3divide both sides by 2b = 4 − 3 = 1substitute a = 3 into the first equation
3. Find the dimension of the plane x + 2y − z = 0 in ℝ³.
The equation has one pivot and two free variables, so the plane has a basis of two vectors, such as (−2, 1, 0) and (1, 0, 1).
4. Find the dimension of the space of all 2 by 3 matrices.
A basis is the set of the six matrices that have one entry equal to 1 and the other entries equal to 0. A 2 by 3 matrix has six entries that can be chosen freely.
5. Find the dimension of the span of (1, 2, 3), (2, 4, 6), and (0, 1, 1).
The second vector is 2 times the first vector, so it adds nothing to the span. The vectors (1, 2, 3) and (0, 1, 1) are independent, so the span is a plane.