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.

How to use this article

In the AG exam, EX=(T+P)/2EX = (T + P)/2: 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 R4\mathbb{R}^4 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 S={(1,0,1),(0,1,1),(1,1,2),(1,−1,0)}S = \{(1, 0, 1),\allowbreak (0, 1, 1),\allowbreak (1, 1, 2),\allowbreak (1, -1, 0)\} in R3\mathbb{R}^3 (magenta, cyan and two mixes). a) (1 point) Compute rg(S)rg(S) and say whether SS is a spanning set of R3\mathbb{R}^3. b) (1 point) Give a basis of U=L(S)U = L(S) made of vectors of SS, its dimension and some implicit equations. c) (1 point) Does the colour (2,3,5)(2, 3, 5) belong to UU? If it does, write it as a combination of the basis.

Expected result: rg(S)=2rg(S) = 2, it does not span R3\mathbb{R}^3; BU={(1,0,1),(0,1,1)}B_U = \{(1, 0, 1), (0, 1, 1)\}, dim⁡U=2\dim U = 2, U:r+g−b=0U : r + g – b = 0; yes, (2,3,5)=2(1,0,1)+3(0,1,1)(2, 3, 5) = 2(1, 0, 1) + 3(0, 1, 1).

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 R4\mathbb{R}^4, let U=L{(1,2,1,0),(0,1,1,1)}U = L\{(1, 2, 1, 0), (0, 1, 1, 1)\} and the vector v⃗=(1,a,2,1)\vec v = (1, a, 2, 1), with a∈Ra \in \mathbb{R}. a) (1 point) Compute some implicit equations of UU. b) (1 point) For which values of aa does v⃗\vec v belong to UU? For that value, write v⃗\vec v as a combination of the basis. c) (1 point) For a=0a = 0, compute the dimension and some implicit equations of W=L{(1,2,1,0),(0,1,1,1),v⃗}W = L\{(1, 2, 1, 0), (0, 1, 1, 1), \vec v\}.

Expected result: U:2x−y+t=0,  x−z+t=0U : 2x – y + t = 0, \; x – z + t = 0; v⃗∈U\vec v \in U only if a=3a = 3, with v⃗=(1,2,1,0)+(0,1,1,1)\vec v = (1, 2, 1, 0) + (0, 1, 1, 1); dim⁡W=3\dim W = 3, W:x−z+t=0W : x – z + t = 0.

In the parametric equations of UU, xx and tt are the parameters themselves. For c), notice which of the two implicit equations of UU v⃗\vec v still satisfies with a=0a = 0.

Exercise 3 (challenge): how it appears in the exam

Exercise 3. [10 points] Consider the subspaces of R4\mathbb{R}^4: U1=L{(1,−1,0,1),(0,1,1,0),(1,0,1,1),(2,−3,−1,2)}U_1 = L\{(1, -1, 0, 1),\allowbreak (0, 1, 1, 0),\allowbreak (1, 0, 1, 1),\allowbreak (2, -3, -1, 2)\} and U2={(x,y,z,t)∈R4:x+y=0,  y+t=0}U_2 = \{(x, y, z, t) \in \mathbb{R}^4 : x + y = 0, \; y + t = 0\}. a) (4 points) Compute a basis, the dimension and some implicit equations of U1U_1, and a basis, the dimension and some parametric equations of U2U_2. b) (4 points) Compute a basis, the dimension and some implicit equations of U1+U2U_1 + U_2, and a basis, the dimension and some parametric equations of U1∩U2U_1 \cap U_2. c) (2 points) Justify whether the vector (2,−1,3,2)(2, -1, 3, 2) belongs to U1+U2U_1 + U_2 and/or to U1∩U2U_1 \cap U_2, and whether U1U_1 and U2U_2 are complementary.

Expected result: dim⁡U1=2\dim U_1 = 2, BU1={(1,−1,0,1),(0,1,1,0)}B_{U_1} = \{(1, -1, 0, 1), (0, 1, 1, 0)\}, U1:x+y−z=0,  x−t=0U_1 : x + y – z = 0, \; x – t = 0; dim⁡U2=2\dim U_2 = 2, U2:(x,y,z,t)=α(0,0,1,0)+β(1,−1,0,1)U_2 : (x, y, z, t) = \alpha(0, 0, 1, 0) + \beta(1, -1, 0, 1); dim⁡(U1+U2)=3\dim(U_1 + U_2) = 3, U1+U2:x−t=0U_1 + U_2 : x – t = 0; U1∩U2=L{(1,−1,0,1)}U_1 \cap U_2 = L\{(1, -1, 0, 1)\}; the vector is in the sum but not in the intersection; they are not complementary.

