Linear Algebra • Vector Spaces & Subspaces

Subspaces & Tests — Subspaces and Subspace Tests

Learn how to identify special sets of vectors that follow the same rules as the bigger space they live inside.

Linear Algebra emblem with a matrix grid, a variable, and three-dimensional axes.
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Historical Context & Motivation

Mathematicians have always looked for patterns inside bigger structures. In the 1800s and 1900s, several brilliant thinkers began to notice that certain collections of numbers, arrows, or functions behaved the same way as the larger collections they came from. This idea — that a smaller set can follow all the same rules as a bigger one — became the concept of a subspace. Understanding subspaces helps us break complicated problems into simpler pieces, which is one of the most powerful tricks in all of mathematics.

1844 • Grassmann's Extension Theory

Hermann Grassmann published ideas about collections of quantities that could be added together and scaled. His work planted the seeds for what we now call vector spaces.

1888 • Peano's Axioms for Vector Spaces

Giuseppe Peano wrote down a clear list of rules that a set of objects must follow to be called a vector space. This gave mathematicians a precise checklist to work with.

1900s • Rise of Abstract Algebra

Mathematicians like Emmy Noether and others pushed the idea that studying sub-structures (like subspaces) inside bigger structures is the key to understanding algebra.

1940s–60s • Linear Algebra Becomes Essential

With the invention of computers, linear algebra became a cornerstone of science and engineering. Subspace tests became everyday tools for checking whether a set of solutions formed a nice, well-behaved collection.

The central question this lesson answers is: given a set of vectors living inside a larger vector space, how do we quickly tell whether that set is a subspace? Instead of checking every single rule for a vector space from scratch, mathematicians developed a shortcut — the subspace test — that makes the job much faster.

SECTION 2

Core Principles & Definitions

Before we can talk about subspaces, we need to understand the playground they live in. A vector space is a collection of objects (called vectors) that you can add together and multiply by numbers (called scalars), and the results always stay inside the collection. Think of it like a club where every member follows the same set of rules.

1

Vector Space

A set of vectors along with rules for adding them and multiplying them by scalars. The results must always stay inside the set. Example: all arrows in a flat plane (ℝ²).
2

Subspace

A smaller set inside a vector space that is itself a vector space, using the same addition and scalar multiplication rules. It's like a club within a club.
3

Closure under Addition

If you pick any two vectors from the set and add them, the result is still in the set. Nothing 'leaks out' when you add.
4

Closure under Scalar Multiplication

If you pick any vector from the set and multiply it by any number, the result stays in the set. Stretching or shrinking never kicks you out.
5

Contains the Zero Vector

The set must include the zero vector (the 'do nothing' vector). This is always the first thing to check — if the zero vector is missing, it's not a subspace.
✦

KEY TAKEAWAY

Think of a subspace like a team inside a sports league. The team uses the same rules as the league (same scoring, same field). But not every random group of players forms a real team. The group has to be self-contained — when its members practice together (add) or a coach adjusts their effort (scalar multiply), they still belong to the team. And every team needs a bench (the zero vector) even if nobody's playing.

SECTION 3

Visual Explanation

Let's visualize what subspaces look like inside ℝ² (the regular x-y plane) and ℝ³ (three-dimensional space). In ℝ², the possible subspaces are: just the origin (the zero vector alone), any line through the origin, or the entire plane itself. In ℝ³, you get the origin, any line through the origin, any flat plane through the origin, or all of ℝ³.

Subspaces of ℝ² (the x-y Plane)Trivial subspace:just {0}0line through originv−vLine subspace(through origin ✓)Whole plane ℝ²(subspace of itself)Notice: every subspace passes through the origin. A line that misses the origin is NOT a subspace.
The three types of subspaces in ℝ²: the zero vector alone (left), any line through the origin (center), and the entire plane (right). Notice that the line through the origin contains the vector v and its opposite −v, confirming closure under scalar multiplication.

The key visual pattern is that every subspace must pass through the origin. If you shift a line so it no longer goes through the point (0, 0), it stops being a subspace. This is because the zero vector must always be included. In the diagram above, the center panel shows a line through the origin — you can add any two vectors on that line and the sum stays on the line, and you can stretch any vector by any scalar and it stays on the line.

SECTION 4

The Subspace Test — Mathematical Framework

A full vector space must satisfy about ten different rules (called axioms). Luckily, if a set W is already sitting inside a known vector space V, most of those rules are inherited for free. We only need to check three conditions. This shortcut is called the Subspace Test (sometimes called the "three-condition test").

CONDITION 1 — ZERO VECTOR

0⃗∈W0⃗ ∈ W

The zero vector of V must be in W. This means W is not empty and contains the "starting point."

