Tutorials › Linear Algebra › The Subspace Test

Vector Spaces and Subspaces · Tutorial 285 of 1000

The Subspace Test

Learn to prove that a nonempty subset is a subspace by checking addition and real scalar multiplication, and to identify exactly where the test fails.

Intermediate 9 min read

What You'll Learn

  • State the subspace test for a subset of a real vector space.
  • Prove why nonemptiness and the two closure conditions are sufficient.
  • Use scalar multiplication to establish the presence of zero and additive inverses.
  • Check a parameterized subset of \(\mathbb{R}^2\) for subspace closure.
  • Test a matrix subset and identify concrete failures of closure.

What the Subspace Test Checks

A subset of a vector space can use the same addition and scalar multiplication as the larger space without itself being a vector space. The subspace test gives a short way to decide when it does: check that the subset is nonempty, closed under addition, and closed under multiplication by real scalars. The reason these few checks suffice is that the other vector space rules are already true in the ambient space, while the two closure conditions ensure that the operations stay inside the subset.

Throughout this tutorial, \(V\) is a vector space over \(\mathbb{R}\), and \(S\) is a subset of \(V\). The operations on \(S\) are the ones inherited from \(V\): we do not define new addition or scalar multiplication. A subset is closed under addition if \(\mathbf{u}+\mathbf{v}\in S\) whenever \(\mathbf{u},\mathbf{v}\in S\). It is closed under real scalar multiplication if \(c\mathbf{u}\in S\) whenever \(c\in\mathbb{R}\) and \(\mathbf{u}\in S\).

Definition: A subset \(S\) of a real vector space \(V\) is a subspace of \(V\) if \(S\) is itself a vector space under the addition and scalar multiplication inherited from \(V\). In particular, a subspace must be nonempty.

The test applies to a subset of a vector space, not to an arbitrary collection with no specified ambient space or operations. Its nonempty condition also matters: the empty set satisfies both closure statements vacuously, because it contains no elements that could violate them, but it is not a vector space.

Why Scalar Closure Supplies Zero and Negatives

In a subspace, the zero vector and additive inverses must belong to the subset. In the subspace test, we do not need to check these separately: scalar closure supplies them once the subset is nonempty. The next lemma records the exact reasoning.

Lemma: Let \(S\) be a nonempty subset of a real vector space \(V\). If \(S\) is closed under real scalar multiplication, then \(\mathbf{0}\in S\), and for every \(\mathbf{u}\in S\), the additive inverse \(-\mathbf{u}\) also belongs to \(S\).

Proof. Since \(S\) is nonempty, choose \(\mathbf{v}\in S\). Scalar closure with scalar \(0\) gives \(0\mathbf{v}\in S\). In a vector space, \(0\mathbf{v}=\mathbf{0}\), so \(\mathbf{0}\in S\). Now take any \(\mathbf{u}\in S\). Scalar closure with scalar \(-1\) gives \((-1)\mathbf{u}\in S\), and the scalar multiplication axioms give \((-1)\mathbf{u}=-\mathbf{u}\). Hence \(-\mathbf{u}\in S\). \(\square\)

The vector space identities used here follow from the axioms in \(V\). For example, distributivity gives \(0\mathbf{v}=(0+0)\mathbf{v}=0\mathbf{v}+0\mathbf{v}\); cancellation in vector addition then gives \(0\mathbf{v}=\mathbf{0}\). Also, \((-1)\mathbf{u}+\mathbf{u}=((-1)+1)\mathbf{u}=0\mathbf{u}=\mathbf{0}\), so \((-1)\mathbf{u}\) is the additive inverse of \(\mathbf{u}\).

The Subspace Test, Proved

Theorem (Subspace Test): Let \(V\) be a vector space over \(\mathbb{R}\), and let \(S\subseteq V\). Then \(S\) is a subspace of \(V\) if and only if all three conditions hold:
  • \(S\) is nonempty;
  • \(\mathbf{u}+\mathbf{v}\in S\) for all \(\mathbf{u},\mathbf{v}\in S\);
  • \(c\mathbf{u}\in S\) for all \(c\in\mathbb{R}\) and \(\mathbf{u}\in S\).

Proof. First suppose that \(S\) is a subspace. As a vector space, \(S\) contains its zero vector, so it is nonempty. Its addition and scalar multiplication are inherited from \(V\) and have values in \(S\), which gives closure under addition and real scalar multiplication.

Conversely, suppose that \(S\) is nonempty and satisfies both closure conditions. By the lemma, \(\mathbf{0}\in S\) and every \(\mathbf{u}\in S\) has its additive inverse \(-\mathbf{u}\in S\). The addition and scalar multiplication operations take values in \(S\) by the two closure assumptions. The remaining vector space axioms hold because each is an equality involving elements of \(S\) and scalars in \(\mathbb{R}\), and the same equality already holds in \(V\). Thus \(S\), with the inherited operations, is a vector space. Therefore \(S\) is a subspace of \(V\). \(\square\)

This proof explains the practical method: show that a candidate is nonempty, then take arbitrary elements of it and check both closure conditions. To disprove that a set is a subspace, one failed condition is enough. A single pair whose sum leaves the set, or a single scalar multiple that leaves it, is a complete counterexample.

Applying the Test

Worked Example: A Line Through the Origin in \(\mathbb{R}^2\)

Let \(L=\{(t,-2t):t\in\mathbb{R}\}\). We check whether \(L\) is a subspace of \(\mathbb{R}^2\).