The third and fourth spanning vectors of U1U_1 are simple mixes of the first two. And look carefully at the basis of U2U_2: you have already seen one of its vectors in U1U_1.

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 R4\mathbb{R}^4?

No. Adding dimensions only works if the intersection is {0⃗}\{\vec 0\}, and here it is not: (1,1,0,0)(1, 1, 0, 0) is in U2U_2 and also in U1U_1 (it is the sum of its two vectors). Merging the bases, (1,1,0,0)(1, 1, 0, 0) is spare, and the rank is 3: dim⁡(U1+U2)=3\dim(U_1 + U_2) = 3. No vector of the sum has a fourth component, so U1+U2:t=0U_1 + U_2 : t = 0. Grassmann: 2+2=3+12 + 2 = 3 + 1, with U1∩U2=L{(1,1,0,0)}U_1 \cap U_2 = L\{(1, 1, 0, 0)\}.

Adding dimensions versus computing the rankOn the left, in red, the wrong reasoning: 2 + 2 = 4, so the sum is R⁴. On the right, in green, the right one: the rank of the merged bases is 3, the sum is t = 0 and the intersection is the line of (1, 1, 0, 0).adding dimensionsdim U₁ + dim U₂ = 2 + 2= 4 → R⁴forgets they share(1, 1, 0, 0)rank of the merged basesrg = 3 → dim(U₁ + U₂) = 3U₁ + U₂ : t = 0Grassmann: 2 + 2 = 3 + 1U₁ ∩ U₂ = L{(1, 1, 0, 0)}
The dimension of the sum comes from the rank; Grassmann gives the one of the intersection.

Using dim⁡(U1+U2)=dim⁡U1+dim⁡U2\dim(U_1 + U_2) = \dim U_1 + \dim U_2 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 2x−y=02x – y = 0 describe the subspace UU?

No: a single equation in R4\mathbb{R}^4 describes a subspace of dimension 4−1=34 – 1 = 3, and UU is a line (dimension 1). It needs 4−1=34 – 1 = 3 equations. Substituting λ=x\lambda = x in all the parametric equations: 2x−y=02x – y = 0, z=0z = 0 and x−t=0x – t = 0. For example, (0,0,1,0)(0, 0, 1, 0) satisfies 2x−y=02x – y = 0 and is not in UU.

Stopping at the first equation that comes out. Before writing, work out how many are due (dim⁡V−dim⁡U\dim V – \dim U) 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: (1,0,0)(1, 0, 0) and (0,1,0)(0, 1, 0) are in WW (1⋅0=01 \cdot 0 = 0 and 0⋅1=00 \cdot 1 = 0), but their sum (1,1,0)(1, 1, 0) is not (1⋅1=1≠01 \cdot 1 = 1 \neq 0). WW is two planes, x=0x = 0 and y=0y = 0, 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 R3 \mathbb{R}^3 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 S S , and that’s exactly what b) asks for, a basis “made of vectors of S S “. That’s why magenta and cyan go on top: they aren’t proportional.

a) Notice that (1,1,2)=(1,0,1)+(0,1,1)(1, 1, 2) = (1, 0, 1) + (0, 1, 1) and (1,−1,0)=(1,0,1)−(0,1,1)(1, -1, 0) = (1, 0, 1) – (0, 1, 1). Row-reducing:

(1010111121−10)→f4→f4−f1f3→f3−f1(1010110110−1−1)→f4→f4+f2f3→f3−f2(101011000000) \begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 1 & 2 \\ 1 & -1 & 0 \end{pmatrix} \xrightarrow[f_4 \to f_4 – f_1]{f_3 \to f_3 – f_1} \begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & -1 & -1 \end{pmatrix} \xrightarrow[f_4 \to f_4 + f_2]{f_3 \to f_3 – f_2} \begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}

rg(S)=2<3rg(S) = 2 < 3: it is not a spanning set of R3\mathbb{R}^3. With these four colours you only get a plane of colours.

The staircase above, row by row:

StepOperationRow you getWhy
1f3→f3−f1 f_3 \to f_3 – f_1 (0,1,1) (0, 1, 1) You clear the 1 in the first column with magenta’s pivot
2f4→f4−f1 f_4 \to f_4 – f_1 (0,−1,−1) (0, -1, -1) Same with the fourth row
3f3→f3−f2 f_3 \to f_3 – f_2 (0,0,0) (0, 0, 0) The pivot is now cyan’s 1, in the second column
4f4→f4+f2 f_4 \to f_4 + f_2 (0,0,0) (0, 0, 0) You add because there’s a −1 -1 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 SS, so BU={(1,0,1),(0,1,1)}B_U = \{(1, 0, 1), (0, 1, 1)\} and dim⁡U=2\dim U = 2. There will be 3−2=13 – 2 = 1 implicit equation:

∣101011rgb∣=r(0−1)−g(1−0)+b(1−0)=−r−g+b=0⟹U:r+g−b=0 \begin{vmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ r & g & b \end{vmatrix} = r(0 – 1) – g(1 – 0) + b(1 – 0) = -r – g + b = 0 \quad \Longrightarrow \quad U : r + g – b = 0

In the colours of UU, blue is the sum of red and green. Check: magenta, 1+0−1=01 + 0 – 1 = 0; cyan, 0+1−1=00 + 1 – 1 = 0.

c) (2,3,5)(2, 3, 5): 2+3−5=02 + 3 – 5 = 0, so it belongs. As the basis is magenta and cyan, the coordinates are read from the first two components: (2,3,5)=2(1,0,1)+3(0,1,1)(2, 3, 5) = 2(1, 0, 1) + 3(0, 1, 1). Check the third: 2+3=52 + 3 = 5.

Why it is done this way: with vectors of R3\mathbb{R}^3 and a basis of two, the determinant with (r,g,b)(r, g, b) 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 α(1,2,1,0)+β(0,1,1,1)=(1,a,2,1) \alpha (1, 2, 1, 0) + \beta (0, 1, 1, 1) = (1, a, 2, 1) or row-reducing with the a a inside, also works, but you drag the parameter through every row. With the implicit equations, a a only shows up in one equation.

And they almost write themselves. Look at the first and fourth components of the generators: (1,…,0) (1, \ldots, 0) and (0,…,1) (0, \ldots, 1) . There the basis looks like the identity, so x=α x = \alpha and t=β t = \beta without solving for anything. Always look for those components before eliminating parameters the hard way.

a) The parametric equations of UU:

(x,y,z,t)=α(1,2,1,0)+β(0,1,1,1)⟹x=α,y=2α+β,z=α+β,t=β (x, y, z, t) = \alpha (1, 2, 1, 0) + \beta (0, 1, 1, 1) \quad \Longrightarrow \quad x = \alpha, \quad y = 2\alpha + \beta, \quad z = \alpha + \beta, \quad t = \beta

With α=x\alpha = x and β=t\beta = t, the other two give the implicit equations (4−2=24 – 2 = 2):

U:  2x−y+t=0,x−z+t=0 U : \; 2x – y + t = 0, \qquad x – z + t = 0

b) I substitute v⃗=(1,a,2,1)\vec v = (1, a, 2, 1): the second equation gives 1−2+1=01 – 2 + 1 = 0, always; the first, 2−a+1=3−a=02 – a + 1 = 3 – a = 0, so a=3a = 3. Only with a=3a = 3, v⃗=(1,3,2,1)\vec v = (1, 3, 2, 1), and with α=x=1\alpha = x = 1, β=t=1\beta = t = 1:

v⃗=1⋅(1,2,1,0)+1⋅(0,1,1,1)=(1,3,2,1) \vec v = 1 \cdot (1, 2, 1, 0) + 1 \cdot (0, 1, 1, 1) = (1, 3, 2, 1)

c) With a=0a = 0, v⃗=(1,0,2,1)\vec v = (1, 0, 2, 1) is not in UU, so adding it raises the rank: dim⁡W=3\dim W = 3, and there will be 4−3=14 – 3 = 1 implicit equation. v⃗\vec v still satisfies x−z+t=0x – z + t = 0 (1−2+1=01 – 2 + 1 = 0), as do the two vectors of UU, so that equation holds for the three and for all their mixes:

W:  x−z+t=0 W : \; x – z + t = 0

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 dim⁡W=3\dim W = 3 and its three spanning vectors satisfy one equation, that is the implicit equation.

It isn’t luck that one equation of U U works for W W . W W contains U U , so every equation of W W is also satisfied by U U , and the ones U U satisfies are its two implicit equations and their mixes: the one for W W has to be λ(2x−y+t)+μ(x−z+t)=0 \lambda (2x – y + t) + \mu (x – z + t) = 0 . With v⃗=(1,0,2,1) \vec v = (1, 0, 2, 1) , the first gives 3 and the second 0, so you need 3λ=0 3\lambda = 0 : λ=0 \lambda = 0 , and you’re left with x−z+t=0 x – z + t = 0 . If v⃗ \vec v 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 a=5 a = 5 instead of a=0 a = 0 ?

