Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Test Whether a Set Is a Subspace

A subset of a vector space is a subspace when it contains the zero vector and stays closed under the two operations. Prove all three with general vectors, or break one with a single concrete counterexample.

Recognize the task

A set described by a condition inside a known space: {(x,y,z):x−2y+z=0}\{(x, y, z) : x - 2y + z = 0\}, {(x,y):y=2x+1}\{(x, y) : y = 2x + 1\}, {p∈P2:p(1)=0}\{p \in P_2 : p(1) = 0\}, the 2×22 \times 2 matrices with trace 00. Test: is the condition a homogeneous linear equation (no constant term, no powers, no products of unknowns)? Then it is almost always a subspace.
Subspaces are defined in the subspaces lesson, and the test is stated in The Subspace Test.

Ways to do it

Three conditionsstandard
0∈W,u+v∈W,c v∈W\mathbf{0} \in W, \quad \mathbf{u} + \mathbf{v} \in W, \quad c\,\mathbf{v} \in W
The subspace test: check each condition for arbitrary u,v∈W\mathbf{u}, \mathbf{v} \in W and every scalar cc.
One combined conditionshorter proof
u,v∈W ⇒ c u+d v∈W\mathbf{u}, \mathbf{v} \in W \ \Rightarrow\ c\,\mathbf{u} + d\,\mathbf{v} \in W
The combined test merges both closures into one check of a linear combination.
Recognize a span or null spaceno checking
W=Span⁡{v1,…,vk} or W=Nul⁡(A)W = \operatorname{Span}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} \ \text{or}\ W = \operatorname{Nul}(A)
A span is always a subspace (the smallest one containing the vectors), and so is the solution set of Ax=0A\mathbf{x} = \mathbf{0}.

Steps

StepOn W={(x,y,z):x−2y+z=0}W = \{(x, y, z) : x - 2y + z = 0\}
1Check the zero vector. If 0\mathbf{0} fails the condition, stop: WW is not a subspace.0−2⋅0+0=00 - 2 \cdot 0 + 0 = 0 ✓
2Take two general elements of W. Use letters, not numbers, and write down the condition each one satisfies.u1−2u2+u3=0u_1 - 2u_2 + u_3 = 0,  v1−2v2+v3=0\ v_1 - 2v_2 + v_3 = 0
3Check closure under addition. Put u+v\mathbf{u} + \mathbf{v} into the condition and regroup.(u1+v1)−2(u2+v2)+(u3+v3)=0+0=0(u_1 + v_1) - 2(u_2 + v_2) + (u_3 + v_3) = 0 + 0 = 0 ✓
4Check closure under scalar multiplication. Use an arbitrary scalar cc, including negative values and 00.cu1−2cu2+cu3=c⋅0=0cu_1 - 2cu_2 + cu_3 = c \cdot 0 = 0 ✓
5Conclude, or give a counterexample. All three pass: subspace. One fails: show one specific vector (or pair) that breaks it.WW is a subspace of R3\mathbb{R}^3 (a plane through the origin)

Worked examples

Example 1 · a line that misses the origin

zero vector fails
W={(x,y):y=2x+1}W = \{(x, y) : y = 2x + 1\}
constant term +1+1
(0,0)(0, 0):  0≠2⋅0+1\ 0 \neq 2 \cdot 0 + 1
zero vector not in W
WW is not a subspace
one failure is enough

Example 2 · two quadrants

addition fails
W={(x,y):xy≥0}W = \{(x, y) : xy \ge 0\} contains (0,0)(0, 0)
zero test passes
(1,0)∈W(1, 0) \in W, (0,−1)∈W(0, -1) \in W, sum (1,−1)(1, -1)
both products are 00
1⋅(−1)=−1<01 \cdot (-1) = -1 < 0: not closed, not a subspace
concrete counterexample

Example 3 · polynomials with a root at 1

abstract space
W={p∈P2:p(1)=0}W = \{p \in P_2 : p(1) = 0\}; zero polynomial: 0(1)=00(1) = 0
zero test passes
(p+q)(1)=p(1)+q(1)=0+0=0(p + q)(1) = p(1) + q(1) = 0 + 0 = 0
closed under addition
(cp)(1)=c⋅p(1)=0(cp)(1) = c \cdot p(1) = 0, so WW is a subspace
closed under scaling
See which sets in the plane are closed under combinations in the span and independence visualizer.

See it happen

In R2\mathbb{R}^2 and R3\mathbb{R}^3 the subspaces are easy to picture: the origin alone, lines through the origin, planes through the origin, and the whole space. Anything that misses the origin, has an edge, or bends fails, because adding two of its vectors or stretching one pushes you outside it.

Common mistakes

Stopping after the zero vector

✗ {(x,y):x≥0}\{(x, y) : x \ge 0\} contains (0,0)(0, 0), so it is a subspace
✓ −1⋅(1,0)=(−1,0)-1 \cdot (1, 0) = (-1, 0) leaves the set; scalar closure fails
Passing the zero test proves nothing on its own; failing it proves the set is not a subspace.

Proving closure with one example

✗ (1,1,1)+(2,1,0)(1, 1, 1) + (2, 1, 0) stays in WW, so WW is closed
✓ closure needs arbitrary u,v\mathbf{u}, \mathbf{v}; a single example only disproves

Missing a nonlinear condition

✗ {(x,y):y=x2}\{(x, y) : y = x^2\} contains (0,0)(0, 0) and looks fine
✓ (1,1)(1, 1) is in it but 2(1,1)=(2,2)2(1, 1) = (2, 2) is not, since 2≠42 \neq 4

Checking only positive scalars

✗ the first quadrant is closed under c vc\,\mathbf{v} for c=2,3,…c = 2, 3, \ldots
✓ cc ranges over all real numbers; c=−1c = -1 breaks it