| |

6: Subspaces

Subspaces are the building blocks of linear algebra,theyโ€™re the sets where vector operations stay contained, and understanding them reveals the geometry hidden inside matrices.

Basic Definitions

(Subspace)

A subset SโІRnS \subseteq \mathbb{R}^n is a subspace of Rn\mathbb{R}^n if and only if it satisfies three conditions:

  1. Contains the zero vector: 0โˆˆS\mathbf{0} \in S
  2. Closed under addition: If u,vโˆˆSu, v \in S, then u+vโˆˆSu + v \in S
  3. Closed under scalar multiplication: If vโˆˆSv \in S and cโˆˆRc \in \mathbb{R}, then cvโˆˆScv \in S

In other words, a subspace is a set that โ€œbehaves like a vector spaceโ€ within Rn\mathbb{R}^n.


(Why These Three Conditions?)

The intuition: a subspace must be self-contained under the operations that define vector spaces.

  • The zero vector ensures you have a natural โ€œoriginโ€
  • Closure under addition means you can combine vectors freely
  • Closure under scalar multiplication means you can scale vectors freely

Together, these guarantee that all linear combinations of vectors in SS stay inside SS.


Examples

Example 1: The Trivial Subspaces

For any nn:

  • S={0}S = \{\mathbf{0}\} is always a subspace (the trivial subspace)
  • S=RnS = \mathbb{R}^n is always a subspace (the whole space)

Example 2: Lines Through the Origin

The set

S={tโ‹…vโˆฃtโˆˆR}S = \{t \cdot v \mid t \in \mathbb{R}\}

where vโ‰ 0v \neq \mathbf{0} is a subspace of Rn\mathbb{R}^n.

This is the line through the origin in the direction of vv.

Why?

  • Contains 0\mathbf{0}: Set t=0t = 0
  • Closed under addition: t1v+t2v=(t1+t2)vโˆˆSt_1 v + t_2 v = (t_1 + t_2)v \in S
  • Closed under scalar multiplication: c(tv)=(ct)vโˆˆSc(tv) = (ct)v \in S

Example 3: Planes Through the Origin

The set

S={c1v1+c2v2โˆฃc1,c2โˆˆR}S = \{c_1 v_1 + c_2 v_2 \mid c_1, c_2 \in \mathbb{R}\}

where v1,v2v_1, v_2 are linearly independent is a subspace.

This is the plane spanned by v1v_1 and v2v_2.

Example 4: Not a Subspace

The set

S={(x,y)โˆˆR2โˆฃx+y=1}S = \{(x, y) \in \mathbb{R}^2 \mid x + y = 1\}

is not a subspace because:

  • It doesnโ€™t contain 0\mathbf{0} (since 0+0โ‰ 10 + 0 \neq 1)
  • Itโ€™s not closed under addition: (1,0)(1, 0) and (0,1)(0, 1) are in SS, but their sum (1,1)(1, 1) is not

This is a line, but it doesnโ€™t. pass through the origin,so it fails to be a subspace.


Key Result: Span is Always a Subspace

Theorem: For any collection of vectors v1,โ€ฆ,vkโˆˆRnv_1, \dots, v_k \in \mathbb{R}^n, the span

spanโก{v1,โ€ฆ,vk}\operatorname{span}\{v_1, \dots, v_k\}

is a subspace of Rn\mathbb{R}^n.

Proof:

  1. Contains 0\mathbf{0}: Take all coefficients ci=0c_i = 0, then 0v1+โ‹ฏ+0vk=00v_1 + \cdots + 0v_k = \mathbf{0}.

  2. Closed under addition: If u=c1v1+โ‹ฏ+ckvku = c_1 v_1 + \cdots + c_k v_k and w=d1v1+โ‹ฏ+dkvkw = d_1 v_1 + \cdots + d_k v_k, then

    u+w=(c1+d1)v1+โ‹ฏ+(ck+dk)vkโˆˆspanโก{v1,โ€ฆ,vk}.u + w = (c_1 + d_1)v_1 + \cdots + (c_k + d_k)v_k \in \operatorname{span}\{v_1, \dots, v_k\}.
  3. Closed under scalar multiplication: If u=c1v1+โ‹ฏ+ckvku = c_1 v_1 + \cdots + c_k v_k and aโˆˆRa \in \mathbb{R}, then

    au=(ac1)v1+โ‹ฏ+(ack)vkโˆˆspanโก{v1,โ€ฆ,vk}.au = (ac_1)v_1 + \cdots + (ac_k)v_k \in \operatorname{span}\{v_1, \dots, v_k\}.

