Krista King Math | Online math help

View Original

Definition of a linear subspace, with several examples

What is the definition of a linear subspace?

We’re already familiar with two-dimensional space, ???\mathbb{R}^2???, as the ???xy???-coordinate plane. We can also think of ???\mathbb{R}^2??? as the vector space containing all possible two-dimensional vectors, ???\vec{v}=(x,y)???.

And we know about three-dimensional space, ???\mathbb{R}^3???, which is ???xyz???-space. We can think of ???\mathbb{R}^3??? as the vector space containing all possible three-dimensional vectors, ???\vec{v}=(x,y,z)???.

And even though it’s harder (if not impossible) to visualize, we can imagine that there could be higher-dimensional spaces ???\mathbb{R}^4???, ???\mathbb{R}^5???, etc., up to any dimension ???\mathbb{R}^n???. The vector space ???\mathbb{R}^4??? contains four-dimensional vectors, ???\mathbb{R}^5??? contains five-dimensional vectors, and ???\mathbb{R}^n??? contains ???n???-dimensional vectors.

Definition of a subspace

Notice how we’ve referred to each of these (???\mathbb{R}^2???, ???\mathbb{R}^3???, ... ???\mathbb{R}^n???) as a “space.” Well, within these spaces, we can define subspaces. To give an example, a subspace (or linear subspace) of ???\mathbb{R}^2??? is a set of two-dimensional vectors within ???\mathbb{R}^2???, where the set meets three specific conditions:

1. The set includes the zero vector.

2. The set is closed under scalar multiplication.

3. The set is closed under addition.

A vector set is not a subspace unless it meets these three requirements, so let’s talk about each one in a little more detail.

1. First, the set has to include the zero vector. For example, if we’re talking about a vector set ???V??? in ???\mathbb{R}^2???, ???\vec{v}=(0,0)??? needs to be a member of the set in order for the set to be a subspace. Or if we’re talking about a vector set ???V??? in ???\mathbb{R}^3???, ???\vec{v}=(0,0,0)??? needs to be a member of the set in order for the set to be a subspace.

2. Second, the set has to be closed under scalar multiplication. This means that, for any ???\vec{v}??? in the vector set ???V???, ???c\vec{v}??? must also be in ???V???. In other words, we need to be able to take any member ???\vec{v}??? of the set ???V???, multiply it by any real-number scalar ???c???, and end up with a resulting vector ???c\vec{v}??? that’s still in ???V???.

In contrast, if you can choose a member of ???V???, multiply it by a real number scalar, and end up with a vector outside of ???V???, then by definition the set ???V??? is not closed under scalar multiplication, and therefore ???V??? is not a subspace.

3. Third, the set has to be closed under addition. This means that, if ???\vec{s}??? and ???\vec{t}??? are both vectors in the set ???V???, then the vector ???\vec{s}+\vec{t}??? must also be in ???V???. In other words, we need to be able to take any two members ???\vec{s}??? and ???\vec{t}??? of the set ???V???, add them together, and end up with a resulting vector ???\vec{s}+\vec{t}??? that’s still in ???V???. (Keep in mind that what we’re really saying here is that any linear combination of the members of ???V??? will also be in ???V???.)

In contrast, if you can choose any two members of ???V???, add them together, and end up with a vector outside of ???V???, then by definition the set ???V??? is not closed under addition.

To summarize, if the vector set ???V??? includes the zero vector, is closed under scalar multiplication, and is closed under addition, then ???V??? is a subspace.

Keep in mind that the first condition, that a subspace must include the zero vector, is logically already included as part of the second condition, that a subspace is closed under multiplication.

That’s because we’re allowed to choose any scalar ???c???, and ???c\vec{v}??? must also still be in ???V???. Which means we’re allowed to choose ???c=0 ???, in which case ???c\vec{v}??? will be the zero vector. Therefore, if we can show that the subspace is closed under scalar multiplication, then automatically we know that the subspace includes the zero vector.

Which means we can actually simplify the definition, and say that a vector set ???V??? is a subspace when

1. the set is closed under scalar multiplication, and

2. the set is closed under addition.

How to show that a vector set is technically a subspace


Take the course

Want to learn more about Linear Algebra? I have a step-by-step course for that. :)


Showing that the set is NOT a subspace

Example

Show that the set is not a subspace of ???\mathbb{R}^2???.

???M=\left\{\begin{bmatrix}x\\y\end{bmatrix}\in \mathbb{R}^2\ \big|\ y\le 0\right\}???

Before we talk about why ???M??? is not a subspace, let’s talk about how ???M??? is defined, since we haven’t used this kind of notation very much at this point.

The notation tells us that the set ???M??? is all of the two-dimensional vectors ???(x,y)??? that are in the plane ???\mathbb{R}^2???, where the value of ???y??? must be ???y\le0???. If we show this in the ???\mathbb{R}^2??? plane, ???y\le0??? constrains us to the third and fourth quadrants, so the set ???M??? will include all the two-dimensional vectors which are contained in the shaded quadrants:

If we’re required to stay in these lower two quadrants, then ???x??? can be any value (we can move horizontally along the ???x???-axis in either direction as far as we’d like), but ???y??? must be negative to put us in the third or fourth quadrant.

If the set ???M??? is going to be a subspace, then we know it includes the zero vector, is closed under scalar multiplication, and is closed under addition. We need to test to see if all three of these are true.

