Section 3.6 Bases
Subsection 3.6.1 The Assignment
- Read Strang chapter 3 section 5.
- Read the following and complete the exercises below.
Subsection 3.6.2 Learning Goals
Before class, a student should be able to:
- Use the row space algorithm to decide if a set of vectors is linearly independent or linearly dependent.
- Use the column space algorithm to decide if a set of vectors is linearly independent or linearly dependent
- Compute the dimension of a subspace.
Sometime after class, a student should be able to:
- Explain the connection between a set of vectors being linearly independent, a spanning set, and a basis.
Subsection 3.6.3 Discussion: Linear Independence, Spanning, Basis, and Dimension
The purpose of this lesson is to introduce specific terms for several concepts we have been dancing around. This is a spot that sometimes gives students difficulty because they are unused to the way mathematicians talk. So, here is a big warning:
“When I use a word,” Humpty Dumpty said in rather a scornful tone, “it means just what I choose it to mean -- neither more nor less.”
--Through the Looking Glass, Lewis Carroll
That is the essence of it. We have several new words, and they will mean exactly what we declare them to mean, no more, no less.
What are the new terms?
- A set \(\{v_1, v_2, \ldots, v_k\}\) of vectors is linearly independent, or linearly dependent.
- A set of vectors spans a vector space or a subspace.
- A set of vectors is a basis or not.
- The dimension of a vector space, or of a vector subspace.
You should take away from this reading what those four terms are, how to check them, and some examples and non-examples.
A bit of notation: If we have a set \(\{ v_1, v_2, \dots, v_k\}\) of vectors in some vector space, then we denote the subspace which they span by \(\mathrm{span}(\{v_1, v_2, \ldots, v_k\})\text{.}\) (This has to be the easiest possible notational choice ever.)
Subsubsection 3.6.3.1 Other Vector Spaces
Once you understand these terms as they apply to the Euclidean spaces \(\mathbb{R}^n\) and their subspaces (especially those associated to matrices), you should pause to admire your achievement.
But next, realize that those terms apply generally to all sorts of vector spaces! Can you make examples and non-examples in some of these other situtations?
- The set \(\mathcal{P}_3\) of polynomials in \(x\) of degree no more than 3?
- The set \(M_{m,n}\) of \(m\times n\) matrices.
- The set \(\mathcal{C}(\mathbb{R})\) of continuous functions.
- The set of all functions which are solutions to the differential equation \(y'' = y\text{.}\)
Subsubsection 3.6.3.2 Two Methods of Sorting out Linear Independence
We have enough information to collect two ways to answer the question: “Is this set linearly independent?” Well, at least when working with vectors in some Euclidean space \(\mathbb{R}^n\text{.}\)
Given a set of vectors \(\{v_1, v_2, \ldots, v_k\}\) from \(\mathbb{R}^n\text{:}\)
- Form the \(n\times k\) matrix \(A = \left( \begin{smallmatrix} v_1 & v_2 & \dots & v_k\end{smallmatrix}\right)\text{.}\)
- Put \(A\) into reduced row echelon form \(R = \mathrm{rref}(A)\text{.}\) (Really, you only need to go to echelon form, here.)
- Read out pivot columns and free columns of \(R\text{.}\) Those columns of \(A\) which are free columns are linear combinations of previous columns to the left! So, if any column of \(R\) (and \(A\)) is a free columns, the set of vectors is linearly dependent. If all of the columns of \(R\) (and \(A\)) are pivot columns, then the set is linearly independent.
This method is particularly good for identifying which subset of our original set of vectors would form a basis of the vector subspace \(\mathrm{span}(\{v_1, v_2, \ldots, v_k\})\text{.}\)
(We will see the reason for the name soon.) Given a set of vectors \(\{v_1, v_2, \ldots, v_k\}\) from \(\mathbb{R}^n\text{:}\)
- Form the \(k\times n\) matrix \(A = \left( \begin{smallmatrix} v_1^T \\ v_2^T \\ \vdots \\ v_k^T \end{smallmatrix}\right)\text{.}\)
- Put \(A\) into reduced row echelon form \(R = \mathrm{rref}(A)\text{.}\)
- The rows of \(R\) will contain a basis for the vector subspace \(\mathrm{span}(\{v_1, v_2, \ldots, v_k\})\) (written as rows instead of columns, of course). If \(R\) has any zero rows, the original set was linearly dependent, otherwise it was linearly independent.
This method is good at picking out a simple basis of the vector subspace \(\mathrm{span}(\{v_1, v_2, \ldots, v_k\})\text{,}\) but the resulting vectors \emph{probably won't come from your original set}.
Subsection 3.6.4 SageMath and Bases
SageMath has several commands which are useful for dealing with the concpets of this section.
Subsubsection 3.6.4.1 Commands for span, dimension, and basis
This first command will construct a vector subspace of \(3\)-space which is spanned by the two vectors we pass in as arguments.
Note that SageMath already gives us some information:
- dimension
- a basis
SageMath has chosen its preferred basis, as usual.
Subsubsection 3.6.4.2 The Algorithms for Checking Linear Independence
SageMath does not have built-in commands with names for checking linear independence or linear dependence. Instead, you have to just use the algorithms.
(Where have we seen that before?) From this, it is clear that \(\left\{ v_1, v_2 \right\}\) is linearly dependent because both rows have pivots.
We work much the same way here.
This tells us that our first two columns are pivot columns, so we should keep those as part of our basis for \(\mathrm{span}\left(v_1, v_2\right)\text{.}\)
Subsubsection 3.6.4.3 Spaces Associated to a Matrix
SageMath knows about the column space and row space associated to a matrix. For this next example, we will work over the ring AA of “algebraic numbers”, so we can include \(\sqrt{2}\text{.}\)
Or we could do this in other ways.
Subsection 3.6.5 Exercises
Note: We may not present all of these in class.
(a)
Make an example of a vector \(v \in \mathbb{R}^4\) so that the set(b)
Make an example of a vector \(w \in \mathbb{R}^3\) so that the set(c)
(Strang 3.5.10) Find two independent vectors on the plane \(x+2y-3z-t=0\) in \(\mathbb{R}^4\text{.}\) Then find three independent vectors on this plane. Why not four? Find a matrix for which this plane is the nullspace.(d)
(Strang 3.5.21) Suppose that the columns of a \(5 \times 5 \) matrix \(A\) are a basis for \(\mathbb{R}^5\text{.}\)- Explain why the equation \(Ax = 0\) has only the solution \(x=0\text{.}\)
- What fact about the column vectors guarantees that for any \(b\) in \(\mathbb{R}^5\) the equation \(Ax =b\) is solvable?
(e)
(Strang 3.5.22) Suppose that \(S\) is a \(5\)-dimensional subspace of \(\mathbb{R}^6\text{.}\) Determine if the following statements are true or false. If true, give an explanation for why it is true. If false, give a counterexample.- Every basis for \(S\) can be extended to a basis for \(\mathbb{R}^6\) by adding one more vector.
- Every basis for \(\mathbb{R}^6\) can be reduced to a basis for \(S\) by removing one vector.
(f)
(Strang 3.5.26) Find a basis (and the dimension) for each of these subspaces of the vector space of \(3\times 3\) matrices:- All diagonal matrices.
- All symmetric matrices. (\(A^T = A\))
- All skew-symmetric matrices. (\(A^T = -A\))