The same: dim⁡W=3 \dim W = 3 and W:x−z+t=0 W : x – z + t = 0 . Step by step: v⃗=(1,5,2,1) \vec v = (1, 5, 2, 1) gives 2−5+1=−2≠0 2 – 5 + 1 = -2 \neq 0 in the first implicit equation, so it isn’t in U U and the rank goes up to 3. In the second it gives 1−2+1=0 1 – 2 + 1 = 0 , as it does for any a a . Three independent vectors inside x−z+t=0 x – z + t = 0 , which has dimension 3, fill it completely: for any a≠3 a \neq 3 , W W is that same space.

How it is marked (indicative):

PartWhat is assessedPoints
a)Parametric equations and the two implicit ones1
b)a=3a = 3, justified with the implicit equations0.5
b)The combination0.5
c)dim⁡W=3\dim W = 3, justified0.5
c)The implicit equation of WW0.5

Exercise 3

Before calculating anything, look at how each subspace is given: U1 U_1 with generators and U2 U_2 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 U1 U_1 plus one from U2 U_2 , 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:

SubspaceWhat you haveWhat you’re missing
U1 U_1 Four generatorsBasis and implicit equations
U2 U_2 Two implicit equationsBasis 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. (1,−1,1,1) (1, -1, 1, 1) satisfies both equations of U2 U_2 , so {(0,0,1,0),(1,−1,1,1)} \{(0, 0, 1, 0), (1, -1, 1, 1)\} is another basis of U2 U_2 , and now nothing repeats; the intersection is still L{(1,−1,0,1)} L\{(1, -1, 0, 1)\} , because (1,−1,0,1)=(1,−1,1,1)−(0,0,1,0) (1, -1, 0, 1) = (1, -1, 1, 1) – (0, 0, 1, 0) . The equations don’t depend on the basis; the repeated vectors do.

a) U1U_1. (1,0,1,1)=(1,−1,0,1)+(0,1,1,0)(1, 0, 1, 1) = (1, -1, 0, 1) + (0, 1, 1, 0) and (2,−3,−1,2)=2(1,−1,0,1)−(0,1,1,0)(2, -3, -1, 2) = 2(1, -1, 0, 1) – (0, 1, 1, 0). The first two are not proportional, so

BU1={(1,−1,0,1),(0,1,1,0)},dim⁡U1=2 B_{U_1} = \{(1, -1, 0, 1), (0, 1, 1, 0)\}, \qquad \dim U_1 = 2

Implicit equations (4−2=24 – 2 = 2), from the parametric ones x=αx = \alpha, y=−α+βy = -\alpha + \beta, z=βz = \beta, t=αt = \alpha: with α=x\alpha = x and β=z\beta = z,

U1:  x+y−z=0,x−t=0 U_1 : \; x + y – z = 0, \qquad x – t = 0

a) U2U_2. Two independent equations: dim⁡U2=2\dim U_2 = 2. They are already in echelon form with pivots in xx and yy; free ones z=αz = \alpha, t=βt = \beta: y=−βy = -\beta, x=−y=βx = -y = \beta.

U2:  x=β,y=−β,z=α,t=β,BU2={(0,0,1,0),(1,−1,0,1)} U_2 : \; x = \beta, \quad y = -\beta, \quad z = \alpha, \quad t = \beta, \qquad B_{U_2} = \{(0, 0, 1, 0), (1, -1, 0, 1)\}

b) Sum. Merging the bases, (1,−1,0,1)(1, -1, 0, 1) appears twice, so there are at most three different vectors: (1,−1,0,1)(1, -1, 0, 1), (0,1,1,0)(0, 1, 1, 0) and (0,0,1,0)(0, 0, 1, 0). They are independent (the staircase (1,−1,0,1)(1, -1, 0, 1), (0,1,1,0)(0, 1, 1, 0), (0,0,1,0)(0, 0, 1, 0) is already in echelon form, with pivots in columns 1, 2 and 3):

BU1+U2={(1,−1,0,1),(0,1,1,0),(0,0,1,0)},dim⁡(U1+U2)=3 B_{U_1 + U_2} = \{(1, -1, 0, 1), (0, 1, 1, 0), (0, 0, 1, 0)\}, \qquad \dim(U_1 + U_2) = 3

One implicit equation (4−3=14 – 3 = 1): the three vectors satisfy x−t=0x – t = 0 (1−11 – 1, 0−00 – 0, 0−00 – 0), which was also an implicit equation of U1U_1:

U1+U2:  x−t=0 U_1 + U_2 : \; x – t = 0

b) Intersection. The four implicit equations together: x+y−z=0x + y – z = 0, x−t=0x – t = 0, x+y=0x + y = 0, y+t=0y + t = 0. From the third, y=−xy = -x; then the first gives z=x+y=0z = x + y = 0, and the second, t=xt = x (the fourth, −x+x=0-x + x = 0, is spare). With x=λx = \lambda:

U1∩U2:  x=λ,y=−λ,z=0,t=λ,BU1∩U2={(1,−1,0,1)} U_1 \cap U_2 : \; x = \lambda, \quad y = -\lambda, \quad z = 0, \quad t = \lambda, \qquad B_{U_1 \cap U_2} = \{(1, -1, 0, 1)\}

dim⁡(U1∩U2)=1\dim(U_1 \cap U_2) = 1, and Grassmann agrees: 2+2=3+12 + 2 = 3 + 1. The vector repeated in the bases was exactly the intersection.

Exercise 3 solvedFour cards: U1 of dimension 2 with its basis and implicit equations; U2 of dimension 2; U1 + U2 of dimension 3 with implicit equation x − t = 0; U1 ∩ U2 of dimension 1 with basis (1, −1, 0, 1), shown in bold in the bases of U1 and U2. Below, 2 + 2 = 3 + 1.U₁dim 2(1,−1,0,1)(0,1,1,0)x + y − z = 0x − t = 0U₂dim 2(0,0,1,0)(1,−1,0,1)x + y = 0y + t = 0U₁ + U₂dim 3(1,−1,0,1)(0,1,1,0)(0,0,1,0)x − t = 0U₁ ∩ U₂dim 1(1,−1,0,1)x + y = 0, z = 0x − t = 02 + 2 = 3 + 1
The vector repeated in both bases was the intersection.

c) (2,−1,3,2)(2, -1, 3, 2) satisfies x−t=2−2=0x – t = 2 – 2 = 0: it belongs to U1+U2U_1 + U_2. It is not in the intersection: x+y=2−1=1≠0x + y = 2 – 1 = 1 \neq 0. And U1U_1 and U2U_2 are not complementary for two reasons: U1+U2≠R4U_1 + U_2 \neq \mathbb{R}^4 (it has dimension 3) and U1∩U2≠{0⃗}U_1 \cap U_2 \neq \{\vec 0\}.

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):

PartWhat is assessedPoints
a)Basis and dimension of U1U_1, justified1
a)Implicit equations of U1U_11
a)Basis, dimension and parametric equations of U2U_22
b)Basis, dimension and implicit equation of U1+U2U_1 + U_22
b)Basis, dimension and parametric equations of U1∩U2U_1 \cap U_22
c)Membership of the sum and of the intersection1
c)Not complementary, with both reasons1

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 (−1,−1,1)(-1, -1, 1), the coefficients of −r−g+b=0-r – g + b = 0, 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 v⃗\vec v falls in UU: 3−a3 – a, zero at a=3a = 3. And the implicit equation of WW comes out as (1,0,−1,1)(1, 0, -1, 1), that is, x−z+t=0x – z + t = 0. 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 U1U_1: (−1,−1,1,0)(-1, -1, 1, 0) is −x−y+z=0-x – y + z = 0 and (−1,0,0,1)(-1, 0, 0, 1) is −x+t=0-x + t = 0, ours with the sign changed (multiplying an equation by −1-1 changes nothing). The basis of U2U_2 is the one on paper, the sum has dimension 3 and the intersection comes out as (1,−1,0,1)(1, -1, 0, 1).

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.

Question 1True or false

Say whether each statement is true or false (in R3\mathbb{R}^3):

  1. Two linearly independent vectors form a basis of R3\mathbb{R}^3.
  2. Four vectors of R3\mathbb{R}^3 are always linearly dependent.
  3. Three vectors of R3\mathbb{R}^3 always span R3\mathbb{R}^3.
  4. A set containing the vector 0⃗\vec 0 is linearly dependent.
Solution
  • F — Two linearly independent vectors form a basis of R3\mathbb{R}^3.
  • T — Four vectors of R3\mathbb{R}^3 are always linearly dependent.
  • F — Three vectors of R3\mathbb{R}^3 always span R3\mathbb{R}^3.
  • T — A set containing the vector 0⃗\vec 0 is linearly dependent.

A basis of R3\mathbb{R}^3 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 1⋅0⃗=0⃗1 \cdot \vec 0 = \vec 0 is a zero combination with a non-zero coefficient.

Question 2Single choice

The set {(2,−1,4),(−6,3,−12)}\{(2, -1, 4), (-6, 3, -12)\} is:

  1. Linearly dependent
  2. Linearly independent
  3. A basis of R3\mathbb{R}^3
  4. A spanning set of R3\mathbb{R}^3
Solution

Answer: Linearly dependent

(−6,3,−12)=−3⋅(2,−1,4)(-6, 3, -12) = -3 \cdot (2, -1, 4): two proportional vectors are dependent, and they only span a line.

Question 3Single choice

What is the dimension of the subspace of R3\mathbb{R}^3 defined by x−2y+z=0x – 2y + z = 0, 2x−4y+2z=02x – 4y + 2z = 0?

  1. 2
  2. 1
  3. 3
  4. 0