First, \(t=0\) gives \((0,-2\cdot0)=(0,0)\in L\), so \(L\) is nonempty. Take any two elements of \(L\), written \(\mathbf{u}=(s,-2s)\) and \(\mathbf{v}=(t,-2t)\). Their sum is

$$ \mathbf{u}+\mathbf{v} =(s+t,-2s-2t) =(s+t,-2(s+t)). $$

Since \(s+t\in\mathbb{R}\), this sum has the required form and belongs to \(L\). For any \(c\in\mathbb{R}\), scalar multiplication gives

$$ c\mathbf{u}=(cs,-2cs)=(cs,-2(cs)), $$

which also has the required form. Thus \(L\) is a subspace by the test. For a numerical check, \((1,-2)\) and \((3,-6)\) belong to \(L\); their sum \((4,-8)\) is \((t,-2t)\) with \(t=4\), and \(-2(1,-2)=(-2,4)\) is in \(L\) with \(t=-2\).

Worked Example: A Subspace of \(2\times2\) Matrices

Consider the subset \(M\) of \(\mathbb{R}^{2\times2}\) consisting of matrices of the form

$$ \mathbf{A}= \begin{bmatrix} a&b\\ -b&a \end{bmatrix}, \qquad a,b\in\mathbb{R}. $$

Taking \(a=b=0\) gives the zero matrix, so \(M\) is nonempty. Let \(\mathbf{A}\) have parameters \(a,b\), and let \(\mathbf{B}\in M\) have parameters \(d,e\). Entrywise addition gives

$$ \mathbf{A}+\mathbf{B} = \begin{bmatrix} a+d&b+e\\ -b-e&a+d \end{bmatrix}. $$

This is in \(M\), with parameters \(a+d\) and \(b+e\). For \(c\in\mathbb{R}\),

$$ c\mathbf{A} = \begin{bmatrix} ca&cb\\ -cb&ca \end{bmatrix}, $$

which is in \(M\), with parameters \(ca\) and \(cb\). Therefore \(M\) is a subspace. For instance, adding the matrices with parameters \((a,b)=(1,2)\) and \((d,e)=(-3,1)\) gives

$$ \begin{bmatrix}1&2\\-2&1\end{bmatrix} + \begin{bmatrix}-3&1\\-1&-3\end{bmatrix} = \begin{bmatrix}-2&3\\-3&-2\end{bmatrix}, $$

which has the defining form with parameters \((-2,3)\). Multiplying the first matrix by \(-2\) gives \(\begin{bmatrix}-2&-4\\4&-2\end{bmatrix}\), also of the required form.

Worked Example: An Affine Line That Fails the Test

Let \(A=\{(x,y)\in\mathbb{R}^2:x+y=1\}\). The point \((1,0)\) belongs to \(A\), so the set is nonempty. But scalar closure fails: multiplying this point by \(2\) gives

$$ 2(1,0)=(2,0), \qquad 2+0=2\ne1. $$

Thus \((2,0)\notin A\), and \(A\) is not a subspace. The zero vector also does not belong to \(A\), since \(0+0\ne1\), which independently rules out subspace status. The scalar-multiple calculation is already sufficient to apply the test.

Common Mistake: Checking Pieces Instead of the Whole Set

Suppose \(X\) is the union of the two coordinate axes in \(\mathbb{R}^2\): \(X=\{(x,0):x\in\mathbb{R}\}\cup\{(0,y):y\in\mathbb{R}\}\). A tempting but incorrect argument is that each axis is a subspace, so their union must be a subspace. The test requires closure for every pair of elements of the union, including one taken from each axis.

For a concrete failure, \((1,0)\in X\) and \((0,1)\in X\), but

$$ (1,0)+(0,1)=(1,1)\notin X. $$

The correction is to test the whole set, not just its pieces separately: this sum shows that \(X\) is not closed under addition, so it is not a subspace. By contrast, multiplying a point on either axis by any real scalar keeps it on that same axis. Checking only scalar multiplication would therefore miss the failure.

Using the Test Efficiently

For a candidate described by a formula or parameter, translate each condition of the test into a direct calculation. Start by finding one element, often the zero vector or zero matrix. Then represent arbitrary elements using the defining rule, add them, and check whether the result still satisfies that rule. Finally, multiply an arbitrary element by an arbitrary real scalar and check again. The word “arbitrary” matters: verifying closure for just one pair or one scalar does not establish closure for the whole set.

The test is also a way to organize a disproof. If nonemptiness fails, stop. If the set is nonempty, find a specific failure of addition or scalar multiplication. In the affine-line example, one scalar multiple was enough; in the union-of-axes example, a sum was enough. A failed check settles the question, whereas a successful check must cover all elements and all real scalars.

Check Your Understanding

For each candidate, use the subspace test and state which condition decides the result.

  1. Is \(\{(t,4t):t\in\mathbb{R}\}\) a subspace of \(\mathbb{R}^2\)? Show the general addition and scalar-multiplication checks.
  2. For \(S=\{(x,y)\in\mathbb{R}^2:x-y=0\}\), check nonemptiness and both closure conditions.
  3. Is \(\{(x,y)\in\mathbb{R}^2:x+y=3\}\) a subspace? Give a specific failed test.
  4. Let \(T\) be the set of diagonal \(2\times2\) real matrices. Check whether \(T\) is a subspace of \(\mathbb{R}^{2\times2}\).
  5. Give two vectors in the union of the coordinate axes whose sum is not in that union, and explain what the calculation shows.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon