Biostatistics · Intermediate

Subspaces

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

A subspace is a nonempty subset of a vector space that is closed under vector addition and scalar multiplication, inheriting all vector space axioms from the parent space. The span of any set of vectors forms a subspace, and the null space of a matrix is a fundamental example of a subspace in biostatistics. Linear independence determines whether a set of vectors forms a minimal spanning set, verified via determinants or row reduction.

Intuition

Think of a subspace as a self-contained universe within a larger vector space. It must contain the origin (zero vector) and, once you have any vector in it, you can scale it or add it to another vector in it without ever leaving the set. This closure property is crucial because it ensures that linear combinations—central to statistical modeling—remain within the defined space. For instance, the null space represents all solutions to a homogeneous system, forming a geometric structure like a plane or line through the origin. If a set of vectors is linearly independent, none can be redundant; they provide the minimal 'building blocks' needed to span a specific subspace.

Key equations

S is a subspace if ∀x,y∈S,α∈ℝ:αx∈S and x+y∈S
(1)

Definition of a subspace requiring closure under scalar multiplication and addition.

Span(v1,…,vn)={∑i=1nαivi∣αi∈ℝ}
(2)

The span is the set of all linear combinations of a given set of vectors.

N(A)={x∈ℝn∣Ax=0}
(3)

The null space is the subspace of vectors that map to the zero vector under matrix A.

c1v1+…+cnvn=0⟹c1=…=cn=0
(4)

Definition of linear independence: only the trivial solution exists for the homogeneous combination.

Derivation

  1. A subset S is a subspace if it is nonempty and closed under addition and scalar multiplication.
  2. Closure under scalar multiplication implies 0 is in S (since 0*x = 0), ensuring the zero vector is present.
  3. The span of vectors is the set of all linear combinations; it is closed under addition and scalar multiplication by definition, thus it is always a subspace.
  4. The null space N(A) is a subspace because A(0)=0, A(αx)=α(Ax)=0, and A(x+y)=Ax+Ay=0.
  5. Linear independence means no vector in the set is a linear combination of the others.
  6. For n vectors in R^n, independence is equivalent to the determinant of the matrix formed by these vectors being non-zero.
  7. For k vectors in R^n (k != n), row reduction determines independence: free variables imply dependence.

Worked example

Problem

Determine if the set S={(x,1)∣x∈ℝ} in ℝ2 is a subspace.

  1. Check if the zero vector (0,0) is in S. For (0,0) to be in S, the second component must be 1. Since 0 != 1, (0,0) is not in S.
  2. Alternatively, check closure under scalar multiplication. Let v = (0, 1) be in S. Let alpha = 2. Then alpha*v = (0, 2).
  3. The vector (0, 2) is not in S because the second component is 2, not 1.
  4. Since closure under scalar multiplication fails, S is not a subspace.

Answer S is not a subspace because it does not contain the zero vector and is not closed under scalar multiplication.

Common mistakes

  • Assuming any subset is a subspace without verifying closure under addition and scalar multiplication.
  • Forgetting that the zero vector must be in the subspace; if 0 is not in S, S cannot be a subspace.
  • Confusing the solution set of a nonhomogeneous system (Ax=b, b!=0) with a subspace; it is an affine shift, not a subspace, because it does not contain the zero vector.
  • Believing that a set of vectors spans a space if the number of vectors equals the dimension, without checking for linear independence (they might be dependent).

Animation

Animation coming soon

The animated version of this lesson is being prepared for the web. In the Signals AI app, lessons are drawn step by step.

Code

This is a text lesson: it has no animation code yet.

ccBYNC© 2026 SignalsLab. Lesson text shared as is under CC BY-NC 4.0.