Solved Exercises on Subspaces: Definition and Examples

Master subspaces, closure properties, and applications through these 5 detailed exercises.

Subspaces - Comprehensive Summary

Definitions

Subspace: A subset W of a vector space V that is itself a vector space under the same operations as V

Closure Properties: W must be closed under vector addition and scalar multiplication

Zero Vector: Every subspace must contain the zero vector of the parent space

Core Rules

• Contains zero vector: \(\vec{0} \in W\)

• Closed under addition: \(\vec{u}, \vec{v} \in W \Rightarrow \vec{u} + \vec{v} \in W\)

• Closed under scalar mult.: \(\vec{u} \in W, c \in \mathbb{R} \Rightarrow c\vec{u} \in W\)

• Subset condition: \(W \subseteq V\)

Methods

1. Verify zero vector inclusion

2. Check closure under addition

3. Check closure under scalar multiplication

4. Confirm subset relationship

Key Tips

• Always check zero vector first

• Use generic vectors for closure proofs

• Counterexamples disprove subspace property

• Spans and null spaces are always subspaces

Solution: Exercises 1 to 3
1 Line Through Origin
Exercise 1
Prove that the set \(W = \left\{ \begin{pmatrix} x \\ y \end{pmatrix} \in \mathbb{R}^2 \mid y = 2x \right\}\) is a subspace of \(\mathbb{R}^2\).
Definition:

Subspace: A subset \(W\) of a vector space \(V\) is a subspace if it satisfies three conditions: (1) \(\vec{0} \in W\), (2) \(\vec{u}, \vec{v} \in W \Rightarrow \vec{u} + \vec{v} \in W\), and (3) \(\vec{u} \in W, c \in \mathbb{R} \Rightarrow c\vec{u} \in W\).

Subspace Verification Method:
  1. Check that the zero vector belongs to W
  2. Verify closure under vector addition
  3. Verify closure under scalar multiplication
  4. Confirm W is a subset of the parent vector space
Zero Vector
\(\begin{pmatrix} 0 \\ 0 \end{pmatrix} \in W\)
Addition Closure
Satisfied
Scalar Closure
Satisfied
Step 1: Verify zero vector is in W

Check if \(\begin{pmatrix} 0 \\ 0 \end{pmatrix} \in W\): Does \(0 = 2(0)\)? Yes, \(0 = 0\). ✓

Step 2: Verify closure under addition

Let \(\vec{u} = \begin{pmatrix} x_1 \\ y_1 \end{pmatrix}\) and \(\vec{v} = \begin{pmatrix} x_2 \\ y_2 \end{pmatrix}\) be vectors in W.

By definition of W: \(y_1 = 2x_1\) and \(y_2 = 2x_2\).

Consider \(\vec{u} + \vec{v} = \begin{pmatrix} x_1 + x_2 \\ y_1 + y_2 \end{pmatrix} = \begin{pmatrix} x_1 + x_2 \\ 2x_1 + 2x_2 \end{pmatrix} = \begin{pmatrix} x_1 + x_2 \\ 2(x_1 + x_2) \end{pmatrix}\).

Since the second component equals 2 times the first component, \(\vec{u} + \vec{v} \in W\). ✓

Step 3: Verify closure under scalar multiplication

Let \(\vec{u} = \begin{pmatrix} x \\ y \end{pmatrix} \in W\) and \(c \in \mathbb{R}\).

By definition of W: \(y = 2x\).

Consider \(c\vec{u} = c\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} cx \\ cy \end{pmatrix} = \begin{pmatrix} cx \\ c(2x) \end{pmatrix} = \begin{pmatrix} cx \\ 2(cx) \end{pmatrix}\).

Since the second component equals 2 times the first component, \(c\vec{u} \in W\). ✓

Step 4: Confirm subset relationship

Every vector in W is clearly a vector in \(\mathbb{R}^2\), so \(W \subseteq \mathbb{R}^2\). ✓

W is a subspace of \(\mathbb{R}^2\).
Final answer:

W is a subspace of \(\mathbb{R}^2\) because it contains the zero vector and is closed under both vector addition and scalar multiplication.

Applied rules:

• Zero vector test: Essential first step in subspace verification

• Closure verification: Must use generic vectors to prove for all cases

• Definition adherence: Use the defining property of the set throughout

2 Plane Through Origin
Exercise 2
Determine if \(W = \left\{ \begin{pmatrix} x \\ y \\ z \end{pmatrix} \in \mathbb{R}^3 \mid x + y + z = 0 \right\}\) is a subspace of \(\mathbb{R}^3\).
Definition:

Plane Through Origin: A plane defined by a linear equation where the constant term is zero. Such planes always pass through the origin and form subspaces of \(\mathbb{R}^3\).

Zero Vector
\(\begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix} \in W\)
Addition Closure
Satisfied
Scalar Closure
Satisfied
Step 1: Verify zero vector is in W

Check if \(\begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix} \in W\): Does \(0 + 0 + 0 = 0\)? Yes. ✓

Step 2: Verify closure under addition

Let \(\vec{u} = \begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix}\) and \(\vec{v} = \begin{pmatrix} x_2 \\ y_2 \\ z_2 \end{pmatrix}\) be vectors in W.

By definition of W: \(x_1 + y_1 + z_1 = 0\) and \(x_2 + y_2 + z_2 = 0\).

Consider \(\vec{u} + \vec{v} = \begin{pmatrix} x_1 + x_2 \\ y_1 + y_2 \\ z_1 + z_2 \end{pmatrix}\).

Check if \((x_1 + x_2) + (y_1 + y_2) + (z_1 + z_2) = 0\):

\((x_1 + y_1 + z_1) + (x_2 + y_2 + z_2) = 0 + 0 = 0\). ✓

Step 3: Verify closure under scalar multiplication

Let \(\vec{u} = \begin{pmatrix} x \\ y \\ z \end{pmatrix} \in W\) and \(c \in \mathbb{R}\).

By definition of W: \(x + y + z = 0\).

Consider \(c\vec{u} = \begin{pmatrix} cx \\ cy \\ cz \end{pmatrix}\).

Check if \(cx + cy + cz = 0\):

\(c(x + y + z) = c(0) = 0\). ✓

Step 4: Confirm subset relationship

Every vector in W is clearly a vector in \(\mathbb{R}^3\), so \(W \subseteq \mathbb{R}^3\). ✓

W is a subspace of \(\mathbb{R}^3\).
Final answer:

W is a subspace of \(\mathbb{R}^3\) because it contains the zero vector and is closed under both vector addition and scalar multiplication.

Applied rules:

• Linearity preservation: Linear equations maintain their form under addition and scalar multiplication

• Generic vector approach: Use symbolic notation to prove for all vectors

• Property inheritance: The defining property transfers to linear combinations

3 Not a Subspace Example
Exercise 3
Show that \(W = \left\{ \begin{pmatrix} x \\ y \end{pmatrix} \in \mathbb{R}^2 \mid y = x + 1 \right\}\) is NOT a subspace of \(\mathbb{R}^2\).
Definition:

Not a Subspace: A subset fails to be a subspace if it violates any of the three subspace conditions: zero vector inclusion, closure under addition, or closure under scalar multiplication.

Zero Vector
\(\begin{pmatrix} 0 \\ 0 \end{pmatrix} \notin W\)
Counterexample
Exists
Conclusion
Not a subspace
Step 1: Check zero vector inclusion

Check if \(\begin{pmatrix} 0 \\ 0 \end{pmatrix} \in W\): Does \(0 = 0 + 1\)? No, \(0 \neq 1\).

Since the zero vector is not in W, W cannot be a subspace. ✓

Step 2: Additional verification (closure failure)

Even though we've already proven it's not a subspace, let's verify another property fails.

Take \(\vec{u} = \begin{pmatrix} 0 \\ 1 \end{pmatrix} \in W\) (since \(1 = 0 + 1\)).

Consider \(2\vec{u} = \begin{pmatrix} 0 \\ 2 \end{pmatrix}\).

Is \(\begin{pmatrix} 0 \\ 2 \end{pmatrix} \in W\)? Does \(2 = 0 + 1\)? No, \(2 \neq 1\).

So scalar multiplication is not closed. ✓

Step 3: General principle

Any line or plane that does not pass through the origin cannot be a subspace, because it won't contain the zero vector.

Step 4: Alternative counterexample

Take \(\vec{u} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}\) and \(\vec{v} = \begin{pmatrix} 1 \\ 2 \end{pmatrix}\), both in W.

\(\vec{u} + \vec{v} = \begin{pmatrix} 1 \\ 3 \end{pmatrix}\).

Is \(\begin{pmatrix} 1 \\ 3 \end{pmatrix} \in W\)? Does \(3 = 1 + 1\)? No, \(3 \neq 2\).

So addition is not closed. ✓

W is not a subspace of \(\mathbb{R}^2\).
Final answer:

W is not a subspace of \(\mathbb{R}^2\) because it does not contain the zero vector \(\begin{pmatrix} 0 \\ 0 \end{pmatrix}\).

Applied rules:

• Zero vector necessity: Failure of this condition alone proves non-subspace

• Counterexample approach: Find specific examples showing property failure