CONDITION 2 — CLOSED UNDER ADDITION

Ifu⃗∈Wandv⃗∈W,thenu⃗+v⃗∈WIf u⃗ ∈ W and v⃗ ∈ W, then u⃗ + v⃗ ∈ W

Pick any two vectors u and v in W. When you add them, the result must also land in W. Nothing escapes.

CONDITION 3 — CLOSED UNDER SCALAR MULTIPLICATION

Ifu⃗∈Wandcisanyscalar,thenc⋅u⃗∈WIf u⃗ ∈ W and c is any scalar, then c · u⃗ ∈ W

Pick any vector u in W and any number c. When you multiply u by c, the result must stay in W. Stretching, shrinking, or flipping never kicks you out.

💡

Two-in-One Shortcut

Some textbooks combine conditions 2 and 3 into a single check: if u⃗ and v⃗ are in W and c, d are any scalars, then c·u⃗ + d·v⃗ is in W. This is called closure under linear combinations. It's the same idea, just packed tighter.

Why does this shortcut work? Because W is already sitting inside V, which is a known vector space. Properties like commutativity (u + v = v + u) and associativity ((u + v) + w = u + (v + w)) are automatically inherited from V. The only things that could go wrong are that W might be missing the zero vector, or that adding or scaling could produce a vector that lands outside W. That's why these three conditions are all we need to check.

SECTION 5

Examples and Non-Examples of Subspaces

The best way to understand the subspace test is to see it in action — and to see where things go wrong. The diagram below compares sets that pass the subspace test with sets that fail it.

Subspace Test: Pass ✓ vs. Fail ✗✓ IS a Subspace✗ NOT a Subspacey = ½x (line through origin)• Contains 0⃗ = (0,0) ✓• (2,1)+(4,2) = (6,3) ✓ on line• 3·(2,1) = (6,3) ✓ on line{0⃗} (just the origin)• Trivially passes all 3 testsy = ½x + 1 (line NOT through origin)• Does NOT contain 0⃗ = (0,0) ✗• Fails immediately!• No need to check other conditionsFirst quadrant only (x≥0, y≥0)• Contains 0⃗ ✓ but (−1)·(1,1) = (−1,−1) ✗• Fails scalar multiplication closure
Left column shows sets that pass the subspace test. Right column shows sets that fail. The line y = ½x + 1 fails because it misses the origin. The first quadrant fails because multiplying by −1 sends vectors outside the set.
Set W in ℝ²Zero vector?Closed + ?Closed × ?Subspace?
y = 2x (line through origin)✓ (0,0)✓✓Yes ✓
y = 2x + 3 (shifted line)✗ (0,3)≠0⃗——No ✗
x² + y² ≤ 1 (unit disk)✓ (0,0)✗✗No ✗
{0⃗} (origin only)✓✓✓Yes ✓
All of ℝ²✓✓✓Yes ✓

Quick-check table for several subsets of ℝ²

Notice a pattern: the unit disk (a filled circle) contains the zero vector, but if you add two vectors near the edge, the sum can land outside the disk. For example, (0.8, 0) + (0.8, 0) = (1.6, 0), which is outside the unit disk. Similarly, 5 × (0.5, 0) = (2.5, 0) escapes. So the unit disk fails both closure tests.

SECTION 6

Worked Example

Let's apply the subspace test step by step. We'll determine whether the set W = {(x, y, z) in ℝ³ : x + 2y − z = 0} is a subspace of ℝ³. This set is all the points in 3D space that satisfy the equation x + 2y − z = 0.

Is W = {(x, y, z) : x + 2y − z = 0} a subspace of ℝ³?

  1. 1

    Step 1 — Check the zero vector

    Plug (0, 0, 0) into the equation: 0 + 2(0) − 0 = 0. This is true, so the zero vector is in W.
    ✓ Zero vector (0, 0, 0) ∈ W
  2. 2

    Step 2 — Check closure under addition

    Let u⃗ = (x₁, y₁, z₁) and v⃗ = (x₂, y₂, z₂) be any two vectors in W. This means x₁ + 2y₁ − z₁ = 0 and x₂ + 2y₂ − z₂ = 0. Now check their sum: u⃗ + v⃗ = (x₁ + x₂, y₁ + y₂, z₁ + z₂). Plug into the equation: (x₁ + x₂) + 2(y₁ + y₂) − (z₁ + z₂) = (x₁ + 2y₁ − z₁) + (x₂ + 2y₂ − z₂) = 0 + 0 = 0.
    ✓ u⃗ + v⃗ satisfies the equation, so it's in W
  3. 3

    Step 3 — Check closure under scalar multiplication

    Let u⃗ = (x₁, y₁, z₁) be in W, so x₁ + 2y₁ − z₁ = 0. Let c be any scalar. Then c·u⃗ = (cx₁, cy₁, cz₁). Plug in: cx₁ + 2(cy₁) − cz₁ = c(x₁ + 2y₁ − z₁) = c · 0 = 0.
    ✓ c·u⃗ satisfies the equation, so it's in W
  4. 4

    Step 4 — Conclusion

    All three conditions are satisfied. Therefore, W is a subspace of ℝ³. Geometrically, W is a plane through the origin in three-dimensional space.
    W is a subspace of ℝ³ ✓
