# Section3.1Subspaces of \(\mathbb{R}^n\)¶ permalink

# SubsectionThe Assignment

- Read Chapter 3 section 1 of
*Strang*. - Read the following and complete the exercises below.

# SubsectionLearning Goals

Before class, a student should be able to:

- Identify the column space of a matrix.
- Decide if a set in \(\mathbb{R}^n\) is a subspace or not.

Some time after class, a student should be able to:

- Use the notion of column space to decide if a given linear system has a solution or not.

# SubsectionDiscussion: Vector Spaces and Subspaces

The key concepts in this section are those of a *vector space*
and of a *subspace*. The basic idea is that a vector space is
a kind of place where the basic operations involved in a linear
combination make sense. There is a set of rules for being a vector space,
but they are all aimed at the fact that there are two operations
(addition and scalar multiplication) and we can form linear combinations
with them that make sense.

The biggest thing is that we possibly enlarge the kinds of things we call “vectors.” To a professional mathematician, a vector is anything that is an element of some vector space under consideration. My favorites are things like this:

- The set \(M_{2,2}\) of \(2\times 2\) matrices is a vector space. But now the things we call vectors are actually matrices.
- The set \(\mathcal{C}(\mathbb{R})\) of continuous functions with domain and range both equal to the set of real numbers is a vector space. But now the things we call vectors are actually functions.
- The set \(\ell(\mathbb{R})\) of sequences \((x_1, x_2, x_3, x_4, \ldots)\) of real numbers is a vector space. But now the things we call vectors are actually whole infinite sequences.

In more advanced mathematics, vector spaces are extremely important. They show up everywhere. But for us, we will mostly stick to the family of vector spaces \(\mathbb{R}^n\). It will be much more important for us to understand subspaces.

The idea of a subspace is some subset, some part, of a vector space which is a vector space in its own right. The prototype is the \(xy\)-plane inside of \(\mathbb{R}^3\).

For now, the most important subspaces we see will be derived from
individual matrices. Our first example is the column space of a matrix
\(A\). If \(A\) is an \(m\times n\) matrix, then the column
space \(\mathrm{col}(A)\) of \(A\) is the collection of
\(n\)-vectors which can be expressed as linear combinations of the
columns of \(A\). This is our first exposure to the idea of a
*span*. The column space of \(A\) is the subspace of
\(\mathbb{R}\) spanned by the columns of \(A\).

# SubsectionSageMath and subspaces

SageMath allows you to construct different kinds of vector spaces. The most important is the standard vector space \(\mathbb{R}^n\).

This is like the `MatrixSpace` construction we have seen before.
`V` is now the collection of all vectors of size \(3\) with
rational numbers as entries.

More important for us is the fact that SageMath knows how to find the subspaces associated to matrices.

Note that SageMath gives information in terms of a basis. We will talk about this concept soon.

This last bit here is interesting. Our original matrix has size \(2\times 3\), so the columns are \(3\)-vectors. But this basis is displayed as a matrix where the columns are size \(2\). What is going on?

SageMath prefers to display vectors as rows! This is a big interal preference.
We just have to get over it. Well, we have to *remember it* and get over it.
To access the basis vectors and display them as columns,
we will use the following:

# SubsectionExercises

##### Task68

Find an example of a vector which is not in the column space of the matrix \begin{equation*} B = \begin{pmatrix} 3 & 2 \\ 6 & 4 \end{pmatrix}, \end{equation*} or explain why it is not possible.##### Task69

Let \(\mathcal{P}\) be the set of polynomials of degree 3 or less. Explain why \(\mathcal{P}\) is a vector space, or explain why it is not.##### Task70

Consider the vector space \(\mathbb{R}^2\). Explain why the following are not subspaces:- The unit circle.
- The line \(x+y = 4\).
- The union of lines \(2x+3y = 0\) and \(x-y=0\).
- The first quadrant where \(x\geq 0\) and \(y\geq 0\).