• Geometric insight: Lines/planes not through origin fail subspace test

Subspaces Properties and Examples
\(\vec{0} \in W \land (\vec{u}, \vec{v} \in W \Rightarrow \vec{u} + \vec{v} \in W) \land (\vec{u} \in W, c \in \mathbb{R} \Rightarrow c\vec{u} \in W)\)
Subspace Definition
Trivial Subspaces
\(\{\vec{0}\} \subseteq V\) and \(V \subseteq V\)
Every vector space has these as subspaces
Span is Subspace
\(\text{span}\{v_1, ..., v_k\}\) is a subspace
Spans always form subspaces
Null Space
\(\text{null}(A) = \{x \mid Ax = 0\}\) is a subspace
Null spaces are always subspaces
Intersection Property: If \(W_1\) and \(W_2\) are subspaces of V, then \(W_1 \cap W_2\) is also a subspace of V
Union Property: The union of two subspaces is generally not a subspace unless one is contained in the other
Dimension: A subspace has dimension less than or equal to the parent space
Solution: Exercises 4 to 5
4 Matrix Null Space
Exercise 4
Let \(A = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \end{pmatrix}\). Prove that \(\text{null}(A) = \{ \vec{x} \in \mathbb{R}^3 \mid A\vec{x} = \vec{0} \}\) is a subspace of \(\mathbb{R}^3\).
Definition:

Null Space: The set of all vectors that are mapped to the zero vector by a matrix transformation. The null space is always a subspace of the domain.

Zero Vector
\(A\vec{0} = \vec{0}\)
Addition Closure
\(A(\vec{u} + \vec{v}) = \vec{0}\)
Scalar Closure
\(A(c\vec{u}) = \vec{0}\)
Step 1: Verify zero vector is in null(A)

Check if \(A\vec{0} = \vec{0}\): For any matrix A, \(A\vec{0} = \vec{0}\) by the properties of matrix multiplication. ✓

Step 2: Verify closure under addition

Let \(\vec{u}, \vec{v} \in \text{null}(A)\), so \(A\vec{u} = \vec{0}\) and \(A\vec{v} = \vec{0}\).

Consider \(A(\vec{u} + \vec{v}) = A\vec{u} + A\vec{v} = \vec{0} + \vec{0} = \vec{0}\).

Therefore, \(\vec{u} + \vec{v} \in \text{null}(A)\). ✓

Step 3: Verify closure under scalar multiplication

Let \(\vec{u} \in \text{null}(A)\) and \(c \in \mathbb{R}\), so \(A\vec{u} = \vec{0}\).

Consider \(A(c\vec{u}) = c(A\vec{u}) = c\vec{0} = \vec{0}\).

Therefore, \(c\vec{u} \in \text{null}(A)\). ✓

Step 4: Confirm subset relationship

Every vector in \(\text{null}(A)\) is clearly a vector in \(\mathbb{R}^3\), so \(\text{null}(A) \subseteq \mathbb{R}^3\). ✓

Step 5: Find specific elements (optional verification)

To solve \(A\vec{x} = \vec{0}\): \(\begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \end{pmatrix}\begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}\)

This gives us: \(x_1 + 2x_2 + 3x_3 = 0\) and \(2x_1 + 4x_2 + 6x_3 = 0\).

The second equation is redundant (2 times the first), so: \(x_1 = -2x_2 - 3x_3\).

So \(\text{null}(A) = \left\{ \begin{pmatrix} -2x_2 - 3x_3 \\ x_2 \\ x_3 \end{pmatrix} \mid x_2, x_3 \in \mathbb{R} \right\}\).

\(\text{null}(A)\) is a subspace of \(\mathbb{R}^3\).
Final answer:

\(\text{null}(A)\) is a subspace of \(\mathbb{R}^3\) because it contains the zero vector and is closed under both vector addition and scalar multiplication.

Applied rules:

• Matrix linearity: \(A(\vec{u} + \vec{v}) = A\vec{u} + A\vec{v}\) and \(A(c\vec{u}) = c(A\vec{u})\)

• Null space property: Null spaces are always subspaces

• Algebraic manipulation: Use matrix properties to prove closure

5 Intersection of Subspaces
Exercise 5
Let \(W_1 = \left\{ \begin{pmatrix} x \\ y \\ z \end{pmatrix} \in \mathbb{R}^3 \mid x + y = 0 \right\}\) and \(W_2 = \left\{ \begin{pmatrix} x \\ y \\ z \end{pmatrix} \in \mathbb{R}^3 \mid y + z = 0 \right\}\). Prove that \(W_1 \cap W_2\) is a subspace of \(\mathbb{R}^3\).
Definition:

Intersection of Subspaces: The intersection of two subspaces is the set of all vectors that belong to both subspaces. This intersection is always a subspace.

Intersection
\(W_1 \cap W_2 = \left\{ \begin{pmatrix} x \\ y \\ z \end{pmatrix} \mid x + y = 0, y + z = 0 \right\}\)
Zero Vector
\(\begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix} \in W_1 \cap W_2\)
Closure
Satisfied
Step 1: Identify the intersection

\(W_1 \cap W_2 = \left\{ \begin{pmatrix} x \\ y \\ z \end{pmatrix} \in \mathbb{R}^3 \mid x + y = 0 \text{ and } y + z = 0 \right\}\).

Step 2: Verify zero vector is in intersection

Check if \(\begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix} \in W_1 \cap W_2\):

Does \(0 + 0 = 0\)? Yes. Does \(0 + 0 = 0\)? Yes. ✓

Step 3: Verify closure under addition

Let \(\vec{u} = \begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix}\) and \(\vec{v} = \begin{pmatrix} x_2 \\ y_2 \\ z_2 \end{pmatrix}\) be in \(W_1 \cap W_2\).

This means: \(x_1 + y_1 = 0\), \(y_1 + z_1 = 0\), \(x_2 + y_2 = 0\), and \(y_2 + z_2 = 0\).

Consider \(\vec{u} + \vec{v} = \begin{pmatrix} x_1 + x_2 \\ y_1 + y_2 \\ z_1 + z_2 \end{pmatrix}\).

Check first condition: \((x_1 + x_2) + (y_1 + y_2) = (x_1 + y_1) + (x_2 + y_2) = 0 + 0 = 0\). ✓

Check second condition: \((y_1 + y_2) + (z_1 + z_2) = (y_1 + z_1) + (y_2 + z_2) = 0 + 0 = 0\). ✓

Step 4: Verify closure under scalar multiplication

Let \(\vec{u} = \begin{pmatrix} x \\ y \\ z \end{pmatrix} \in W_1 \cap W_2\) and \(c \in \mathbb{R}\).

This means: \(x + y = 0\) and \(y + z = 0\).

Consider \(c\vec{u} = \begin{pmatrix} cx \\ cy \\ cz \end{pmatrix}\).

Check first condition: \(cx + cy = c(x + y) = c(0) = 0\). ✓

Check second condition: \(cy + cz = c(y + z) = c(0) = 0\). ✓

Step 5: Confirm subset relationship

Every vector in \(W_1 \cap W_2\) is clearly a vector in \(\mathbb{R}^3\), so \(W_1 \cap W_2 \subseteq \mathbb{R}^3\). ✓

\(W_1 \cap W_2\) is a subspace of \(\mathbb{R}^3\).
Final answer:

\(W_1 \cap W_2\) is a subspace of \(\mathbb{R}^3\) because it contains the zero vector and is closed under both vector addition and scalar multiplication.

Applied rules:

• Intersection property: Intersection of subspaces is always a subspace

• Multiple conditions: Verify all defining conditions for intersection

• Component-wise approach: Handle each constraint separately

Subspaces: Advanced Concepts and Applications
\(\text{span}\{v_1, v_2, ..., v_k\} = \left\{ \sum_{i=1}^{k} c_i v_i \mid c_i \in \mathbb{R} \right\}\)
Span Definition
Key definitions:

Subspace: A subset of a vector space that is itself a vector space under the same operations. It must satisfy three conditions: contain the zero vector, be closed under addition, and be closed under scalar multiplication.

Span: The set of all linear combinations of a given set of vectors. Spans are always subspaces.

Column Space: The span of the columns of a matrix. This is always a subspace.

Complete methodology:
  1. Zero vector test: Always verify the zero vector belongs to the set
  2. Addition closure: Take two arbitrary vectors from the set and show their sum is also in the set
  3. Scalar multiplication closure: Take an arbitrary vector and scalar, show the product is in the set
  4. Subset confirmation: Ensure the set is contained in the parent vector space
Tip 1: If a set doesn't contain the zero vector, it cannot be a subspace.
Tip 2: Use generic vectors (with variables) to prove closure properties for all elements.
Tip 3: The span of any set of vectors is always a subspace.
Tip 4: Intersections of subspaces are always subspaces, but unions generally aren't.
Common errors: Forgetting to check the zero vector, assuming closure without proof, mixing up addition and scalar multiplication tests.
Applications: Solutions to homogeneous systems, eigenspaces, function spaces, polynomial spaces, optimization problems.
Properties to know by heart:

• Every vector space is a subspace of itself

