Vector spaces — exam-style exercises with colours and subspaces of R⁴: bases, implicit equations, Grassmann and a Campus-style quiz (and the parameter I got wrong)
In quiz 3 on the Campus I got a multiple-choice question wrong that today looks like one of the easiest: for which value of a parameter a vector was in the subspace spanned by two others. There is a route that never fails: get the implicit equations of the subspace and substitute the vector. The parameter comes out of a first-degree equation. Today’s exercise 2 is exactly that, with other numbers, and there is another one like it in the quiz.
Table of Contents
How to use this article
In the AG exam, : T is the 20-question test taken from the Campus quizzes and P, the written exercises. You can see how it combines with the quizzes and the assignments in the AG grade calculator.
In recent years’ exams, exercise 1 is always about subspaces of and is worth between 10 and 12 points out of 50: bases, dimensions, parametric and implicit equations, sum, intersection, Grassmann and whether they are complementary. That is why exercise 3 here has exactly that format, with its marks. The first two are shorter, with the format of one part of a question, and at the end there is a 20-question quiz like quiz 3.
- Do each exercise on paper: decide first whether you will write the vectors as rows or as columns.
- Compare with the expected result and, if it does not match, open the hint before looking at the solution.
- In “What’s wrong here?”, look for the mistake yourself before reading the explanation.
- Do the quiz and check the exercises in MATLAB or in the Gauss-Jordan step-by-step simulator, which gives you the rank and pivots of any matrix with exact fractions.
If some method gets stuck, go back to the vector spaces guided practice.
Exercise 1 (basic level): four colours
Exercise 1. [3 points] Let in (magenta, cyan and two mixes). a) (1 point) Compute and say whether is a spanning set of . b) (1 point) Give a basis of made of vectors of , its dimension and some implicit equations. c) (1 point) Does the colour belong to ? If it does, write it as a combination of the basis.
Expected result: , it does not span ; , , ; yes, .
Add and subtract the first two vectors. And for the implicit equation, think about how blue relates to red and green in magenta and in cyan.
Exercise 2 (intermediate level): a vector with a parameter
Exercise 2. [3 points] In , let and the vector , with . a) (1 point) Compute some implicit equations of . b) (1 point) For which values of does belong to ? For that value, write as a combination of the basis. c) (1 point) For , compute the dimension and some implicit equations of .
Expected result: ; only if , with ; , .
In the parametric equations of , and are the parameters themselves. For c), notice which of the two implicit equations of still satisfies with .
Exercise 3 (challenge): how it appears in the exam
Exercise 3. [10 points] Consider the subspaces of : and . a) (4 points) Compute a basis, the dimension and some implicit equations of , and a basis, the dimension and some parametric equations of . b) (4 points) Compute a basis, the dimension and some implicit equations of , and a basis, the dimension and some parametric equations of . c) (2 points) Justify whether the vector belongs to and/or to , and whether and are complementary.
Expected result: , , ; , ; , ; ; the vector is in the sum but not in the intersection; they are not complementary.
The third and fourth spanning vectors of are simple mixes of the first two. And look carefully at the basis of : you have already seen one of its vectors in .
What’s wrong here?
Three solutions with one mistake each. Read, find the mistake and then the explanation.
Fragment 1: two planes that fill R⁴
U1 = L{(1,0,0,0), (0,1,0,0)} dim U1 = 2
U2 = L{(1,1,0,0), (0,0,1,0)} dim U2 = 2
dim(U1 + U2) = dim U1 + dim U2 = 2 + 2 = 4
So U1 + U2 = R^4 and U1, U2 are complementary.
Predict: is it true that the sum is all of ?
No. Adding dimensions only works if the intersection is , and here it is not: is in and also in (it is the sum of its two vectors). Merging the bases, is spare, and the rank is 3: . No vector of the sum has a fourth component, so . Grassmann: , with .
Using without looking at the intersection. The dimension of the sum is computed with the rank of the merged bases; Grassmann is used afterwards to get (or check) the one of the intersection.
Fragment 2: a line with a single equation
U = L{(1, 2, 0, 1)} in R^4
Parametric: x = λ, y = 2λ, z = 0, t = λ
I isolate λ = x and substitute into y: y = 2x
Implicit equations of U: 2x - y = 0
Predict: does describe the subspace ?
No: a single equation in describes a subspace of dimension , and is a line (dimension 1). It needs equations. Substituting in all the parametric equations: , and . For example, satisfies and is not in .
Stopping at the first equation that comes out. Before writing, work out how many are due () and do not stop until you have them all.
Fragment 3: a subspace that is not one
W = {(x, y, z) in R^3 : x · y = 0}
1) (0, 0, 0): 0 · 0 = 0, it is in W.
2) If (x, y, z) is in W, λ(x, y, z) = (λx, λy, λz) and (λx)(λy) = λ² · xy = 0.
So W is a vector subspace.
Predict: is it a subspace?
No. The sum was not checked: and are in ( and ), but their sum is not (). is two planes, and , stuck together: each one is a subspace, but not together.
Checking two of the three conditions. An equation that is not linear (with products of coordinates, squares or a constant term) almost never gives a subspace: look for a counterexample before trying to prove it.
Solutions
Exercise 1
Before you row-reduce, think about what you’re really being asked. In the rank never goes above 3, so four colours are always dependent: that isn’t even a question. The real question is whether the rank reaches 3. If it does, you can make any colour; if it stays at 2, you only get a plane.
I put the vectors in rows, not columns: the rank is the same, but a row you don’t touch while reducing is still a vector of , and that’s exactly what b) asks for, a basis “made of vectors of “. That’s why magenta and cyan go on top: they aren’t proportional.
a) Notice that and . Row-reducing:
: it is not a spanning set of . With these four colours you only get a plane of colours.
The staircase above, row by row:
| Step | Operation | Row you get | Why |
|---|---|---|---|
| 1 | You clear the 1 in the first column with magenta’s pivot | ||
| 2 | Same with the fourth row | ||
| 3 | The pivot is now cyan’s 1, in the second column | ||
| 4 | You add because there’s a under the pivot |
The two rows that become zero are exactly the two mixes you had already spotted: a zero in the staircase is a vector you don’t need. If you already saw the mixes, reducing tells you nothing new, but in the exam it’s what proves the rank is 2.
b) The first two rows were not touched and are vectors of , so and . There will be implicit equation:
In the colours of , blue is the sum of red and green. Check: magenta, ; cyan, .
c) : , so it belongs. As the basis is magenta and cyan, the coordinates are read from the first two components: . Check the third: .
Why it is done this way: with vectors of and a basis of two, the determinant with gives the implicit equation in one line. And for membership, substituting into the implicit equation is faster than setting up the system.
How it is marked (indicative, mine): a) 0.5 the rank and 0.5 the conclusion; b) 0.5 the basis and dimension, 0.5 the implicit equation; c) 0.5 the justified membership and 0.5 the combination.
Exercise 2
The three parts are the same question in disguise: “does this vector belong?”. That’s why the implicit equations come first: with them, belonging means substituting and checking whether you get 0. The obvious route for b), setting up or row-reducing with the inside, also works, but you drag the parameter through every row. With the implicit equations, only shows up in one equation.
And they almost write themselves. Look at the first and fourth components of the generators: and . There the basis looks like the identity, so and without solving for anything. Always look for those components before eliminating parameters the hard way.
a) The parametric equations of :
With and , the other two give the implicit equations ():
b) I substitute : the second equation gives , always; the first, , so . Only with , , and with , :
c) With , is not in , so adding it raises the rank: , and there will be implicit equation. still satisfies (), as do the two vectors of , so that equation holds for the three and for all their mixes:
Why it is done this way: with a parameter, substituting into the implicit equations turns “does it belong?” into an equation with one unknown. And in c) nothing needs to be row-reduced: if and its three spanning vectors satisfy one equation, that is the implicit equation.
It isn’t luck that one equation of works for . contains , so every equation of is also satisfied by , and the ones satisfies are its two implicit equations and their mixes: the one for has to be . With , the first gives 3 and the second 0, so you need : , and you’re left with . If satisfied neither of the two, you’d do the same: set up the mix and solve.
Check you’ve got it: what would c) give with instead of ?
The same: and . Step by step: gives in the first implicit equation, so it isn’t in and the rank goes up to 3. In the second it gives , as it does for any . Three independent vectors inside , which has dimension 3, fill it completely: for any , is that same space.
How it is marked (indicative):
| Part | What is assessed | Points |
|---|---|---|
| a) | Parametric equations and the two implicit ones | 1 |
| b) | , justified with the implicit equations | 0.5 |
| b) | The combination | 0.5 |
| c) | , justified | 0.5 |
| c) | The implicit equation of | 0.5 |
Exercise 3
Before calculating anything, look at how each subspace is given: with generators and with equations. And the rule for b) never changes: the sum with bases, the intersection with equations. A vector of the sum is one from plus one from , so it’s generated by both bases together; a vector of the intersection satisfies the conditions of both, so it’s described by both lists of equations together. That’s why a) asks for exactly what each one is missing:
| Subspace | What you have | What you’re missing |
|---|---|---|
| Four generators | Basis and implicit equations | |
| Two implicit equations | Basis and parametric equations |
The obvious route for the intersection, setting a mix of one basis equal to a mix of the other, also works, but that’s four new unknowns, and at the end you still have to rebuild the vector.
Finding the intersection by looking for the vector that appears in both bases. It works here because the exercise is designed that way. satisfies both equations of , so is another basis of , and now nothing repeats; the intersection is still , because . The equations don’t depend on the basis; the repeated vectors do.
a) . and . The first two are not proportional, so
Implicit equations (), from the parametric ones , , , : with and ,
a) . Two independent equations: . They are already in echelon form with pivots in and ; free ones , : , .
b) Sum. Merging the bases, appears twice, so there are at most three different vectors: , and . They are independent (the staircase , , is already in echelon form, with pivots in columns 1, 2 and 3):
One implicit equation (): the three vectors satisfy (, , ), which was also an implicit equation of :
b) Intersection. The four implicit equations together: , , , . From the third, ; then the first gives , and the second, (the fourth, , is spare). With :
, and Grassmann agrees: . The vector repeated in the bases was exactly the intersection.
c) satisfies : it belongs to . It is not in the intersection: . And and are not complementary for two reasons: (it has dimension 3) and .
Why it is done this way: in a) you save row-reducing by spotting the mixes, but in the exam it is worth writing them (or row-reducing) so that it is clear where the dimension comes from. In b) the intersection is solved with equations and the sum with bases, and Grassmann checks both at once.
How it is marked (indicative):
| Part | What is assessed | Points |
|---|---|---|
| a) | Basis and dimension of , justified | 1 |
| a) | Implicit equations of | 1 |
| a) | Basis, dimension and parametric equations of | 2 |
| b) | Basis, dimension and implicit equation of | 2 |
| b) | Basis, dimension and parametric equations of | 2 |
| c) | Membership of the sum and of the intersection | 1 |
| c) | Not complementary, with both reasons | 1 |
Check it in MATLAB
The three exercises in one MATLAB session (the same code works in the website’s MATLAB playground):
format rat %% Exercise 1 S = [1 0 1; 0 1 1; 1 1 2; 1 -1 0]; rank(S) null(S(1:2, :), 'r')' % coefficients of the implicit equation of U %% Exercise 2 syms a det([1 2 1 0; 0 1 1 1; 1 a 2 1; 1 0 0 0]) % zero when v is in U (with a = 3) null([1 2 1 0; 0 1 1 1; 1 0 2 1], 'r')' % c) implicit equation of W with a = 0
Output:
ans =
2
ans =
-1 -1 1
ans =
3 - a
ans =
1 0 -1 1
In exercise 1, null gives , the coefficients of , which is our implicit equation with the sign changed. In exercise 2, the determinant with any fourth vector that completes the basis only vanishes when falls in : , zero at . And the implicit equation of comes out as , that is, . Now exercise 3:
%% Exercise 3 S1 = [1 -1 0 1; 0 1 1 0; 1 0 1 1; 2 -3 -1 2]; [R1, p1] = rref(S1'); B1 = S1(p1, :) % basis of U1 with original vectors E1 = null(B1, 'r')' % implicit equations of U1 B2 = null([1 1 0 0; 0 1 0 1], 'r')' % basis of U2 rank([B1; B2]) % dim(U1 + U2) null([E1; 1 1 0 0; 0 1 0 1], 'r')' % basis of the intersection
Output:
B1 =
1 -1 0 1
0 1 1 0
E1 =
-1 -1 1 0
-1 0 0 1
B2 =
0 0 1 0
1 -1 0 1
ans =
3
ans =
1 -1 0 1
The rows of E1 are the coefficients of the implicit equations of : is and is , ours with the sign changed (multiplying an equation by changes nothing). The basis of is the one on paper, the sum has dimension 3 and the intersection comes out as .
Campus-style quiz
Twenty questions like those in Campus quiz 3 (the vector spaces and subspaces part; the dot product part is in the topic 4 quiz). It does not count for anything and you can repeat it as many times as you like. In questions with several correct answers, as in the exam, each wrong option you tick cancels a correct one.
Say whether each statement is true or false (in ):
- Two linearly independent vectors form a basis of .
- Four vectors of are always linearly dependent.
- Three vectors of always span .
- A set containing the vector is linearly dependent.
Solution
- F — Two linearly independent vectors form a basis of .
- T — Four vectors of are always linearly dependent.
- F — Three vectors of always span .
- T — A set containing the vector is linearly dependent.
A basis of has exactly 3 independent vectors: two only span a plane, and three can be dependent (for example, if one is the sum of the others). With more vectors than the dimension there is always dependence, and is a zero combination with a non-zero coefficient.
The set is:
- Linearly dependent
- Linearly independent
- A basis of
- A spanning set of
Solution
Answer: Linearly dependent
: two proportional vectors are dependent, and they only span a line.
What is the dimension of the subspace of defined by , ?
- 2
- 1
- 3
- 0
Solution
Answer: 2
The second equation is twice the first, so there is only one independent equation: , a plane.
In , a subspace has dimension 2. How many independent implicit equations does it need? Write just the number.
Solution
Answer: 3
No. of implicit equations .
In , , and . Then is:
- 1
- 0
- 2
- 5
Solution
Answer: 1
Grassmann: , so .
In , , and . Then:
- : they are complementary
- It cannot be known without the bases
Solution
Answer: : they are complementary
Grassmann: , so the sum is all of and, with a zero intersection, it is direct: they are complementary.
Which of these subsets of are vector subspaces?
Solution
Answer: ·
Linear homogeneous equations (no constant term, no powers) define subspaces. With a constant term you lose , and with a power you lose the product by scalars.
For which value of does belong to the subspace ?
Solution
Answer:
If , then , and the third component gives , so . With the implicit equation you get the same: .
Match each set of with what it is:
| {(1,0,0), (0,1,0), (0,0,1), (1,1,1)} | |
| {(1,1,0), (0,1,1), (1,0,1)} | |
| {(1,1,0), (0,1,1)} | |
| {(1,2,3), (2,4,6)} |
Definitions:
- Independent but not a basis
- Basis
- Spanning but not a basis
- Neither independent nor spanning
Solution
- {(1,0,0), (0,1,0), (0,0,1), (1,1,1)} → Spanning but not a basis
- {(1,1,0), (0,1,1), (1,0,1)} → Basis
- {(1,1,0), (0,1,1)} → Independent but not a basis
- {(1,2,3), (2,4,6)} → Neither independent nor spanning
Four vectors with rank 3 span but one is spare. Yellow, cyan and magenta have determinant 2: basis. Two independent vectors only give a plane. And two proportional ones give a line.
Complete the definition:
A set of vectors is a ____ of if it is linearly ____ and a ____ set of . The number of vectors in any basis is the ____ of .
Words:
- dependent
- independent
- basis
- subspace
- dimension
- rank
- spanning
Solution
A set of vectors is a basis of if it is linearly independent and a spanning set of . The number of vectors in any basis is the dimension of .
Both conditions at once: no vector is spare (independent) and none is missing (spanning). All bases have the same number of vectors, the dimension.
The implicit equations of in are:
Solution
Answer:
Parametric: , , . Substituting, , that is, . Check: gives and gives .
What is the rank of the set ? Write just the number.
Solution
Answer: 2
The third is the sum of the first two and the fourth, their difference: there are only two independent directions.
In the basis of , the coordinates of the vector are:
Solution
Answer:
: and , so , . Check: .
If is a basis of and the standard basis, the change-of-basis matrix is:
- The one with the vectors of as columns
- The one with the vectors of as rows
- The inverse of the one with the vectors of as columns
- The identity
Solution
Answer: The one with the vectors of as columns
Each column of is the coordinates of one vector of in the standard basis, that is, the vector itself. The inverse goes back.
To compute a basis of , what can you do?
- Put the implicit equations of and together and solve the system
- Require a generic vector of (with its parameters) to satisfy the implicit equations of
- Merge the bases of and and row-reduce
- Keep the vectors of the basis of that are in
Solution
Answer: Put the implicit equations of and together and solve the system · Require a generic vector of (with its parameters) to satisfy the implicit equations of
A vector is in the intersection if it satisfies the conditions of both subspaces. The first two ways impose exactly that. The last one fails, for example, with two planes of meeting in a line that contains none of the basis vectors.
About the dimension of some vector spaces:
- .
- The space of polynomials of degree at most 2 has dimension 3.
- .
Solution
- T — .
- T — The space of polynomials of degree at most 2 has dimension 3.
- F — .
matrices have 4 free positions; polynomials , three coefficients (basis ). The zero subspace has dimension 0: it has no independent vector.
Order the steps to obtain a basis of made of vectors of :
- Write the vectors of as columns of a matrix
- Look at which columns have a pivot
- Compute the reduced row echelon form by Gauss-Jordan
- Copy from the vectors of those columns
Solution
Correct order:
- Write the vectors of as columns of a matrix
- Compute the reduced row echelon form by Gauss-Jordan
- Look at which columns have a pivot
- Copy from the vectors of those columns
Row operations do not change which columns are combinations of which, so the pivots point to independent original vectors. They are copied from the statement, not from the reduced form.
A subspace of has parametric equations , , , . Its dimension is:
- 2
- 4
- 1
- 3
Solution
Answer: 2
There are two parameters and the vectors with each one, and , are not proportional: .
In , let be the plane and :
- .
- .
- and are complementary.
- can be written in two different ways as the sum of a vector of and one of .
Solution
- T — .
- T — .
- T — and are complementary.
- F — can be written in two different ways as the sum of a vector of and one of .
does not satisfy , so the line only meets the plane at the origin and : a direct sum equal to . In a direct sum the split is unique: .
When you row-reduce the matrix with the basis vectors of as rows and the row below, the last row ends up as and the pivots of the other rows are in columns 1 and 2. The implicit equations of are:
- ,
- ,
- They cannot be known without the basis
Solution
Answer: ,
For the rank not to grow, the positions of the last row with no pivot above them must be 0: and . There are two, , as expected.
What next?
With this topic you have the whole of exam exercise 1. In topic 4, the Euclidean space, a dot product is added to these same vectors to measure lengths and angles, and the second half of Campus quiz 3 (norm, angle, orthogonality and Gram matrix) comes from there. Start with the Euclidean space theory. And if you are not yet fluent with the systems underneath each implicit equation, review the systems of linear equations exercises or practice in the Gauss-Jordan step-by-step simulator.
Cheat sheet: vector spaces and subspaces
The essentials in 30 seconds: almost everything is the rank. = no. of vectors independent; in spanning; both basis. . Implicit equations: . Grassmann: .
| I want… | By hand | MATLAB |
|---|---|---|
| To know if they are independent | Rank = no. of vectors (or if square) | rank(S) |
| Any basis of | Vectors as rows, row-reduce, non-zero rows | rref(S) |
| A basis with original vectors | Vectors as columns, reduced form, pivot columns | [R, piv] = rref(S’); S(piv, 🙂 |
| Coordinates in a basis | Basis as columns, solve | P \ X |
| Change of basis | (columns of and of ) | Q \ P |
| Basis from implicit equations | Solve the homogeneous system and split by parameters | null(A, ‘r’) |
| Implicit equations from a basis | Eliminate parameters, or rank of [basis; x] = dim | null(B, ‘r’)’ |
| Sum | Merge bases and row-reduce | rank([B1; B2]) |
| Intersection | Merge implicit equations and solve | null([E1; E2], ‘r’) |
Template for the exam exercise:
- Each subspace: basis, dimension, parametric and implicit equations (whichever are asked).
- Sum: merge bases, rank, basis, implicit equations (or “it is all of , it has none”).
- Intersection: merge implicit equations, solve, basis and parametric equations.
- Grassmann to check.
- Membership: substitute into the implicit equations. Complementary: sum and intersection .
| Symptom | Likely cause |
|---|---|
| An implicit equation that a basis vector does not satisfy | Sign error when isolating or expanding the determinant |
| You added dimensions instead of computing the rank | |
| The basis is not inside the subspace | You copied the reduced form instead of the original vectors |
| Grassmann does not agree | Either the sum or the intersection is wrong: redo the one with fewer calculations |
| “Complementary” with a non-zero intersection | You only checked that the sum is |
Before handing in, ask yourself:
- Did I count how many implicit equations are due before writing them?
- Do all the vectors of each basis satisfy their implicit equations?
- Does Grassmann agree with my dimensions of the sum and the intersection?
- If original vectors are asked for, did I copy them from the statement?
Did this article help you? Here is how you can support SergioLearns →
Ready for the exam?AG theory mock exam — the 20-question test with the Campus rules, no negative marking (and the catch in the several-correct ones)


