๐งฎ Linear Algebra Kingdom ยท Linear Algebra
Vector Spaces & Subspaces
Which sets of vectors are worlds in their own right: check that a set contains the zero vector and is closed under addition and scaling, tell a plane through the origin from one that misses it, name the rule a set breaks, and give the dimension of the subspace that survives.
In short
- A subspace is a set of vectors that contains the zero vector and stays inside itself under both addition and scalar multiplication โ three checks, no more.
- An equation with 0 on the right gives a subspace; the same equation with any other number on the right does not, because the zero vector is no longer a solution.
- To show a set is not a subspace you need only one witness: two members whose sum leaves, or one member and a scalar that carries it out.
- The dimension of a subspace given by a homogeneous system is the number of unknowns minus the number of genuinely different equations, counted after reducing.
- The intersection of two subspaces is always a subspace; the union almost never is, because a vector from each part can add to something in neither.
A set you can live inside
Cartwright Vela does not ask what a set of vectors is. She asks whether you could live in it: whether you can start somewhere sensible, and whether the two things you are allowed to do to a vector โ add another one, or stretch it โ ever throw you out.
A set H of vectors inside Rn is a subspace when all three of these hold.
- The zero vector is in H. There is somewhere to start.
- H is closed under addition. If u and v are both in H, then u + v is in H.
- H is closed under scalar multiplication. If u is in H and c is any number, then cu is in H.
That is the whole definition. Notice what it does not say. It says nothing about how the set was described, nothing about how big it is, and nothing about whether the vectors look tidy. Two sets written in completely different ways can both be subspaces, and two sets written almost identically โ "= 0" against "= 4" โ can differ.
The three checks are worth running in that order, because the first one is the cheapest. Putting 0 into every slot takes a second, and if the condition does not survive it, you are finished: no zero vector means no subspace, whatever else is true.
There is a reason the zero check comes free once the other two hold. If H has anything at all in it, say u, then closure under scaling with c = 0 gives 0u = 0, which is the zero vector. So a non-empty set that is closed under scaling must contain the zero vector. The zero check is really a check that the set is not empty and is not shifted away from the origin.
In R2 there are only three kinds of subspace: the origin on its own, a line through the origin, and the whole plane. In R3 there are four: the origin, a line through the origin, a plane through the origin, and all of R3. Anything bent, shifted, one-sided or cut short is not on the list.
The constant on the right decides everything
Compare these two sets in R3.
H = { (x, y, z) : 2x - 3y + z = 0 } K = { (x, y, z) : 2x - 3y + z = 4 }
They are drawn with the same pen. Both are flat sheets, and they are parallel to each other. Only one of them is a subspace.
Put the zero vector into H's condition. Every term carries a variable, so the left-hand side comes out as 0, and the condition reads 0 = 0. True: the zero vector is in H. Do the same in K and the condition reads 0 = 4, which is not true, so the zero vector is not in K and K is not a subspace.
An equation with 0 on the right is called homogeneous, and the pattern generalises: the solution set of any homogeneous linear equation, or any system of them, is a subspace. The reason is that all three checks come out of the same arithmetic. If u and v both solve 2x - 3y + z = 0, then adding the two equations shows u + v solves it, and multiplying one of them by c shows cu solves it too. Nothing about that argument cares how many equations or how many unknowns there are.
A set that is not built from an equation can still be a subspace, and often it is described by a span instead: the set of all multiples of one vector, or all combinations of two. A span is always a subspace, because a combination of combinations is another combination. That gives you two families that need no checking at all โ the solution set of a homogeneous system, and the span of any list of vectors โ and between them they cover most of the subspaces you will ever meet.
The other side of the same coin: a set given by an equation with a non-zero constant, or by a condition with a squared term, or by an inequality, is worth checking properly rather than guessing.
Breaking a closure check needs one witness
To show a set is a subspace you have to argue about every vector in it. To show it is not, you only need one specific example โ a witness โ and then you are done.
Half a plane. Take H = { (x, y) : x >= 0 }, the right-hand side of the plane. The zero vector is in it. Adding two vectors with non-negative first entries gives another one, so it survives addition. But scaling breaks it: [1, 0] is in H, and (-1)[1, 0] = [-1, 0] is not. One witness, and H is out. This is worth remembering as its own shape: a set can be closed under addition and still not be closed under scaling.
The two axes. Take H = { (x, y) : xy = 0 }, which is exactly the pair of axes. The zero vector is in it. Scaling keeps a vector on whichever axis it started on, so scaling is fine. Addition is what breaks: [1, 0] and [0, 1] are both in H, and their sum [1, 1] has product 1, not 0. Each axis on its own is a subspace, and their union is not โ which is the general fact that the union of two subspaces is almost never a subspace.
A curve. Take H = { (x, y) : y = x2 }. It passes through the origin, so the zero check is fine. But [1, 1] and [2, 4] are both on the curve and their sum [3, 5] is not, since 32 is 9. Anything that bends leaves its own chords.
Choosing a good witness is a small skill of its own. For scaling, try the scalar -1, or a fraction such as 1/2 when the set only holds whole numbers. For addition, try two vectors that sit in genuinely different parts of the set โ one on each axis, one on each branch โ rather than two that look alike.
How big a subspace is, and how two of them meet
Once a set is known to be a subspace, the natural question is how much room there is inside it. That number is its dimension: how many independent directions you can travel in without leaving.
For a subspace given by a homogeneous system, there is a count that always works.
dimension = (number of unknowns) - (number of genuinely different equations)
The word genuinely is doing the work. Two equations that are multiples of one another say the same thing twice and only count once, which is why you row reduce the coefficients before counting. In R3, one real equation leaves 2 โ a plane. Two real equations leave 1 โ a line. Three leave 0 โ the origin on its own.
For a subspace given as a span, the dimension is the number of independent vectors among the ones listed, which again is a count you take after reducing, not before.
Two subspaces at once. Suppose H and K are both subspaces of the same space.
- Their intersection, the vectors lying in both, is always a subspace. The zero vector is in both, so it is in the overlap; and if two vectors are in H and in K, so is their sum, because each of H and K is closed on its own.
- Their union, the vectors lying in one or the other, usually is not. Take a vector from H that is not in K and one from K that is not in H: both are in the union, and their sum is normally in neither. The pair of axes above is exactly this happening.
Two planes through the origin of R3 meet in a line through the origin, unless they are the same plane, in which case they meet in that whole plane. Two different lines through the origin meet only at the origin. In every case the intersection is a subspace, and it is never bigger than either of the two you started with.
Worked examples
Example 1
Is H = { (x, y) : 3x - 2y = 0 } a subspace of R2? Run all three checks.
- Zero vector first. Putting x = 0 and y = 0 gives 3(0) - 2(0) = 0, and the condition asks for 0, so the zero vector is in H.
- Addition next. Suppose u = (u1, u2) and v = (v1, v2) are both in H, so 3u1 - 2u2 = 0 and 3v1 - 2v2 = 0.
- Add those two equations: 3(u1 + v1) - 2(u2 + v2) = 0 + 0 = 0, which is exactly the condition for u + v. So H is closed under addition.
- Scaling last. Multiply 3u1 - 2u2 = 0 through by any number c: 3(cu1) - 2(cu2) = c(0) = 0, so cu is in H too.
- All three checks hold, so H is a subspace. It is the line through the origin with slope 3/2, and its dimension is 2 - 1 = 1.
Example 2
Is S = { (x, y) : |x| = |y| } a subspace of R2? If not, name the first check it misses.
- Zero vector: |0| = |0| is true, so the zero vector is in S and the first check holds.
- Addition: look for a witness. [1, 1] is in S because |1| = |1|, and [1, -1] is in S for the same reason.
- Their sum is [2, 0], and |2| is not |0|, so the sum has left S. The second check is missed.
- For completeness, scaling would have been fine: if |x| = |y| then |cx| = |c||x| = |c||y| = |cy|.
- So the first check S misses is closure under addition, and S is not a subspace. It is a pair of crossing lines โ each line on its own is a subspace, but the two together are not.
Example 3
H = { (x, y, z) : x + y + z = 0 and x - z = 0 } is a subspace of R3. Find its dimension, and find the value of k for which [2, k, 2] is in H.
- Both equations are homogeneous, so H really is a subspace and the counting rule applies.
- The two rows of coefficients are [1, 1, 1] and [1, 0, -1]. Neither is a multiple of the other, so both equations count: there are 2 genuinely different conditions.
- Three unknowns minus 2 conditions leaves a dimension of 1, so H is a line through the origin.
- Now the vector. Check the second condition first: 2 - 2 = 0, which holds whatever k is.
- Substitute into the first: 2 + k + 2 = 0, so k + 4 = 0 and k = -4.
- Check both conditions with k = -4: 2 + (-4) + 2 = 0 and 2 - 2 = 0. Both hold, so [2, -4, 2] is in H.
Practice problems, with solutions
Three problems of increasing difficulty, each with the full working. In the game these are generated fresh every time; these three are fixed so this page always shows the same ones.
Problem 1
Difficulty 1 of 5H = { (x, y) : -x + y = -5 } is a set of vectors in R2. Is the zero vector in H? Choose the statement that is right, and right for the right reason.
- No: the zero vector belongs to nothing except the set that contains it alone.
- Yes: the zero vector belongs to every set of vectors, whatever its condition.
- Yes: putting 0 into every slot makes the condition true.
- No: putting 0 into every slot does not make the condition true.
Answer: D. No: putting 0 into every slot does not make the condition true.
- The zero vector of R2 is [0, 0].
- Every term on the left carries a variable, so putting 0 into each slot leaves 0 on the left.
- The condition then reads 0 = -5, which is not true, so the zero vector is not in the set.
Problem 2
Difficulty 3 of 5Exactly one of these four sets is a subspace of R2. Which one?
- { (x, y) : y = x2 }
- { (x, y) : x >= 0 }
- the set of all multiples of [-1, -2]
- { (x, y) : y = 4 }
Answer: C. the set of all multiples of [-1, -2]
- the set of all multiples of [-1, -2] passes all three checks: the zero vector is in it, a sum of two of its vectors is still in it, and any multiple of one of them is still in it.
- { (x, y) : y = x2 } is not a subspace. A curve bends away from its own chords: [1, 1] and [2, 4] are both on it, and their sum [3, 5] is not.
- { (x, y) : y = 4 } is not a subspace. Every vector in that set has y = 4, and the zero vector has y = 0.
- { (x, y) : x >= 0 } is not a subspace. Half a plane is closed under addition, but multiplying a member by a negative scalar carries it into the other half โ and a subspace has to survive every scalar.
Problem 3
Difficulty 4 of 5H = { (x1, x2, x3, x4) : 5x1 - 5x3 - 4x4 = 0 } K = { (x1, x2, x3, x4) : 3x1 - 3x2 - x3 - 5x4 = 6 } Which of them is a subspace of R4?
- Neither H nor K.
- Both H and K.
- K only.
- H only.
Answer: D. H only.
- H has 0 on the right, so the zero vector satisfies it, and a sum or a multiple of solutions is another solution: H is a subspace.
- K has 6 on the right, so the zero vector is outside K and K is not a subspace.
- So the answer is H only.
Common mistakes
- Deciding a set is a subspace because it looks flat and straight, without checking whether it passes through the origin โ a line with a constant term misses the zero vector entirely.
- Testing only closure under addition and stopping there, which passes a half-plane like x >= 0 that a negative scalar immediately breaks.
- Treating the union of two subspaces as a subspace, when the sum of one vector from each part usually lands outside both.
- Counting the equations written down rather than the genuinely different ones, so a condition repeated in disguise takes away a direction it never had a right to.
- Giving the dimension of the surrounding space instead of the subspace, or naming the shape ("a plane") when the question asked for the number.
What you should be able to do
- Decide whether a set of vectors is a subspace, and name the rule it breaks when it is not.
- Tell a line or plane through the origin from one that does not pass through it.
- Find the value that puts a vector inside a given subspace.
- Give the dimension of a stated subspace, and say what the intersection of two subspaces is.
Where this fits in the curriculum
Common Core
- HSN-VM.B.4
High school โ Add and subtract vectors.
HSN-VM.B.4 is a (+) standard โ beyond the college- and career-ready threshold, i.e. precalculus rather than Algebra II.
- HSN-VM.B.5
High school โ Multiply a vector by a scalar.
HSN-VM.B.5 is a (+) standard โ beyond the college- and career-ready threshold, i.e. precalculus rather than Algebra II. A subspace is a set closed under exactly the two operations HSN-VM.B.4 and HSN-VM.B.5 name. The Common Core teaches those operations on vectors and goes no further: a vector space, the closure rules and the zero-vector test are university content, and the Common Core stops before them.