Linear Algebra

4.2 Subspaces

Imron Rosyadi

Subspaces: The Building Blocks of Vector Spaces

Introduction to Subspaces

It is often the case that some vector space of interest is contained within a larger vector space whose properties are known. In this section, we learn how to recognize these ‘smaller’ vector spaces and use the properties of the larger space.

Definition of a Subspace

A subset \(W\) of a vector space \(V\) is called a subspace of \(V\) if \(W\) is itself a vector space under the addition and scalar multiplication defined on \(V\).

Subspace Verification Theorem

THEOREM 4.2.1

If \(W\) is a set of one or more vectors in a vector space \(V\), then \(W\) is a subspace of \(V\) if and only if the following conditions are satisfied:

  1. If \(\mathbf{u}\) and \(\mathbf{v}\) are vectors in \(W\), then \(\mathbf{u} + \mathbf{v}\) is in \(W\). (Closure under addition)

  2. If \(k\) is a scalar and \(\mathbf{u}\) is a vector in \(W\), then \(k\mathbf{u}\) is in \(W\). (Closure under scalar multiplication)

Visualizing Non-Closure

Sometimes, adding two vectors in \(W\) or multiplying a vector in \(W\) by a scalar produces a vector in \(V\) that is outside of \(W\).

Figure 4.2.1:

The vectors \(\mathbf{u}\) and \(\mathbf{v}\) are in \(W\), but the vectors \(\mathbf{u} + \mathbf{v}\) and \(k\mathbf{u}\) are not.

This illustrates why closure under addition and scalar multiplication are critical to verify for a subset to be a subspace.

Example 1: The Zero Subspace

Every vector space has at least two subspaces: itself and its zero subspace.

If \(V\) is any vector space, and if \(W = \{\mathbf{0}\}\) is the subset of \(V\) that consists of the zero vector only, then \(W\) is closed under addition and scalar multiplication since

\[ \mathbf{0} + \mathbf{0} = \mathbf{0} \text{and} k\mathbf{0} = \mathbf{0} \]

for any scalar \(k\). We call \(W\) the zero subspace of \(V\).

Example 2: Lines Through the Origin

If \(W\) is a line through the origin of either \(R^2\) or \(R^3\), then \(W\) is a subspace.

Adding two vectors on the line or multiplying a vector on the line by a scalar produces another vector on the line.

Figure 4.2.2 (a): \(W\) is closed under addition.

Figure 4.2.2 (b): \(W\) is closed under scalar multiplication.

Both operations keep the resultant vector on the same line through the origin.

Example 3: Planes Through the Origin

If \(\mathbf{u}\) and \(\mathbf{v}\) are vectors in a plane \(W\) through the origin of \(R^3\), then \(\mathbf{u} + \mathbf{v}\) and \(k\mathbf{u}\) also lie in the same plane \(W\).

Figure 4.2.3:

The vectors \(\mathbf{u} + \mathbf{v}\) and \(k\mathbf{u}\) both lie in the same plane as \(\mathbf{u}\) and \(\mathbf{v}\).

Thus \(W\) is closed under addition and scalar multiplication.

Common Subspaces of \(R^2\) and \(R^3\)

These are the only subspaces of \(R^2\) and \(R^3\).

Subspaces of \(R^2\)

  • \(\{\mathbf{0}\}\) (the zero vector)
  • Lines through the origin
  • \(R^2\) itself

Subspaces of \(R^3\)

  • \(\{\mathbf{0}\}\) (the zero vector)
  • Lines through the origin
  • Planes through the origin
  • \(R^3\) itself

Example 4: A Subset of \(R^2\) That Is Not a Subspace

Let \(W\) be the set of all points \((x,y)\) in \(R^2\) for which \(x \geq 0\) and \(y \geq 0\) (the first quadrant).

This set is not a subspace of \(R^2\) because it is not closed under scalar multiplication.

Figure 4.2.4:

\(W\) is not closed under scalar multiplication.

Here, \(\mathbf{v} = (1,1)\) is in \(W\), but \((-1)\mathbf{v} = (-1,-1)\) is not.

Let’s test this.

Example 5: Subspaces of \(M_{nn}\)

The set of symmetric \(n \times n\) matrices is a subspace of \(M_{nn}\).

  • Sum of two symmetric matrices is symmetric.
  • Scalar multiple of a symmetric matrix is symmetric.

Similarly, the sets of:

  • Upper triangular matrices
  • Lower triangular matrices
  • Diagonal matrices

are all subspaces of \(M_{nn}\).

Example 6: A Subset of \(M_{nn}\) That Is Not a Subspace

The set \(W\) of invertible \(n \times n\) matrices is not a subspace of \(M_{nn}\).

It fails on two counts:

  1. Not closed under addition.
  2. Not closed under scalar multiplication.

Consider these \(2 \times 2\) matrices: \[ U = \left[ \begin{array}{ll}1 & 2 \\ 2 & 5 \end{array} \right] \quad \text{and} \quad V = \left[ \begin{array}{ll} - 1 & 2 \\ -2 & 5 \end{array} \right] \]

Example 6: Invertible Matrices (Continued)

Let’s test closure for invertible matrices.

Subspaces in Function Spaces (Calculus Required)

Example 7: The Subspace \(C(-\infty, \infty)\)

The set of continuous functions on \((-\infty, \infty)\) is a subspace of \(F(-\infty, \infty)\) (the set of all real-valued functions). This subspace is denoted by \(C(-\infty, \infty)\).

Example 8: Functions with Continuous Derivatives

The set of functions with \(m\) continuous derivatives on \((-\infty, \infty)\) is a subspace of \(F(-\infty, \infty)\), denoted by \(C^m(-\infty, \infty)\). Similarly, functions with derivatives of all orders form \(C^\infty(-\infty, \infty)\).

Subspaces in Function Spaces (Continued)

Example 9: The Subspace of All Polynomials

A polynomial can be expressed as \(p(x) = a_0 + a_1x + \dots + a_nx^n\).

The sum of two polynomials is a polynomial.

A constant times a polynomial is a polynomial.

Thus, the set \(W\) of all polynomials is a subspace of \(F(-\infty, \infty)\), denoted by \(P_\infty\).

Example 10: The Subspace of Polynomials of Degree \(\leq n\)

For each nonnegative integer \(n\), the polynomials of degree \(n\) or less form a subspace of \(F(-\infty, \infty)\).

This space is denoted by \(P_n\).

Warning

The set of polynomials with exact degree \(n\) is not a subspace. For example, the sum of two degree-2 polynomials can result in a degree-1 polynomial.

Example 10: Polynomials of Exact Degree (Continued)

Consider these two degree-2 polynomials: \(p_1(x) = 1 + 2x + 3x^2\) \(p_2(x) = 5 + 7x - 3x^2\)

Let’s find their sum and degree.

The Hierarchy of Function Spaces

Polynomials are continuous functions and have continuous derivatives of all orders.

This creates a “nested” structure of function spaces.

graph LR
    A["F(-∞, ∞)"] --> B["C(-∞, ∞)"];
    B --> C["C^1(-∞, ∞)"];
    C --> D["C^m(-∞, ∞)"];
    D --> E["C^∞(-∞, ∞)"];
    E --> F["P_∞"];
    F --> G[P_n];

    style A fill:#e0f7fa,stroke:#00bcd4,stroke-width:2px;
    style B fill:#fffde7,stroke:#ffeb3b,stroke-width:2px;
    style C fill:#c8e6c9,stroke:#4caf50,stroke-width:1px;
    style D fill:#a7ffeb,stroke:#00bfa5,stroke-width:1px;
    style E fill:#bbdefb,stroke:#2196f3,stroke-width:1px;
    style F fill:#e1bee7,stroke:#9c27b0,stroke-width:1px;
    style G fill:#ffccbc,stroke:#ff5722,stroke-width:1px;

    linkStyle 0 stroke-width:2px,stroke:blue;
    linkStyle 1 stroke-width:2px,stroke:blue;
    linkStyle 2 stroke-width:2px,stroke:blue;
    linkStyle 3 stroke-width:2px,stroke:blue;
    linkStyle 4 stroke-width:2px,stroke:blue;
    linkStyle 5 stroke-width:2px,stroke:blue;

Figure 4.2.5: \(P_n \subset P_\infty \subset C^\infty(-\infty, \infty) \subset C^m(-\infty, \infty) \subset C^1(-\infty, \infty) \subset C(-\infty, \infty) \subset F(-\infty, \infty)\).

Building Subspaces: Intersection

THEOREM 4.2.2

If \(W_1, W_2, \ldots, W_r\) are subspaces of a vector space \(V\), then the intersection of these subspaces is also a subspace of \(V\).

Linear Combinations

DEFINITION 2

If \(\mathbf{w}\) is a vector in a vector space \(V\), then \(\mathbf{w}\) is said to be a linear combination of the vectors \(\mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_r\) in \(V\) if \(\mathbf{w}\) can be expressed in the form

\[ \mathbf{w} = k_1\mathbf{v}_1 + k_2\mathbf{v}_2 + \dots + k_r\mathbf{v}_r \tag{2} \]

where \(k_1, k_2, \ldots, k_r\) are scalars. These scalars are called the coefficients of the linear combination.

Building Subspaces: Spanning Sets

THEOREM 4.2.3

If \(S = \{\mathbf{w}_1, \mathbf{w}_2, \ldots, \mathbf{w}_r\}\) is a nonempty set of vectors in a vector space \(V\), then:

  1. The set \(W\) of all possible linear combinations of the vectors in \(S\) is a subspace of \(V\).

  2. The set \(W\) in part (a) is the “smallest” subspace of \(V\) that contains all of the vectors in \(S\).

Definition of Span

DEFINITION 3

If \(S = \{\mathbf{w}_1, \mathbf{w}_2, \ldots, \mathbf{w}_r\}\) is a nonempty set of vectors in a vector space \(V\), then the subspace \(W\) of \(V\) that consists of all possible linear combinations of the vectors in \(S\) is called the subspace of \(V\) generated by \(S\).

We say that the vectors \(\mathbf{w}_1, \mathbf{w}_2, \ldots, \mathbf{w}_r\) span \(W\). We denote this subspace as:

\[ W = \operatorname{span}\{\mathbf{w}_1, \mathbf{w}_2, \ldots, \mathbf{w}_r\} \quad \text{or} \quad W = \operatorname{span}(S) \]

Example 11: The Standard Unit Vectors Span \(R^n\)

The standard unit vectors in \(R^n\) are: \[ \mathbf{e}_1 = (1,0,0,\ldots,0), \quad \mathbf{e}_2 = (0,1,0,\ldots,0), \ldots, \quad \mathbf{e}_n = (0,0,0,\ldots,1) \] These vectors span \(R^n\) because every vector \(\mathbf{v} = (v_1, v_2, \ldots, v_n)\) in \(R^n\) can be expressed as: \[ \mathbf{v} = v_1\mathbf{e}_1 + v_2\mathbf{e}_2 + \dots + v_n\mathbf{e}_n \] This is a linear combination of \(\mathbf{e}_1, \mathbf{e}_2, \ldots, \mathbf{e}_n\).

For example, in \(R^3\), \(\mathbf{i}=(1,0,0)\), \(\mathbf{j}=(0,1,0)\), \(\mathbf{k}=(0,0,1)\) span \(R^3\).

Example 11: Standard Unit Vectors (Continued)

Let’s express a vector in \(R^3\) as a linear combination of standard unit vectors.

Example 12: A Geometric View of Spanning in \(R^2\)

If \(\mathbf{v}\) is a nonzero vector in \(R^2\) or \(R^3\) with its initial point at the origin, then \(\operatorname{span}\{\mathbf{v}\}\) is the line through the origin determined by \(\mathbf{v}\).

The tip of \(k\mathbf{v}\) can fall at any point on the line by adjusting \(k\).

Example 13: A Geometric View of Spanning in \(R^3\)

If \(\mathbf{v}_1\) and \(\mathbf{v}_2\) are two non-collinear vectors in \(R^3\), then \(\operatorname{span}\{\mathbf{v}_1, \mathbf{v}_2\}\) is the plane through the origin determined by these two vectors.

