Evanalysis
6.2Embedded interactionEstimated reading time: 14 min

6.2 Subspaces

Use the subspace test carefully, prove the first structural consequences, and learn the standard matrix and equation-defined examples that recur throughout linear algebra.

Course contents

MATH1030: Linear algebra I

Rigorous linear algebra notes on systems, matrices, structure, and proof, with interaction used only where it clarifies the mathematics.

Chapter 1Systems of equations1 sections
Chapter 4Solution structure1 sections
Chapter 5Invertibility1 sections

Subspaces appear as soon as we notice that many linear problems do not use the whole ambient vector space. The solution set of a homogeneous system, the set of symmetric matrices, and the set of polynomials vanishing at a chosen point are all smaller collections inside larger vector spaces.

The point of this section is to decide exactly when such a subset still carries the full linear structure. A subspace is not merely a geometrically nice subset. It is a subset on which the inherited addition and scalar multiplication still satisfy the vector-space laws.

Why only a few axioms need checking

Suppose VV is already a vector space and WVW \subseteq V. If we use on WW the same addition and scalar multiplication already defined on VV, then we do not need to reprove associativity, commutativity, or the distributive laws from the ground up. Those identities are already true in VV.

The real question is narrower:

  • does addition of two vectors in WW stay inside WW?
  • does scalar multiplication stay inside WW?
  • does WW still contain the vectors needed for the vector-space structure, especially the zero vector?

That is why the subspace test is a closure test.

Definition

Subspace definition

Let VV be a vector space. A subset WVW \subseteq V is called a subspace of VV if:

  1. WW is nonempty;
  2. u+vWu + v \in W for all u,vWu, v \in W;
  3. αuW\alpha u \in W for all uWu \in W and all αR\alpha \in R.

The tutorial packet also emphasizes an equivalent formulation that is often more convenient in proofs.

Theorem

Equivalent subspace test

Let VV be a vector space and WVW \subseteq V. Then WW is a subspace of VV if and only if:

  1. 0W0 \in W;

  2. for every u,vWu, v \in W and every α,βR\alpha, \beta \in R, the vector

    αu+βv\alpha u + \beta v

    also belongs to WW.

Proof

Why the equivalent test works

Standard examples from equations

The master notes begin with subsets defined by simple linear equations. These examples matter because they show exactly what "through the origin" and "homogeneous" mean in linear algebra.

Worked example

A line through the origin in R2R^2

Let

W={(x,y)R2:y=2x}.W = \left\{(x, y) \in R^2 : y = 2x\right\}.

To prove that WW is a subspace of R2R^2, check the three defining conditions.

  1. WW is nonempty because (0, 0) satisfies 0=200 = 2 \cdot 0.

  2. If (x1,y1),(x2,y2)W(x_1, y_1), (x_2, y_2) \in W, then y1=2x1y_1 = 2x_1 and y2=2x2y_2 = 2x_2. Therefore

    (y1+y2)=2(x1+x2),(y_1 + y_2) = 2(x_1 + x_2),

    so (x1+x2,y1+y2)W(x_1 + x_2, y_1 + y_2) \in W.

  3. If (x,y)W(x, y) \in W and αR\alpha \in R, then y=2xy = 2x, so

    αy=2(αx),\alpha y = 2(\alpha x),

    which means (αx,αy)W(\alpha x, \alpha y) \in W.

Hence WW is a subspace of R2R^2.

The geometry matches the algebra: WW is a line through the origin. The phrase "through the origin" is not decorative. It is the visible sign that the zero vector belongs to the set.

Worked example

A plane cut out by one homogeneous equation

Now let

W={(x,y,z)R3:x+2y+3z=0}.W = \left\{(x, y, z) \in R^3 : x + 2y + 3z = 0\right\}.

Again we check the definition.

  1. WW is nonempty because (0, 0, 0) satisfies the equation.

  2. If u=(u1,u2,u3)u = (u_1, u_2, u_3) and v=(v1,v2,v3)v = (v_1, v_2, v_3) lie in WW, then

    u1+2u2+3u3=0,v1+2v2+3v3=0.u_1 + 2u_2 + 3u_3 = 0, \qquad v_1 + 2v_2 + 3v_3 = 0.

    Adding these equations gives

    (u1+v1)+2(u2+v2)+3(u3+v3)=0,(u_1 + v_1) + 2(u_2 + v_2) + 3(u_3 + v_3) = 0,

    so u+vWu + v \in W.

  3. If uWu \in W and αR\alpha \in R, then

    αu1+2αu2+3αu3=α(u1+2u2+3u3)=α0=0,\alpha u_1 + 2\alpha u_2 + 3\alpha u_3 = \alpha(u_1 + 2u_2 + 3u_3) = \alpha \cdot 0 = 0,

    so αuW\alpha u \in W.

Thus WW is a subspace of R3R^3.

This example is the model case for a set defined by a homogeneous linear equation. The zero right-hand side is what makes the closure argument work.

After proving a few examples by hand, use the checker below to compare a genuine subspace with common lookalikes that fail one part of the test.

Read and try

Run one subspace test

The live checker compares common subsets and marks exactly where the subspace test passes or fails.

This set passes the full subspace test.

Contains 0

Passes

(0, 0) satisfies y = 2x.