Solution

Answer: 2

The second equation is twice the first, so there is only one independent equation: dim⁡U=3−1=2\dim U = 3 – 1 = 2, a plane.

Question 4Short answer

In R5\mathbb{R}^5, a subspace has dimension 2. How many independent implicit equations does it need? Write just the number.

Solution

Answer: 3

No. of implicit equations =dim⁡V−dim⁡U=5−2=3= \dim V – \dim U = 5 – 2 = 3.

Question 5Single choice

In R4\mathbb{R}^4, dim⁡U1=2\dim U_1 = 2, dim⁡U2=3\dim U_2 = 3 and dim⁡(U1+U2)=4\dim(U_1 + U_2) = 4. Then dim⁡(U1∩U2)\dim(U_1 \cap U_2) is:

  1. 1
  2. 0
  3. 2
  4. 5
Solution

Answer: 1

Grassmann: 2+3=4+dim⁡(U1∩U2)2 + 3 = 4 + \dim(U_1 \cap U_2), so dim⁡(U1∩U2)=1\dim(U_1 \cap U_2) = 1.

Question 6Single choice

In R4\mathbb{R}^4, dim⁡U1=2\dim U_1 = 2, dim⁡U2=2\dim U_2 = 2 and U1∩U2={0⃗}U_1 \cap U_2 = \{\vec 0\}. Then:

  1. U1⊕U2=R4U_1 \oplus U_2 = \mathbb{R}^4: they are complementary
  2. dim⁡(U1+U2)=2\dim(U_1 + U_2) = 2
  3. dim⁡(U1+U2)=3\dim(U_1 + U_2) = 3
  4. It cannot be known without the bases
Solution

Answer: U1⊕U2=R4U_1 \oplus U_2 = \mathbb{R}^4: they are complementary

Grassmann: dim⁡(U1+U2)=2+2−0=4\dim(U_1 + U_2) = 2 + 2 – 0 = 4, so the sum is all of R4\mathbb{R}^4 and, with a zero intersection, it is direct: they are complementary.

Question 7Multiple · wrong ticks subtract

Which of these subsets of R3\mathbb{R}^3 are vector subspaces?

  1. {(x,y,z):x=2y}\{(x, y, z) : x = 2y\}
  2. {(x,y,z):x=0,  y=z}\{(x, y, z) : x = 0, \; y = z\}
  3. {(x,y,z):x+y=1}\{(x, y, z) : x + y = 1\}
  4. {(x,y,z):x2=y}\{(x, y, z) : x^2 = y\}
Solution

Answer: {(x,y,z):x=2y}\{(x, y, z) : x = 2y\} · {(x,y,z):x=0,  y=z}\{(x, y, z) : x = 0, \; y = z\}

Linear homogeneous equations (no constant term, no powers) define subspaces. With a constant term you lose 0⃗\vec 0, and with a power you lose the product by scalars.

Question 8Single choice

For which value of kk does (1,k,3)(1, k, 3) belong to the subspace L{(1,0,1),(0,1,1)}L\{(1, 0, 1), (0, 1, 1)\}?

  1. k=2k = 2
  2. k=0k = 0
  3. k=3k = 3
  4. k=−2k = -2
Solution

Answer: k=2k = 2

If (1,k,3)=a(1,0,1)+b(0,1,1)(1, k, 3) = a(1, 0, 1) + b(0, 1, 1), then a=1a = 1, b=kb = k and the third component gives a+b=3a + b = 3, so k=2k = 2. With the implicit equation x+y−z=0x + y – z = 0 you get the same: 1+k−3=01 + k – 3 = 0.

Question 9Match

Match each set of R3\mathbb{R}^3 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.

Question 10Fill in the gaps

Complete the definition:

A set of vectors is a ____ of VV if it is linearly ____ and a ____ set of VV. The number of vectors in any basis is the ____ of VV.

Words:

  • dependent
  • independent
  • basis
  • subspace
  • dimension
  • rank
  • spanning
Solution

A set of vectors is a basis of VV if it is linearly independent and a spanning set of VV. The number of vectors in any basis is the dimension of VV.

Both conditions at once: no vector is spare (independent) and none is missing (spanning). All bases have the same number of vectors, the dimension.

Question 11Single choice

The implicit equations of U=L{(1,0,2),(0,1,−1)}U = L\{(1, 0, 2), (0, 1, -1)\} in R3\mathbb{R}^3 are:

  1. 2x−y−z=02x – y – z = 0
  2. 2x+y−z=02x + y – z = 0
  3. x−2z=0,  y+z=0x – 2z = 0, \; y + z = 0
  4. x+y+z=0x + y + z = 0
