Subspaces and the subspace test
You learn to check with a three-step test whether a set inside a vector space is a subspace; to recognize the typical subspaces and trap sets in Rⁿ, M₂₂ and P₂; and how intersection and union behave.
Last week we defined a vector space with ten axioms. Fortunately, most of the time you don’t need to check ten axioms one by one: if the set you have is inside a known vector space (for example, a part of ), you only look at three things. This is called the subspace test. It is a question type that almost certainly appears on the midterm and the final: “Determine whether is a subspace. Prove or give a counterexample.” Three or four choices, each a few minutes.
Golden rules:
- The first thing to do is to check whether . If not, the answer is “no” and it ends in one line.
- If is in, you are not done: check closure under addition and scalar multiplication too.
- If it is not a subspace, don’t write a general proof: give one concrete numerical counterexample.
- If it is a subspace, write a general proof: take arbitrary and show the condition holds.
Definition and test
Let be a vector space and a nonempty subset. If is a vector space on its own with the operations of , then is called a subspace of .
The subspace test. is a subspace if and only if:
- ,
- (closed under addition),
- , (closed under scalar multiplication).
Why is it enough? Axioms such as commutativity, associativity and distributivity are already true in ; since the elements of are also elements of , they hold automatically. The only risk is the operations leaving .
Every vector space has two “boring” subspaces: (the trivial subspace) and itself.
Subspaces of R³
The subspaces of are exactly these: , lines through the origin, planes through the origin, and . A line or plane that does not pass through the origin cannot be a subspace because it does not contain the zero vector.
Example 1 (yes). . The full write-up of the proof:
(1) 0 - 2·0 + 5·0 = 0 → (0,0,0) ∈ W
(2) u = (x1,y1,z1), v = (x2,y2,z2) ∈ W. For u + v:
(x1+x2) - 2(y1+y2) + 5(z1+z2) = (x1 - 2y1 + 5z1) + (x2 - 2y2 + 5z2) = 0 + 0 = 0
(3) for cu: cx1 - 2cy1 + 5cz1 = c(x1 - 2y1 + 5z1) = c·0 = 0
→ W is a subspace (a plane through the origin)
Example 2 (no, no zero). : .
Example 3 (no, zero is there but not closed). . . , but for , .
PITFALL · “the zero is in, so it’s a subspace”. The zero vector is necessary but not sufficient. In Example 3 and in Q3 the zero is in, but the set is not closed under scalar multiplication.
The solution set of Ax = 0
If is , the set of all solutions of is a subspace of . It is called the null space (solution space) of :
- ,
- ,
- .
All the “yes” answers in Q1, Q8, Q9, Q12 are really special cases of this theorem: the condition is linear equations with a zero right-hand side.
If , the solution set of is not a subspace: . Also the sum of two solutions gives . For example, for (second equation ), is a solution, but for , .
Matrix and polynomial subspaces
The same test, the same logic. Don’t be scared because the elements are matrices or polynomials; write the condition in terms of the coefficients.
| Set | Subspace? | Reason |
|---|---|---|
| Symmetric () | Yes | , |
| Trace 0 () | Yes | homogeneous linear equation |
| Upper triangular | Yes | |
| No | ||
| Invertible matrices | No | the zero matrix is not invertible |
| No | is in, | |
| , | Yes | |
| , | No | for the zero polynomial |
| , integer coefficients | No | is not in the set |
| Continuous , | Yes | , |
Quick intuition: If the condition is homogeneous linear equation(s) (every term is a constant multiple of a variable, right side 0), the set is a subspace. If the condition has a product, a square, an absolute value, an inequality, a nonzero constant, “integer” or a determinant, it most likely is not. Intuition lets you decide quickly; on the exam still write the justification.
Ready-made counterexamples
xy = 0 : (1,0) + (0,1) = (1,1), 1·1 ≠ 0
x ≥ 0 : (-1)·(1,0) = (-1,0)
integers : (1/2)·(1,0) = (1/2,0)
y = x² : 2·(1,1) = (2,2), 2 ≠ 4
det = 0 : diag(1,0) + diag(0,1) = I
right side ≠ 0: the zero vector is not in the set
Intersection and union
If and are subspaces:
- is always a subspace. is in both sets; the sum of two vectors that are in both is in both.
- is generally not a subspace. In the union of the -axis and the -axis, is not there. (If one is inside the other, the union equals the larger one, and then it is a subspace.)
To find the intersection of two planes, solve the two equations together (Q12). The result is usually a line through the origin.
Common mistakes
| Wrong | Right |
|---|---|
| Saying subspace because | Check closure too |
| Using a vector that is not an element of in a counterexample | First show that |
| Proving “subspace” with a single numerical example | A general proof with arbitrary |
| Trying only positive for scalar multiplication | and break most sets |
| Thinking a plane not through the origin is a subspace | There is no zero vector |
| Thinking a union is a subspace | Intersection yes, union generally no |
| Thinking the condition in gives a subspace | The zero polynomial has |
| Thinking the set is “like a null space” | The determinant is not linear |
Test yourself
Exam-style questions. Solve them on paper first, then reveal the answer.
Is a subspace of ?
Show answer
(1) : , it is in. (2) : . (3) : .
A plane through the origin. A homogeneous linear equation (right side 0) always gives a subspace.
Is a subspace of ?
Show answer
: . The zero vector is not in the set, done.
Geometrically a plane that does not pass through the origin.
Is a subspace of ?
Show answer
but it is not closed under scalar multiplication: , and .
"The zero is there, so it's a subspace" is a trap.
Is a subspace of ?
Show answer
. is the set of all linear combinations of two vectors, that is, a span: always a subspace.
Direct test: gives zero; sums and scalar multiples again obey the rule "third = first + 2·second".
Is a subspace of ?
Show answer
Not closed under addition: , , but their sum has .
If the variables are multiplied in the condition, it is most likely not a subspace.
Is the set of all upper triangular matrices a subspace of ?
Show answer
Upper triangular: . The zero matrix is upper triangular. In the sum of two upper triangular matrices the entry is ; in the multiple, .
The condition is a single homogeneous linear equation ().
Is a subspace of ?
Show answer
and are singular (det 0), their sum is and .
Not closed under addition. (It is closed under scalar multiplication, but that is not enough.)
Is a subspace of ?
Show answer
The zero polynomial: . . .
For the condition is : a homogeneous linear equation.
Is a subspace of ?
Show answer
: , , . The condition is .
A homogeneous linear equation in the coefficients, that is, a null space: a subspace.
Alternatively: differentiation and evaluation are linear operations, , .
For which value of is a subspace of ?
Show answer
For we need , so is required.
When it is a homogeneous plane and all three conditions hold. If it is a shifted parallel plane, not a subspace.
Let be the -axis and the -axis in . Is a subspace?
Show answer
, , but is on neither axis.
A union is generally not a subspace. An intersection () is always a subspace.
Find the intersection of the subspaces and of .
Show answer
Solve the two equations together: , : , so .
Equation 1: . : .
The intersection of two planes is a line through the origin.
Verification: For the sets that are subspaces, closure was tested in node with 200 random integer vector pairs and scalars from each set using BigInt fractions; for the sets that are not subspaces, the given counterexamples were computed one by one; the null space in the intersection question was found with the exact RREF (verify/MAT1041/07.mjs).