ℹ

Key Pattern

Any equation of the form ax + by + cz = 0 (equal to zero, not some other number!) defines a subspace of ℝ³. If the right-hand side is not zero, like x + 2y − z = 5, then the set does not include the origin and is not a subspace.

SECTION 7

Common Pitfalls & Comparisons

Students often confuse "subset" with "subspace." Every subspace is a subset, but not every subset is a subspace. A subset just means some elements from the bigger set. A subspace has to follow the vector space rules too. Here are the most common mistakes and how to avoid them.

Common MistakeWhy It's WrongHow to Fix It
Forgetting to check the zero vectorThe set might not even be non-empty, or it could miss the origin entirelyAlways start with condition 1 — it's the quickest to check
Testing only specific numbers instead of general vectorsFinding one example that works doesn't prove the rule holds for ALL vectorsUse variables (u, v, c) and prove the property for arbitrary choices
Confusing "subset" with "subspace"The set {(1, 0), (0, 1)} is a subset of ℝ² but not a subspace (not closed under addition)Remember: subspace = subset + closure under addition and scalar multiplication
Thinking any shape through the origin is a subspaceA circle through the origin passes the zero vector test but fails closureAlways check all three conditions, not just the first one

Common mistakes when applying the subspace test

✦

KEY TAKEAWAY

Think of the subspace test like a security checkpoint with three gates. Gate 1 checks your ID (zero vector). Gate 2 checks that when two members team up (addition), they're still allowed in. Gate 3 checks that if a member changes their outfit (scalar multiplication), they're still welcome. If any gate rejects you, you're not a subspace — no exceptions.

SECTION 8

Connection to Advanced Topics

Once you understand subspaces, you unlock many of the most important ideas in linear algebra. Here is how the subspace concept connects to topics you might encounter later in your math journey.

This Lesson's IdeaWhere It LeadsWhat's New
Subspace of ℝⁿColumn space & null spaceEvery matrix creates two natural subspaces: one from its columns and one from the solutions to Ax = 0
Subspace test (3 conditions)SpanThe span of any set of vectors is automatically a subspace — guaranteed to pass the test
Lines and planes through originDimension & basisLines are 1-dimensional subspaces, planes are 2-dimensional — the concept of dimension formalizes this
Closure propertiesLinear transformationsFunctions between vector spaces that preserve addition and scalar multiplication — the same idea of 'respecting the rules'

How subspaces connect to future linear algebra topics

In more advanced courses, you'll learn that the solutions to any system of homogeneous linear equations (equations set equal to zero) always form a subspace. This fact is incredibly powerful in science and engineering because it tells us that the set of solutions has a nice, predictable structure. If you can find a few solutions, you can build all the others by combining them.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

A student claims that the set of all vectors in ℝ² with positive x-coordinates (x > 0) is a subspace of ℝ². What is the quickest way to show this is wrong?
Show answer
The quickest check is Condition 1: does the set contain the zero vector? The zero vector is (0, 0), and its x-coordinate is 0, which is not positive (not greater than 0). Since the zero vector is not in the set, the set immediately fails the subspace test. You don't even need to check the other conditions. Even if you did, you'd find that multiplying a positive-x vector by −1 gives a negative-x vector, violating closure under scalar multiplication.

Question 2: BASIC CALCULATION

Let W = {(x, y) in ℝ² : y = 3x}. Verify that (2, 6) and (−1, −3) are in W, then check whether their sum is also in W.
Show answer
For (2, 6): check y = 3x → 6 = 3(2) = 6. True, so (2, 6) ∈ W. For (−1, −3): check y = 3x → −3 = 3(−1) = −3. True, so (−1, −3) ∈ W. Their sum is (2 + (−1), 6 + (−3)) = (1, 3). Check: y = 3x → 3 = 3(1) = 3. True! The sum (1, 3) is also in W. This is an example of closure under addition. The set y = 3x is a line through the origin and is indeed a subspace of ℝ².

Question 3: INTERMEDIATE