Solution

Answer: 2x−y−z=02x – y – z = 0

Parametric: x=αx = \alpha, y=βy = \beta, z=2α−βz = 2\alpha – \beta. Substituting, z=2x−yz = 2x – y, that is, 2x−y−z=02x – y – z = 0. Check: (1,0,2)(1, 0, 2) gives 2−0−2=02 – 0 – 2 = 0 and (0,1,−1)(0, 1, -1) gives 0−1+1=00 – 1 + 1 = 0.

Question 12Short answer

What is the rank of the set {(1,1,0,0),(0,1,1,0),(1,2,1,0),(1,0,−1,0)}\{(1, 1, 0, 0),\allowbreak (0, 1, 1, 0),\allowbreak (1, 2, 1, 0),\allowbreak (1, 0, -1, 0)\}? 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.

Question 13Single choice

In the basis B={(1,1),(1,−1)}B = \{(1, 1), (1, -1)\} of R2\mathbb{R}^2, the coordinates of the vector (5,1)(5, 1) are:

  1. (3,2)(3, 2)
  2. (5,1)(5, 1)
  3. (2,3)(2, 3)
  4. (6,4)(6, 4)
Solution

Answer: (3,2)(3, 2)

a(1,1)+b(1,−1)=(5,1)a(1, 1) + b(1, -1) = (5, 1): a+b=5a + b = 5 and a−b=1a – b = 1, so a=3a = 3, b=2b = 2. Check: 3(1,1)+2(1,−1)=(5,1)3(1, 1) + 2(1, -1) = (5, 1).

Question 14Single choice

If B′B' is a basis of Rn\mathbb{R}^n and BB the standard basis, the change-of-basis matrix CB′→BC_{B' \to B} is:

  1. The one with the vectors of B′B' as columns
  2. The one with the vectors of B′B' as rows
  3. The inverse of the one with the vectors of B′B' as columns
  4. The identity
Solution

Answer: The one with the vectors of B′B' as columns