Closed under addition

Passes

Adding two points on the line keeps you on the same line.

Closed under scalar multiplication

Passes

Scaling a point on the line still gives y = 2x.

Consequences of the subspace test

Once WW is known to be a subspace, several facts follow immediately.

Theorem

Every subspace contains 0 and additive inverses

Let WW be a subspace of a vector space VV. Then:

  1. 0W0 \in W;
  2. if uWu \in W, then uW-u \in W.

Proof

Proof of the first consequences

Two immediate examples now become unavoidable:

  • {0} is a subspace of every vector space, so it is the smallest subspace;
  • VV itself is a subspace of VV, so it is the largest subspace.

Null spaces are subspaces

The first important family of subspaces coming from matrix theory is the null space.

Theorem

The null space of a matrix is a subspace

Let AA be an m×nm \times n matrix, and let

N(A)={xRn:Ax=0}.N(A) = \left\{x \in R^n : Ax = 0\right\}.

Then N(A) is a subspace of RnR^n.

Proof

Why N(A) is a subspace

This theorem explains why the phrase null space is not just convenient terminology. The solution set to a homogeneous system really is a vector space.

Worked example

A homogeneous equation defines a null space

Let

A=[123].A = \begin{bmatrix} 1 & 2 & 3 \end{bmatrix}.

Then

N(A)={[xyz]:x+2y+3z=0}.N(A) = \left\{ \begin{bmatrix} x \\ y \\ z \end{bmatrix} : x + 2y + 3z = 0 \right\}.

So the plane from the earlier example is exactly the null space of a matrix. Solving for x gives

x=2y3z,x = -2y - 3z,

and therefore every vector in the null space has the form

[xyz]=y[210]+z[301].\begin{bmatrix} x \\ y \\ z \end{bmatrix} = y \begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix} + z \begin{bmatrix} -3 \\ 0 \\ 1 \end{bmatrix}.

So this subspace is a plane through the origin generated by two vectors.

A broader pattern: matrix conditions that preserve subspaces

The tutorial sheet includes a stronger example than a null space. Instead of requiring Ax=0Ax = 0, it considers vectors whose images under AA land inside an already known subspace.

Worked example

Preimage of a subspace under matrix multiplication

Let AA be a 4×64 \times 6 matrix, let VV be a subspace of R4R^4, and define

W={xR6:AxV}.W = \left\{x \in R^6 : Ax \in V\right\}.

Then WW is a subspace of R6R^6.

The proof is a direct application of the subspace test:

  1. 0W0 \in W because A0=0A0 = 0, and 0V0 \in V;

  2. if x,yWx, y \in W, then Ax,AyVAx, Ay \in V, so

    A(x+y)=Ax+AyV,A(x + y) = Ax + Ay \in V,

    which means x+yWx + y \in W;

  3. if xWx \in W and αR\alpha \in R, then AxVAx \in V, so

    A(αx)=α(Ax)V,A(\alpha x) = \alpha(Ax) \in V,

    which means αxW\alpha x \in W.

The null space is the special case where V={0}V = \{0\}.

This viewpoint is worth remembering. Many subspaces are best described not by listing their elements, but by writing a condition that is preserved by linear operations.

Common ways a subset fails

The subspace test is short, but it is unforgiving. A set can fail in more than one way.

Common mistake

Containing 0 is necessary, but not sufficient

The set

{(x,y)R2:x+y=1}\left\{(x, y) \in R^2 : x + y = 1\right\}

is not a subspace because it does not contain (0, 0).

But failing to contain 0 is not the only danger. The tutorial also gives a quadratic example

S={xR4:xTCx=0},S = \left\{x \in R^4 : x^T C x = 0\right\},

which may contain 0 and still fail to be a subspace. The reason is that for w=u+vw = u + v,

wTCw=uTCu+vTCv+2uTCv,w^T C w = u^T C u + v^T C v + 2u^T C v,

and the cross term 2uTCv2u^T C v need not vanish. So closure under addition can break even when a set looks symmetric and still contains 0.

In practice, the safest habit is this:

  1. check 0;
  2. check addition;
  3. check scalar multiplication.

Do not rely on pictures or intuition alone.

Quick checks

Quick check

Why is E={f(x)Pn:f(1)=0}E = \{f(x) \in P_n : f(1) = 0\} a subspace of PnP_n?

Use the value at x=1x = 1 as the quantity that has to stay unchanged under the subspace test.

Solution

Solution

Quick check

Let W={XMp,p(R):AXXA=Op×p}W = \{X \in M_{p,p}(R) : AX - XA = O_{p \times p}\}. Why does this set form a subspace?

Treat the defining equation AXXA=Op×pAX - XA = O_{p \times p} the same way you treated Ax=0Ax = 0.

Solution

Solution

Quick check

Why is {(x,y)R2:x+y=1}\{(x, y) \in R^2 : x + y = 1\} not a subspace, even though it is still a line?

Answer this without drawing a graph.

Solution

Solution

Read this first

This section depends on 6.1 Vector spaces for the axioms and on 4.1 Homogeneous systems and null space for the meaning of Ax=0Ax = 0.

Continue with

The next section, 6.3 Linear combinations and span, uses subspaces as the natural output of a generating process.

Key terms in this unit