Mathwords logoMathwords

Subspace — Definition & Examples

A subspace is a smaller vector space sitting inside a larger one. It is a collection of vectors that contains the zero vector and stays closed when you add vectors or scale them. Familiar examples are a line or a plane through the origin in R3\mathbb{R}^3.

Let VV be a vector space over a field FF (usually R\mathbb{R}). A subset W⊆VW \subseteq V is a (linear) subspace of VV if WW is itself a vector space under the addition and scalar multiplication inherited from VV. Equivalently, WW is a subspace if and only if (1) 0∈W\mathbf{0} \in W, (2) u+v∈W\mathbf{u} + \mathbf{v} \in W for all u,v∈W\mathbf{u}, \mathbf{v} \in W, and (3) cu∈Wc\mathbf{u} \in W for all u∈W\mathbf{u} \in W and all scalars c∈Fc \in F.

Key Formula

0∈W,u,v∈W  ⇒  u+v∈W,u∈W,  c∈R  ⇒  c u∈W\mathbf{0} \in W, \qquad \mathbf{u}, \mathbf{v} \in W \;\Rightarrow\; \mathbf{u} + \mathbf{v} \in W, \qquad \mathbf{u} \in W,\; c \in \mathbb{R} \;\Rightarrow\; c\,\mathbf{u} \in W
Where:
  • WW = The subset being tested, contained in a vector space V
  • 0\mathbf{0} = The zero vector of V
  • u,v\mathbf{u}, \mathbf{v} = Arbitrary vectors in W
  • cc = Any real scalar

How It Works

To decide whether a set WW is a subspace, you run the subspace test. First, check that the zero vector is in WW. If it is not, you can stop, because WW is not a subspace. If it is, take two arbitrary vectors in WW and show that their sum is also in WW. Then show that any scalar multiple of an arbitrary vector in WW is in WW. You do not need to recheck the other vector space axioms, such as associativity, because WW inherits them from VV.

Worked Example

Problem: Show that W={(x,y,z)∈R3:x+2y−z=0}W = \{(x, y, z) \in \mathbb{R}^3 : x + 2y - z = 0\} is a subspace of R3\mathbb{R}^3. Then confirm the result with the vectors u=(1,0,1)\mathbf{u} = (1, 0, 1) and v=(0,1,2)\mathbf{v} = (0, 1, 2).
Step 1: Check the zero vector. Substitute (0,0,0)(0, 0, 0) into the defining equation. The equation holds, so 0∈W\mathbf{0} \in W.
0+2(0)−0=00 + 2(0) - 0 = 0
Step 2: Check closure under addition. Let u=(u1,u2,u3)\mathbf{u} = (u_1, u_2, u_3) and v=(v1,v2,v3)\mathbf{v} = (v_1, v_2, v_3) be arbitrary vectors in WW. Regroup the left side for u+v\mathbf{u} + \mathbf{v}. Each group equals 0, so u+v∈W\mathbf{u} + \mathbf{v} \in W.
(u1+v1)+2(u2+v2)−(u3+v3)=(u1+2u2−u3)+(v1+2v2−v3)=0+0=0(u_1+v_1) + 2(u_2+v_2) - (u_3+v_3) = (u_1 + 2u_2 - u_3) + (v_1 + 2v_2 - v_3) = 0 + 0 = 0
Step 3: Check closure under scalar multiplication. For any scalar cc, factor out cc. The result is c⋅0=0c \cdot 0 = 0, so cu∈Wc\mathbf{u} \in W.
cu1+2(cu2)−cu3=c(u1+2u2−u3)=c⋅0=0cu_1 + 2(cu_2) - cu_3 = c(u_1 + 2u_2 - u_3) = c \cdot 0 = 0
Step 4: Confirm with numbers. Both (1,0,1)(1,0,1) and (0,1,2)(0,1,2) satisfy the equation. Their sum (1,1,3)(1,1,3) and the multiple 5u=(5,0,5)5\mathbf{u} = (5,0,5) satisfy it as well. These checks illustrate the proof but do not replace it.
1+2(1)−3=0,5+2(0)−5=01 + 2(1) - 3 = 0, \qquad 5 + 2(0) - 5 = 0
Answer: WW contains the zero vector and is closed under addition and scalar multiplication, so WW is a subspace of R3\mathbb{R}^3. Geometrically, it is a plane through the origin.

Another Example

Problem: Is the first quadrant Q={(x,y)∈R2:x≥0, y≥0}Q = \{(x, y) \in \mathbb{R}^2 : x \ge 0,\ y \ge 0\} a subspace of R2\mathbb{R}^2?
Step 1: The zero vector (0,0)(0, 0) satisfies both inequalities, so 0∈Q\mathbf{0} \in Q.
Step 2: Adding two vectors with nonnegative entries gives nonnegative entries, so QQ is closed under addition.
Step 3: Test scalar multiplication with c=−1c = -1 and (1,2)∈Q(1, 2) \in Q. The result has negative entries, so it lies outside QQ.
−1⋅(1,2)=(−1,−2)-1 \cdot (1, 2) = (-1, -2)
Answer: No. QQ fails closure under scalar multiplication, so it is not a subspace.

Why It Matters

Subspaces, such as the column space and null space of a matrix, are central ideas in a first linear algebra course. The column space, null space, row space, and eigenspaces of a matrix are all subspaces, and the rank-nullity theorem relates their dimensions. In data science, principal component analysis projects data onto a low-dimensional subspace that captures most of the variation.

Common Mistakes

Mistake: Calling a line or plane a subspace even when it does not pass through the origin, such as the line y=2x+1y = 2x + 1.
Correction: Every subspace must contain the zero vector. Because (0,0)(0,0) does not satisfy y=2x+1y = 2x + 1, that line is not a subspace. Check the zero vector first, since it is the fastest way to rule a set out.
Mistake: Checking closure with a few specific vectors and concluding the set is a subspace.
Correction: Numerical examples can disprove closure, but they cannot prove it. To prove closure, use arbitrary vectors such as (u1,u2,u3)(u_1, u_2, u_3) and an arbitrary scalar cc, as in Steps 2 and 3.

Related Terms

  • Column Space — The span of a matrix's columns, a key subspace
  • Vector Space — Parent concept that a subspace sits inside
  • Zero Vector — Must belong to every subspace as a requirement
  • Null Space — Key example of a subspace from a matrix
  • Span — Every span is a subspace; spans build subspaces