The tip of \(k_1\mathbf{v}_1 + k_2\mathbf{v}_2\) can fall at any point on the plane by adjusting \(k_1\) and \(k_2\).

Example 13: A Spanning Set for \(P_n\)

The polynomials \(1, x, x^2, \ldots, x^n\) span the vector space \(P_n\). Any polynomial \(\mathbf{p}\) in \(P_n\) can be written as: \[ \mathbf{p} = a_0 + a_1x + \dots + a_nx^n \] This is a linear combination of \(1, x, x^2, \ldots, x^n\).

We denote this by writing: \[ P_n = \operatorname{span}\{1,x,x^2,\ldots,x^n\} \]

Problem Types: Linear Combinations & Spanning

We often encounter two important problems:

  1. Linear Combination Check: Given a nonempty set \(S\) of vectors in \(R^n\) and a vector \(\mathbf{v}\) in \(R^n\), determine whether \(\mathbf{v}\) is a linear combination of the vectors in \(S\).

  2. Spanning Check: Given a nonempty set \(S\) of vectors in \(R^n\), determine whether the vectors span \(R^n\).

Example 14: Linear Combinations

Consider \(\mathbf{u} = (1,2, -1)\) and \(\mathbf{v} = (6,4,2)\) in \(R^3\).

Part 1: Is \(\mathbf{w} = (9,2,7)\) a linear combination of \(\mathbf{u}\) and \(\mathbf{v}\)?

We need scalars \(k_1, k_2\) such that \(\mathbf{w} = k_1\mathbf{u} + k_2\mathbf{v}\).

This leads to the system: \[ \begin{align*} k_1 + 6k_2 &= 9 \\ 2k_1 + 4k_2 &= 2 \\ -k_1 + 2k_2 &= 7 \end{align*} \]

Solving this system yields \(k_1 = -3, k_2 = 2\).

So, \(\mathbf{w} = -3\mathbf{u} + 2\mathbf{v}\).

Part 2: Is \(\mathbf{w}' = (4,-1,8)\) a linear combination of \(\mathbf{u}\) and \(\mathbf{v}\)?

We need scalars \(k_1, k_2\) such that \(\mathbf{w}' = k_1\mathbf{u} + k_2\mathbf{v}\).

This leads to the system: \[ \begin{align*} k_1 + 6k_2 &= 4 \\ 2k_1 + 4k_2 &= -1 \\ -k_1 + 2k_2 &= 8 \end{align*} \]

This system is inconsistent (no solution).

Thus, \(\mathbf{w}'\) is not a linear combination of \(\mathbf{u}\) and \(\mathbf{v}\).

Example 14: Linear Combinations

Let’s verify the consistency of the systems.

Example 15: Testing for Spanning

Determine whether the vectors \(\mathbf{v}_1 = (1,1,2)\), \(\mathbf{v}_2 = (1,0,1)\), and \(\mathbf{v}_3 = (2,1,3)\) span the vector space \(R^3\).

To span \(R^3\), any arbitrary vector \(\mathbf{b} = (b_1,b_2,b_3)\) in \(R^3\) must be expressible as a linear combination: \[ \mathbf{b} = k_1\mathbf{v}_1 + k_2\mathbf{v}_2 + k_3\mathbf{v}_3 \] This forms a system of linear equations: \[ \begin{align*} k_1 + k_2 + 2k_3 &= b_1 \\ k_1 + \quad 0k_2 + k_3 &= b_2 \\ 2k_1 + k_2 + 3k_3 &= b_3 \end{align*} \] This system is consistent for all \(b_1, b_2, b_3\) if and only if the coefficient matrix \(A\) has a non-zero determinant. \[ A = \left[ \begin{array}{lll}1 & 1 & 2 \\ 1 & 0 & 1 \\ 2 & 1 & 3 \end{array} \right] \]

Example 15: Testing for Spanning

Let’s calculate the determinant of matrix \(A\).

Solution Spaces of Homogeneous Systems

The solutions of a homogeneous linear system \(A\mathbf{x} = \mathbf{0}\) of \(m\) equations in \(n\) unknowns can be viewed as vectors in \(R^n\).

THEOREM 4.2.4

The solution set of a homogeneous linear system \(A\mathbf{x} = \mathbf{0}\) of \(m\) equations in \(n\) unknowns is a subspace of \(R^n\).

Example 16: Solution Spaces of Homogeneous Systems

Determine the solution space for each system. Each system is \(A\mathbf{x} = \mathbf{0}\).

  1. \(\left[\begin{array}{lll}{1}&{- 2}&{3}\\ {2}&{- 4}&{6}\\ {3}&{- 6}&{9}\end{array}\right]{\left[\begin{array}{l}{x}\\ {y}\\ {z}\end{array}\right]}={\left[\begin{array}{l}{0}\\ {0}\\ {0}\end{array}\right]}\)

Solution: \(x = 2s - 3t, y=s, z=t\). This describes a plane through the origin (\(x - 2y + 3z = 0\)).

  1. \(\left[\begin{array}{lll}{1}&{- 2}&{3}\\ {- 3}&{7}&{- 8}\\ {- 2}&{4}&{- 6}\end{array}\right]{\left[\begin{array}{l}{x}\\ {y}\\ {z}\end{array}\right]}={\left[\begin{array}{l}{0}\\ {0}\\ {0}\end{array}\right]}\)

Solution: \(x = -5t, y = -t, z = t\). This describes a line through the origin parallel to \(\mathbf{v} = (-5, -1, 1)\).

Example 16: Solution Spaces (Continued)

  1. \(\left[\begin{array}{lll}{1}&{- 2}&{3}\\ {- 3}&{7}&{8}\\ {4}&{1}&{2}\end{array}\right]{\left[\begin{array}{l}{x}\\ {y}\\ {z}\end{array}\right]}={\left[\begin{array}{l}{0}\\ {0}\\ {0}\end{array}\right]}\)

Solution: The only solution is \(x=0, y=0, z=0\). The solution space is the single point \(\{\mathbf{0}\}\).

  1. \(\left[\begin{array}{lll}{0}&{0}&{0}\\ {0}&{0}&{0}\\ {0}&{0}&{0}\end{array}\right]{\left[\begin{array}{l}{x}\\ {y}\\ {z}\end{array}\right]}={\left[\begin{array}{l}{0}\\ {0}\\ {0}\end{array}\right]}\)

Solution: This system is satisfied by all real values of \(x,y,z\). The solution space is all of \(R^3\).

Warning

The solution set of a nonhomogeneous system (\(A\mathbf{x} = \mathbf{b}\) where \(\mathbf{b} \neq \mathbf{0}\)) is never a subspace of \(R^n\). It is not closed under addition or scalar multiplication.

The Linear Transformation Viewpoint

We can view Theorem 4.2.4 in terms of matrix transformations.

Let \(T_A: R^n \to R^m\) be the matrix transformation defined by multiplication by the coefficient matrix \(A\).

The solution space of \(A\mathbf{x} = \mathbf{0}\) is the set of vectors in \(R^n\) that \(T_A\) maps into the zero vector in \(R^m\).

This set is sometimes called the kernel of the transformation.

THEOREM 4.2.5

If \(A\) is an \(m \times n\) matrix, then the kernel of the matrix transformation \(T_A: R^n \to R^m\) is a subspace of \(R^n\).

A Concluding Observation: Non-Unique Spanning Sets

It is important to recognize that spanning sets are not unique.

For example, any nonzero vector on a line will span that line.

Any two non-collinear vectors in a plane will span that plane.

THEOREM 4.2.6

If \(S = \{\mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_r\}\) and \(S' = \{\mathbf{w}_1, \mathbf{w}_2, \ldots, \mathbf{w}_k\}\) are nonempty sets of vectors in a vector space \(V\), then

\[ \operatorname{span}\{\mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_r\} = \operatorname{span}\{\mathbf{w}_1, \mathbf{w}_2, \ldots, \mathbf{w}_k\} \]

if and only if each vector in \(S\) is a linear combination of those in \(S'\), and each vector in \(S'\) is a linear combination of those in \(S\).