# SubsectionThe Assignment

• Read Strang chapter 3 section 5.
• Read the following and complete the exercises below.

# SubsectionLearning 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.

# SubsectionDiscussion: 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\})$. (This has to be the easiest possible notational choice ever.)

# SubsubsectionOther 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$.

# SubsubsectionTwo 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$.

Given a set of vectors $\{v_1, v_2, \ldots, v_k\}$ from $\mathbb{R}^n$:

• Form the $n\times k$ matrix $A = \left( \begin{smallmatrix} v_1 & v_2 & \dots & v_k\end{smallmatrix}\right)$.
• Put $A$ into reduced row echelon form $R = \mathrm{rref}(A)$. (Really, you only need to go to echelon form, here.)
• Read out pivot columns and free columns of $R$. 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\})$.

(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$:

• Form the $k\times n$ matrix $A = \left( \begin{smallmatrix} v_1^T \\ v_2^T \\ \vdots \\ v_k^T \end{smallmatrix}\right)$.
• Put $A$ into reduced row echelon form $R = \mathrm{rref}(A)$.
• 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\})$, but the resulting vectors \emph{probably won't come from your original set}.

# SubsectionSageMath and Bases

SageMath has several commands which are useful for dealing with the concpets of this section.

# SubsubsectionCommands 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.

# SubsubsectionThe 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)$.

# SubsubsectionSpaces 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}$.

Or we could do this in other ways.

# SubsectionExercises

Note: We may not present all of these in class.

Make an example of a vector $v \in \mathbb{R}^4$ so that the set \begin{equation*} \left\{ \begin{pmatrix} 1 \\ 2 \\ 3 \\ 4 \end{pmatrix}, \begin{pmatrix} 0 \\ 1 \\ 2 \\ 1 \end{pmatrix}, \begin{pmatrix} -2\\ 1 \\ 0 \\ -5 \end{pmatrix}, v \right\} \end{equation*} is a linearly independent set, or explain why it is impossible to find such an example. Is your resulting set a basis?
Make an example of a vector $w \in \mathbb{R}^3$ so that the set \begin{equation*} \left\{ \begin{pmatrix} 2 \\ 3 \\ 4 \end{pmatrix}, \begin{pmatrix} 0 \\ 1 \\ 1 \end{pmatrix}, \begin{pmatrix} -2\\ -4 \\ -5 \end{pmatrix}, w \right\} \end{equation*} is a spanning set, or explain why it is impossible to find such an example. Is your resulting set a basis?
(Strang 3.5.10) Find two independent vectors on the plane $x+2y-3z-t=0$ in $\mathbb{R}^4$. Then find three independent vectors on this plane. Why not four? Find a matrix for which this plane is the nullspace.
(Strang 3.5.21) Suppose that the columns of a $5 \times 5$ matrix $A$ are a basis for $\mathbb{R}^5$.
1. Explain why the equation $Ax = 0$ has only the solution $x=0$.
2. What fact about the column vectors guarantees that for any $b$ in $\mathbb{R}^5$ the equation $Ax =b$ is solvable?
Conclusion: $A$ is invertible. Its rank is $5$. Its rows are also a basis for $\mathbb{R}^5$.
(Strang 3.5.22) Suppose that $S$ is a $5$-dimensional subspace of $\mathbb{R}^6$. Determine if the following statements are true or false. If true, give an explanation for why it is true. If false, give a counterexample.
1. Every basis for $S$ can be extended to a basis for $\mathbb{R}^6$ by adding one more vector.
2. Every basis for $\mathbb{R}^6$ can be reduced to a basis for $S$ by removing one vector.
(Strang 3.5.26) Find a basis (and the dimension) for each of these subspaces of the vector space of $3\times 3$ matrices:
2. All symmetric matrices. ($A^T = A$)
3. All skew-symmetric matrices. ($A^T = -A$)
(Strang 3.5.35) Find a basis for the space of polynomials $p(x)$ of degree less than or equal to $3$. Find a basis for the subspace with $p(1)=0$.