• The zero vector alone forms a subspace (trivial subspace)

• The intersection of subspaces is always a subspace

• Spans of vector sets are always subspaces

• Null spaces and column spaces of matrices are always subspaces

Subspaces Visualization: Geometric Interpretation
Exercise 6: Subspace Dimensions
Visualize different types of subspaces in \(\mathbb{R}^3\): the zero vector (0D), lines through origin (1D), planes through origin (2D), and \(\mathbb{R}^3\) itself (3D).

Geometric Interpretation: Subspaces in \(\mathbb{R}^3\) can have dimensions 0, 1, 2, or 3, corresponding to: origin point, line through origin, plane through origin, and all of \(\mathbb{R}^3\).

  • 0D: \(\{\vec{0}\}\) (origin point)
  • 1D: Line through origin
  • 2D: Plane through origin
  • 3D: All of \(\mathbb{R}^3\)

Questions & Answers

Question: I'm confused about why the zero vector is so important in subspace definitions. Why can't we have a subspace without it?

Answer: The zero vector is fundamental for several reasons:

  1. Algebraic necessity: If a set is closed under scalar multiplication, and it contains any vector \(\vec{v}\), then it must contain \(0 \cdot \vec{v} = \vec{0}\).
  2. Additive identity: The zero vector serves as the identity element for vector addition, which is required in any vector space.
  3. Structural requirement: Without the zero vector, the set cannot satisfy all vector space axioms.

Think of it this way: if you can multiply any vector in your set by the scalar 0, you must get the zero vector, which must therefore be in your set. This is why the zero vector test is often the quickest way to show something is NOT a subspace.

Question: What exactly do we mean by "closed under addition" and "closed under scalar multiplication"?

Answer: These closure properties mean:

Closed under addition: If you take ANY two vectors from your set and add them together, the result must also be in the set. Symbolically: if \(\vec{u}, \vec{v} \in W\), then \(\vec{u} + \vec{v} \in W\).

Closed under scalar multiplication: If you take ANY vector from your set and multiply it by ANY scalar, the result must also be in the set. Symbolically: if \(\vec{u} \in W\) and \(c \in \mathbb{R}\), then \(c\vec{u} \in W\).

The key word is "ANY" - these properties must hold for all possible choices of vectors and scalars from your set, not just specific examples.

Question: Why is the intersection of subspaces always a subspace, but the union is not?

Answer: The difference lies in the logical structure:

Intersection: A vector is in \(W_1 \cap W_2\) if it's in BOTH \(W_1\) AND \(W_2\). If \(\vec{u}, \vec{v} \in W_1 \cap W_2\), then both vectors satisfy the properties of both subspaces, so their sum and scalar multiples will also satisfy both sets of properties.

Union: A vector is in \(W_1 \cup W_2\) if it's in EITHER \(W_1\) OR \(W_2\) (or both). The problem is that if \(\vec{u} \in W_1\) but not \(W_2\), and \(\vec{v} \in W_2\) but not \(W_1\), then \(\vec{u} + \vec{v}\) might not be in either subspace, so it's not in the union.

For example, consider the x-axis and y-axis in \(\mathbb{R}^2\) as subspaces. Their union contains \((1,0)\) and \((0,1)\) but not \((1,1) = (1,0) + (0,1)\), so the union isn't closed under addition.

Question: How are subspaces used in machine learning and data science?

Answer: Subspaces play important roles in data science:

Principal Component Analysis (PCA):

  • Projects data onto lower-dimensional subspaces that capture maximum variance
  • The principal components span subspaces of decreasing importance

Linear Regression:

  • The fitted values form a subspace spanned by the feature vectors
  • The residuals are orthogonal to this subspace

Dimensionality Reduction:

  • Finding low-dimensional subspaces that approximate high-dimensional data
  • Manifold learning assumes data lies near low-dimensional subspaces

Understanding subspaces helps in feature engineering and interpreting model results.

Question: How do subspaces relate to solutions of differential equations?

Answer: Solution spaces of linear differential equations are subspaces:

Homogeneous equations: The set of all solutions to a homogeneous linear differential equation forms a subspace. If \(y_1\) and \(y_2\) are solutions, then \(c_1y_1 + c_2y_2\) is also a solution for any constants \(c_1, c_2\).

Superposition principle: This is the mathematical foundation for superposition in physics - the sum of solutions is also a solution.

Initial conditions: Different initial conditions correspond to different vectors in the solution subspace.

For example, the solutions to \(y'' + y = 0\) form a 2-dimensional subspace spanned by \(\{\cos x, \sin x\}\). Any solution can be written as \(y = c_1\cos x + c_2\sin x\).