Determine whether W = {(x, y, z) in ℝ³ : x − y + 4z = 0} is a subspace of ℝ³. Show all three conditions of the subspace test.
Show answer
Condition 1 (zero vector): Plug in (0, 0, 0): 0 − 0 + 4(0) = 0. ✓ The zero vector is in W. Condition 2 (closure under addition): Let u = (x₁, y₁, z₁) and v = (x₂, y₂, z₂) be in W, so x₁ − y₁ + 4z₁ = 0 and x₂ − y₂ + 4z₂ = 0. Their sum is (x₁+x₂, y₁+y₂, z₁+z₂). Check: (x₁+x₂) − (y₁+y₂) + 4(z₁+z₂) = (x₁−y₁+4z₁) + (x₂−y₂+4z₂) = 0 + 0 = 0. ✓ Condition 3 (closure under scalar multiplication): For any scalar c, c·u = (cx₁, cy₁, cz₁). Check: cx₁ − cy₁ + 4(cz₁) = c(x₁ − y₁ + 4z₁) = c·0 = 0. ✓ All three conditions pass, so W is a subspace of ℝ³ — it's a plane through the origin.

Question 4: APPLIED

A scientist models temperature at three sensor locations with the vector (T₁, T₂, T₃). The sensors are calibrated so that T₁ + T₂ + T₃ = 0 always holds (the temperatures balance out). She wants to know: does the set of all valid temperature readings form a subspace of ℝ³? Use the subspace test.
Show answer
W = {(T₁, T₂, T₃) : T₁ + T₂ + T₃ = 0}. Condition 1: (0, 0, 0) gives 0 + 0 + 0 = 0. ✓ Condition 2: If u = (a₁, a₂, a₃) and v = (b₁, b₂, b₃) are in W, then a₁+a₂+a₃ = 0 and b₁+b₂+b₃ = 0. Their sum is (a₁+b₁, a₂+b₂, a₃+b₃), and (a₁+b₁)+(a₂+b₂)+(a₃+b₃) = (a₁+a₂+a₃)+(b₁+b₂+b₃) = 0+0 = 0. ✓ Condition 3: For scalar c, c·u = (ca₁, ca₂, ca₃), and ca₁+ca₂+ca₃ = c(a₁+a₂+a₃) = c·0 = 0. ✓ Yes, the valid temperature readings form a subspace. This is practically useful: it means any combination of valid readings is still valid, and scaling readings preserves the balance.

Question 5: CRITICAL THINKING

Consider W = {(x, y) in ℝ² : xy ≥ 0}. This set includes all points where x and y have the same sign (or at least one is zero). It contains the zero vector and includes many vectors. Is W a subspace of ℝ²? Explain by finding a specific counterexample if it fails, or prove it if it passes.
Show answer
W is NOT a subspace, even though it contains the zero vector. To show this, we find a counterexample for closure under addition. Take u = (1, −1) — wait, this has xy = (1)(−1) = −1 < 0, so it's NOT in W. Let's try u = (2, 0) and v = (−1, 0). Both have xy = 0 ≥ 0, so both are in W. Their sum is (1, 0), and 1·0 = 0 ≥ 0, so this works. We need different vectors: take u = (1, 1) with xy = 1 ≥ 0 (in W) and v = (−2, 1) with xy = −2 < 0 — not in W either. Actually, take u = (3, 1) in W (xy = 3 > 0) and v = (−1, 2) — xy = −2, not in W. The correct approach: take u = (1, 0) ∈ W and v = (0, 1) ∈ W. Sum = (1,1), xy = 1 ≥ 0. Still in W. Try scalar multiplication: (−1)·(1,1) = (−1,−1), xy = 1 ≥ 0. Still in W. For the actual counterexample: u = (2, 1) ∈ W and v = (−1, 3) ∈ W (xy = −3... no). Take u = (1, 2) ∈ W and v = (−3, 1). xy = −3, not in W. Correct counterexample with both in W: u = (1, 0) and v = (0, −1). Both have xy = 0 ≥ 0, so both ∈ W. But u + v = (1, −1), and xy = −1 < 0, so u + v ∉ W. This proves W is not closed under addition and therefore not a subspace.

SUMMARY

Lesson Summary

Summary

A subspace is a subset of a vector space that is itself a vector space under the same operations. To check whether a set W is a subspace, use the subspace test: verify that (1) W contains the zero vector, (2) W is closed under addition, and (3) W is closed under scalar multiplication. If any one condition fails, the set is not a subspace.

In ℝ², subspaces are: the origin alone, any line through the origin, or the entire plane. Sets defined by homogeneous linear equations (set equal to zero) always form subspaces. Lines or planes that don't pass through the origin, bounded shapes like circles, and regions like quadrants are never subspaces. Mastering the subspace test prepares you for key topics like null spaces, column spaces, and dimension.

Varsity Tutors • Linear Algebra • Subspaces & Tests — Subspaces and Subspace Tests