First, we can say ???M??? does include the zero vector. That’s because there are no restrictions on ???x???, which means it can take any value, including ???0???, and the restriction on ???y??? tells us that ???y??? can be equal to ???0???. Since both ???x??? and ???y??? can be ???0???, the vector ???\vec{m}=(0,0)??? is a member of ???M???, so ???M??? includes the zero vector.

Second, let’s check whether ???M??? is closed under addition. Let’s take two theoretical vectors in ???M???,

???m_1=\begin{bmatrix}x_1\\ y_1\end{bmatrix}??? and ???m_2=\begin{bmatrix}x_2\\ y_2\end{bmatrix}???

and find their sum.

???\vec{m}_1+\vec{m}_2=\begin{bmatrix}x_1\\ y_1\end{bmatrix}+\begin{bmatrix}x_2\\ y_2\end{bmatrix}???

???\vec{m}_1+\vec{m}_2=\begin{bmatrix}x_1+x_2\\ y_1+y_2\end{bmatrix}???

Because ???x_1??? and ???x_2??? can both be either positive or negative, the sum ???x_1+x_2??? can be either positive or negative. But because ???y_1??? and ???y_2??? must both be negative, the sum ???y_1+y_2??? can only be negative.

A vector with a negative ???x_1+x_2??? and a negative ???y_1+y_2??? will lie in the third quadrant, and a vector with a positive ???x_1+x_2??? and a negative ???y_1+y_2??? will lie in the fourth quadrant. So the sum ???\vec{m}_1+\vec{m}_2??? still falls within the original set ???M???, which means the set is closed under addition.

Third, and finally, we need to see if ???M??? is closed under scalar multiplication. Given a vector in ???M??? like

???\vec{m}=\begin{bmatrix}2\\ -3\end{bmatrix}???

we need to be able to multiply it by any real number scalar and find a resulting vector that’s still inside ???M???. Multiplying ???\vec{m}=(2,-3)??? by any positive scalar will result in a vector that’s still in ???M???. That’s because ???x??? will stay positive and ???y??? will stay negative, which keeps us in the fourth quadrant.

But multiplying ???\vec{m}??? by any negative scalar will result in a vector outside of ???M???! That’s because ???x??? will become negative (which isn’t a problem), but ???y??? will become positive, which is problem, since a positive ???y???-value will put us outside of the third and fourth quadrants where ???M??? is defined. When ???y??? becomes positive, the resulting vector lies in either the first or second quadrant, both of which fall outside the set ???M???.

Therefore, while ???M??? contains the zero vector and is closed under addition, it is not closed under scalar multiplication. And because the set isn’t closed under scalar multiplication, the set ???M??? is not a subspace of two-dimensional vector space, ???\mathbb{R}^2???.


Let’s look at another example where the set isn’t a subspace.


Example

Show that the set is not a subspace of ???\mathbb{R}^2???.

???V=\left\{\begin{bmatrix}x\\ y\end{bmatrix}\in \mathbb{R}^2\ \big|\ xy=0\right\}???

The vector set ???V??? is defined as all the vectors in ???\mathbb{R}^2??? for which the product of the vector components ???x??? and ???y??? is ???0???. In other words, a vector ???v_1=(1,0)??? is in ???V???, because the product of ???v_1???’s components is ???0???, ???(1)(0)=0???.

Let’s try to figure out whether the set is closed under addition. Both ???v_1??? and ???v_2??? are in ???V???.

???v_1=\begin{bmatrix}1\\ 0\end{bmatrix}??? and ???v_2=\begin{bmatrix}0\\ 1\end{bmatrix}???

If we find their sum, we get

???v_1+v_2=\begin{bmatrix}1\\ 0\end{bmatrix}+\begin{bmatrix}0\\ 1\end{bmatrix}???

???v_1+v_2=\begin{bmatrix}1+0\\ 0+1\end{bmatrix}???

???v_1+v_2=\begin{bmatrix}1\\ 1\end{bmatrix}???

The components of ???v_1+v_2=(1,1)??? do not have a product of ???0???, because the product of its components are ???(1)(1)=1???. Therefore, ???v_1??? and ???v_2??? are in ???V???, but ???v_1+v_2??? is not in ???V???, which proves that ???V??? is not closed under addition, which means that ???V??? is not a subspace.


Possible subspaces

In the last example we were able to show that the vector set ???M??? is not a subspace. In fact, there are three possible subspaces of ???\mathbb{R}^2???.

1. ???\mathbb{R}^2??? is a subspace of ???\mathbb{R}^2???.

2. Any line through the origin ???(0,0)??? is a subspace of ???\mathbb{R}^2???.

3. The zero vector ???\vec{O}=(0,0)??? is a subspace of ???\mathbb{R}^2???.

Similarly, there are four possible subspaces of ???\mathbb{R}^3???.

1. ???\mathbb{R}^3??? is a subspace of ???\mathbb{R}^3???.

2. Any line through the origin ???(0,0,0)??? is a subspace of ???\mathbb{R}^3???.

3. Any plane through the origin ???(0,0,0)??? is a subspace of ???\mathbb{R}^3???.

4. The zero vector ???\vec{O}=(0,0,0)??? is a subspace of ???\mathbb{R}^3???.

And we could extrapolate this pattern to get the possible subspaces of ???\mathbb{R}^n???, as well.


Get access to the complete Linear Algebra course