This is why span is so important,itโ€™s the canonical way to construct subspaces.


Column Space and Null Space

Two fundamental subspaces arise from any matrix AโˆˆRmร—nA \in \mathbb{R}^{m \times n}:

(Column Space)

The column space of AA, denoted colโก(A)\operatorname{col}(A), is the span of the columns of AA:

colโก(A)=spanโก{columnsย ofย A}.\operatorname{col}(A) = \operatorname{span}\{\text{columns of } A\}.

This is a subspace of Rm\mathbb{R}^m.

Interpretation: colโก(A)\operatorname{col}(A) is the set of all possible outputs AxAx as xx ranges over Rn\mathbb{R}^n.

colโก(A)={AxโˆฃxโˆˆRn}.\operatorname{col}(A) = \{Ax \mid x \in \mathbb{R}^n\}.

(Null Space)

The null space (or kernel) of AA, denoted nullโก(A)\operatorname{null}(A) or kerโก(A)\ker(A), is the set of all solutions to Ax=0Ax = \mathbf{0}:

nullโก(A)={xโˆˆRnโˆฃAx=0}.\operatorname{null}(A) = \{x \in \mathbb{R}^n \mid Ax = \mathbf{0}\}.

This is a subspace of Rn\mathbb{R}^n.

Why is it a subspace?

  1. A0=0A\mathbf{0} = \mathbf{0}, so 0โˆˆnullโก(A)\mathbf{0} \in \operatorname{null}(A)
  2. If Au=0Au = \mathbf{0} and Av=0Av = \mathbf{0}, then A(u+v)=Au+Av=0A(u + v) = Au + Av = \mathbf{0}
  3. If Au=0Au = \mathbf{0}, then A(cu)=c(Au)=c0=0A(cu) = c(Au) = c\mathbf{0} = \mathbf{0}

Interpretation: The null space captures all the โ€œredundancyโ€ in the matrix,the directions that get collapsed to zero.


Dimension and Basis

(Basis)

A basis for a subspace SS is a linearly independent set of vectors whose span equals SS.

Equivalently, a basis is a minimal spanning set or a maximal independent set.

(Dimension)

The dimension of a subspace SS, denoted dimโก(S)\dim(S), is the number of vectors in any basis for SS.

Key fact: All bases for a given subspace have the same size.

Examples

  • dimโก({0})=0\dim(\{\mathbf{0}\}) = 0
  • dimโก(Rn)=n\dim(\mathbb{R}^n) = n
  • A line through the origin has dimension 11
  • A plane through the origin has dimension 22

The Rank-Nullity Theorem

For any mร—nm \times n matrix AA:

dimโก(colโก(A))+dimโก(nullโก(A))=n.\dim(\operatorname{col}(A)) + \dim(\operatorname{null}(A)) = n.

Or equivalently:

rankโก(A)+dimโก(nullโก(A))=n.\operatorname{rank}(A) + \dim(\operatorname{null}(A)) = n.

Interpretation: The dimension of the input space (nn) is split between:

  • The dimension of directions that get mapped somewhere non-trivial (the rank)
  • The dimension of directions that collapse to zero (the nullity)

This is one of the most important equations in linear algebra.


Computing Subspaces from RREF

Given a matrix AA, we can compute both colโก(A)\operatorname{col}(A) and nullโก(A)\operatorname{null}(A) from rrefโก(A)\operatorname{rref}(A).

Finding a Basis for colโก(A)\operatorname{col}(A)

  1. Compute rrefโก(A)\operatorname{rref}(A)
  2. Identify the pivot columns in rrefโก(A)\operatorname{rref}(A)
  3. The corresponding columns from the original matrix AA form a basis for colโก(A)\operatorname{col}(A)

Why the original columns? Because row operations preserve the column space relationships but change the actual vectors. The pivot positions tell you which original columns are independent.

Finding a Basis for nullโก(A)\operatorname{null}(A)

  1. Compute rrefโก(A)\operatorname{rref}(A)
  2. Identify the free variables (columns without pivots)
  3. For each free variable, set it to 11 and all other free variables to 00, then solve for the basic variables
  4. Each solution vector forms a basis vector for nullโก(A)\operatorname{null}(A)

The dimension of nullโก(A)\operatorname{null}(A) equals the number of free variables.


Why Subspaces Matter

Subspaces are the geometric objects that linear algebra studies.

  • Solutions to linear systems live in subspaces
  • Eigenvectors span eigenspaces (which are subspaces)
  • Projections map onto subspaces
  • Least-squares problems minimize distance to subspaces

Understanding subspaces means understanding the structure of Rn\mathbb{R}^n, not just individual vectors.