Each column of CB′→BC_{B' \to B} is the coordinates of one vector of B′B' in the standard basis, that is, the vector itself. The inverse goes back.

Question 15Multiple · wrong ticks subtract

To compute a basis of U1∩U2U_1 \cap U_2, what can you do?

  1. Put the implicit equations of U1U_1 and U2U_2 together and solve the system
  2. Require a generic vector of U1U_1 (with its parameters) to satisfy the implicit equations of U2U_2
  3. Merge the bases of U1U_1 and U2U_2 and row-reduce
  4. Keep the vectors of the basis of U1U_1 that are in U2U_2
Solution

Answer: Put the implicit equations of U1U_1 and U2U_2 together and solve the system · Require a generic vector of U1U_1 (with its parameters) to satisfy the implicit equations of U2U_2

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 R3\mathbb{R}^3 meeting in a line that contains none of the basis vectors.

Question 16True or false

About the dimension of some vector spaces:

  1. dim⁡M2×2=4\dim M_{2 \times 2} = 4.
  2. The space of polynomials of degree at most 2 has dimension 3.
  3. dim⁡{0⃗}=1\dim \{\vec 0\} = 1.
Solution
  • T — dim⁡M2×2=4\dim M_{2 \times 2} = 4.
  • T — The space of polynomials of degree at most 2 has dimension 3.
  • F — dim⁡{0⃗}=1\dim \{\vec 0\} = 1.

2×22 \times 2 matrices have 4 free positions; polynomials a+bx+cx2a + bx + cx^2, three coefficients (basis 1,x,x21, x, x^2). The zero subspace has dimension 0: it has no independent vector.

Question 17Order

Order the steps to obtain a basis of L(S)L(S) made of vectors of SS:

  1. Write the vectors of SS as columns of a matrix
  2. Look at which columns have a pivot
  3. Compute the reduced row echelon form by Gauss-Jordan
  4. Copy from SS the vectors of those columns
Solution

Correct order:

  1. Write the vectors of SS as columns of a matrix
  2. Compute the reduced row echelon form by Gauss-Jordan
  3. Look at which columns have a pivot
  4. Copy from SS 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.

Question 18Single choice

A subspace UU of R4\mathbb{R}^4 has parametric equations x=α+βx = \alpha + \beta, y=α−βy = \alpha – \beta, z=2αz = 2\alpha, t=2βt = 2\beta. Its dimension is:

  1. 2
  2. 4
  3. 1
  4. 3
Solution

Answer: 2

There are two parameters and the vectors with each one, (1,1,2,0)(1, 1, 2, 0) and (1,−1,0,2)(1, -1, 0, 2), are not proportional: dim⁡U=2\dim U = 2.

Question 19True or false

In R3\mathbb{R}^3, let U1U_1 be the plane z=0z = 0 and U2=L{(0,0,1)}U_2 = L\{(0, 0, 1)\}:

  1. U1+U2=R3U_1 + U_2 = \mathbb{R}^3.
  2. U1∩U2={0⃗}U_1 \cap U_2 = \{\vec 0\}.
  3. U1U_1 and U2U_2 are complementary.
  4. (1,2,3)(1, 2, 3) can be written in two different ways as the sum of a vector of U1U_1 and one of U2U_2.
Solution
  • T — U1+U2=R3U_1 + U_2 = \mathbb{R}^3.
  • T — U1∩U2={0⃗}U_1 \cap U_2 = \{\vec 0\}.
  • T — U1U_1 and U2U_2 are complementary.
  • F — (1,2,3)(1, 2, 3) can be written in two different ways as the sum of a vector of U1U_1 and one of U2U_2.

(0,0,1)(0, 0, 1) does not satisfy z=0z = 0, so the line only meets the plane at the origin and 1+2=31 + 2 = 3: a direct sum equal to R3\mathbb{R}^3. In a direct sum the split is unique: (1,2,3)=(1,2,0)+(0,0,3)(1, 2, 3) = (1, 2, 0) + (0, 0, 3).

Question 20Single choice

When you row-reduce the matrix with the basis vectors of U⊂R4U \subset \mathbb{R}^4 as rows and the row (x,y,z,t)(x, y, z, t) below, the last row ends up as (0,0,z−x,t+y)(0, 0, z – x, t + y) and the pivots of the other rows are in columns 1 and 2. The implicit equations of UU are:

  1. x−z=0x – z = 0, y+t=0y + t = 0
  2. z−x+t+y=0z – x + t + y = 0
  3. x=0x = 0, y=0y = 0
  4. They cannot be known without the basis
Solution

Answer: x−z=0x – z = 0, y+t=0y + t = 0

For the rank not to grow, the positions of the last row with no pivot above them must be 0: z−x=0z – x = 0 and t+y=0t + y = 0. There are two, 4−24 – 2, 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.

AG exam coming up?The test and practical packs with new solved questions and exercises, their cheat sheets, a blank test and practical exam and MATLAB functions, for free.See the pack

Cheat sheet: vector spaces and subspaces

The essentials in 30 seconds: almost everything is the rank. rg(S)rg(S) = no. of vectors ⇒\Rightarrow independent; rg(S)=nrg(S) = n in Rn\mathbb{R}^n ⇒\Rightarrow spanning; both ⇒\Rightarrow basis. dim⁡L(S)=rg(S)\dim L(S) = rg(S). Implicit equations: dim⁡V−dim⁡U\dim V – \dim U. Grassmann: dim⁡U1+dim⁡U2=dim⁡(U1+U2)+dim⁡(U1∩U2)\dim U_1 + \dim U_2 = \dim(U_1 + U_2) + \dim(U_1 \cap U_2).

I want…By handMATLAB
To know if they are independentRank = no. of vectors (or ∣A∣≠0\lvert A \rvert \neq 0 if square)rank(S)
Any basis of L(S)L(S)Vectors as rows, row-reduce, non-zero rowsrref(S)
A basis with original vectorsVectors as columns, reduced form, pivot columns[R, piv] = rref(S’); S(piv, 🙂
Coordinates in a basisBasis as columns, solve PX′=XP X' = XP \ X
Change of basis B′→B′′B' \to B''Q−1PQ^{-1} P (columns of B′′B'' and of B′B')Q \ P
Basis from implicit equationsSolve the homogeneous system and split by parametersnull(A, ‘r’)
Implicit equations from a basisEliminate parameters, or rank of [basis; x] = dimnull(B, ‘r’)’
SumMerge bases and row-reducerank([B1; B2])
IntersectionMerge implicit equations and solvenull([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 R4\mathbb{R}^4, it has none”).
  • Intersection: merge implicit equations, solve, basis and parametric equations.
  • Grassmann to check.
  • Membership: substitute into the implicit equations. Complementary: sum =V= V and intersection ={0⃗}= \{\vec 0\}.
SymptomLikely cause
An implicit equation that a basis vector does not satisfySign error when isolating or expanding the determinant
dim⁡(U1+U2)>dim⁡V\dim(U_1 + U_2) > \dim VYou added dimensions instead of computing the rank
The basis is not inside the subspaceYou copied the reduced form instead of the original vectors
Grassmann does not agreeEither the sum or the intersection is wrong: redo the one with fewer calculations
“Complementary” with a non-zero intersectionYou only checked that the sum is VV

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?
Keep goingAll Linear algebra articles

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)