1 of 11
APSC 174 – Midterm 2
March 2021
A. Ableson F. Alajaji T. Linder A. Zalloum
Solutions
Instructions:
The exam has five questions, worth a total of 100 marks.
Separately write on paper your answers to each problem. At the end of the test, scan and upload your
answers to each problem/question in their corresponding slot on Crowdmark.
To receive full credit you must show your work, clearly and in order.
Correct answers without adequate explanations will not receive full marks.
No textbook, lecture notes, calculator, or other aid, is allowed.
Good luck!
1 2 3 4 5 Total
/20 /20 /20 /20 /20 /100
2 of 11
1. Consider the linear system of equations shown below.
x + 2y + z = 1
3x + 6y − z = −9
2x + 4y = −4
[4 pts] (a) Write out this system of equations using an augmented matrix.
Solution. The augmented matrix looks as follows:
1 2 1 1
3 6 −1 −9 .
2 4 0 −4
[12 pts] (b) Use row operations to reduce the matrix to RREF.
Solution.
1 2 1 1 1 2 1 1 1 2 1 1
−3R1 + R2 7→ R2 −2R + R3 7→ R3
3 6 −1 −9 −
−−−−−−−−−−→ 0 0 −4 −12 −−−−1−−−− −−−→ 0 0 −4 −12
2 4 0 −4 2 4 0 −4 0 0 −2 −6
−1
R2 7→ R2
1 2 1 1 1 2 1 1
4 2R + R3 7→ R3
−− −−−−−→ 0 0 1 3 −−−2−−−− −−−→ 0 0 1 3
0 0 −2 −6 0 0 0 0
1 2 0 −2
−R2 + R1 7→ R1
−−−−−−−−−−→ 0 0 1 3 .
0 0 0 0
3 of 11
[4 pts] (c) Write out the set of solutions for the original linear system, defining and using free variables as necessary.
Solution.
Using part (a), the RREF of the matrix looks as follow:
1 2 0 −2
0 0 1 3 .
0 0 0 0
Using the above, we can see that x, z are the leading variables while y is the free variable. We let y = t.
x + 2y = −2
z = 3
Hence, by substituting y = t, we get the following
x = −2 − 2t
y = t
z = 3
Hence, we get that
x −2 −2
y = 0 + 1 t
z 3 0
4 of 11
2. Suppose that L : R2 → R3 is a linear transformation (map) and we know that L(3, 4) = (1, 2, 1) and
L(4, 5) = (−3, 1, 4).
[5 pts] (a) Write (1, 0) and (0, 1) as linear combinations of (3, 4) and (4, 5).
Solution. In order to write (1, 0) as a linear combination of (3, 4) and (4, 5), we need to find α1 , β1 such
that
(1, 0) = α1 (3, 4) + β1 (4, 5).
This gives the equations
1 = 3α1 + 4β1
0 = 4α1 + 5β1 .
Using the second equation, we get that α1 = −5
4 β1 . By plugging this in the first equation, we get that
3.(−5)
1 = 4 β1 + 4β1 , which yields β1 = 4. Hence, α1 = −5. Therefore, we have
(1, 0) = −5(3, 4) + 4(4, 5).
Similarly, in order to write (0, 1) as a linear combination of (3, 4) and (4, 5), we need to find α2 , β2 such
that
(0, 1) = α2 (3, 4) + β2 (4, 5).
This gives the equations
0 = 3α2 + 4β2
1 = 4α2 + 5β2 .
Using the first equation, we get that α2 = −4
3 β2 . By plugging this in the second equation, we get that
4.(−4)
1 = 3 β2 + 5β2 , which yields β2 = −3. Hence, α2 = 4. Therefore, we have
(0, 1) = 4(3, 4) − 3(4, 5).
[5 pts] (b) Use your answer from (a) to determine L(1, 0) and L(0, 1).
Solution. Using part (a), we have (1, 0) = −5(3, 4) + 4(4, 5). Since L is a linear transformation, we have
L(1, 0) = L(−5(3, 4) + 4(4, 5))
= −5L(3, 4) + 4L(4, 5)
= −5(1, 2, 1) + 4(−3, 1, 4)
= (−17, −6, 11).
5 of 11
Similarity, using part (a), we have (0, 1) = 4(3, 4) − 3(4, 5). Since L is a linear transformation, we have
L(0, 1) = L(4(3, 4) − 3(4, 5))
= 4L(3, 4) − 3L(4, 5)
= 4(1, 2, 1) − 3(−3, 1, 4)
= (13, 5, −8).
[5 pts] (c) Use your answer from (b) to determine L(−2, 1).
Solution. Notice that (−2, 1) = −2(1, 0) + (0, 1). Using part (b), since L is a linear transformation, we
have
L(−2, 1) = L(−2(1, 0) + (0, 1))
= −2L(1, 0) + L(0, 1)
= −2(−17, −6, 11) + (13, 5, −8)
= (47, 17, −30).
−2
(Alternatively, we may find the standard matrix A and evaluate A ).
1
[5 pts] (d) Determine the formula for L(x, y) for any (x, y) ∈ R2 .
Solution. Using part (b), since L is a linear transformation, we have
L(x, y) = L(x(1, 0) + y(0, 1))
= xL(1, 0) + yL(0, 1)
= x(−17, −6, 11) + y(13, 5, −8)
= (−17x + 13y, −6x + 5y, 11x − 8y).
x
(Alternatively, we may find the standard matrix A and evaluate A ).
y
6 of 11
3. In the vector space C ∞ (R) of functions from R to R that can be differentiated arbitrarily many times,
consider the subspace H spanned by the functions f1 and f2 , where
f1 (x) = −2 + 2x − 3x2
f2 (x) = 1 − 3x + 2x2
for x ∈ R. In other words, the subspace H consists of all linear combinations of f1 and f2 .
[8 pts] (a) Find a basis for H. (Justify your answer.)
Solution 1. Since H is the linear span of f1 and f2 (i.e., any function in H is a linear combination of f1
and f2 ), then we directly have that {f1 , f2 } is a generating set for H. Hence if we can show that {f1 , f2 }
is a linearly independent set, then we can conclude that (f1 , f2 ) is a basis for H.
As seen in a theorem in class, two vectors are linearly dependent if and only if one of them is a scalar
multiple of the other. Comparing functions f1 with f2 (which are both non-zero vectors), we readily see
that this is not the case; i.e., we can verify that there is no scalar α ∈ R such that f2 = αf1 or f1 = αf2 .
Thus the set {f1 , f2 } is not linearly dependent; it is therefore linearly independent.
We hence conclude that (f1 , f2 ) is a basis for H.
Solution 2. Since H is the linear span of f1 and f2 (i.e., any function in H is a linear combination of f1
and f2 ), then we directly have that {f1 , f2 } is a generating set for H. Hence if we can show that {f1 , f2 }
is a linearly independent set, then we can conclude that (f1 , f2 ) is a basis for H.
In order to check that the set {f1 , f2 } is linearly independent, let α, β ∈ R be such that
αf1 + βf2 = 0
This is equivalent to stating that for any x ∈ R,
α(−2 + 2x − 3x2 ) + β(1 − 3x + 2x2 ) = 0
or equivalently,
(−2α + β) + (2α − 3β)x + (−3α + 2β)x2 = 0 · 1 + 0 · x + 0 · x2 .
Since {1, x, x2 } is a set of linearly independent vectors, we get that
−2α + β = 0
2α − 3β = 0
−3α + 2β = 0
(Alternatively, we may get some other three equations by plugging three values for x). Solving the above
system (either directly or via the RREF method), we get that
α = β = 0.
Thus the set {f1 , f2 } is linearly independent. We hence conclude that (f1 , f2 ) is a basis for H.
7 of 11
[4 pts] (b) Determine the dimension of H. (Justify your answer.)
Solution. By part (a), we have a basis for H consisting of 2 elements. Hence, the dimension of H is 2.
[8 pts] (c) Now consider the following function f3 in C ∞ (R):
f3 (x) = −3 + x − 4x2
for x ∈ R. Determine (with proof) whether or not the set {f1 , f2 , f3 } is linearly dependent.
Solution. In order to check for dependence, let α, β, γ ∈ R be such that
αf1 + βf2 + γf3 = 0
This is equivalent to stating that for any x ∈ R,
α(−2 + 2x − 3x2 ) + β(1 − 3x + 2x2 ) + γ(−3 + x − 4x2 ) = 0
or equivalently,
(−2α + β − 3γ) + (2α − 3β + γ)x + (−3α + 2β − 4γ)x2 = 0 · 1 + 0 · x + 0 · x2 .
Since {1, x, x2 } is a set of linearly independent vectors, we get that
−2α + β − 3γ = 0
2α − 3β + γ = 0
−3α + 2β − 4γ = 0
(Alternatively, we may get some other three equations by plugging three values for x).
The above system can be solved using the RREF method, or directly via elementary operations as follows.
Adding the first two equations, we get that β = −γ. Plugging β = −γ in the first equation gets us that
−2α − 4γ = 0 or that α = −2γ. Now, plugging β = −γ and α = −2γ in either of the three equations yields
0 = 0. Therefore, for any choice of γ, if β = −γ, α = −2γ, the three above equations will be satisfied. For
example, a possible non-zero solution is γ = 1, β = −1, and α = −2; i.e., f3 = 2f1 + f2 . Hence, the set of
functions {f1 , f2 , f3 } is linearly dependent.
8 of 11
4. Let L : R3 → R3 be the linear transformation defined by
L(x, y, z) = (x + y, y + z, x + z).
[4 pts] (a) Find the standard matrix of L.
Solution. The standard matrix A of a linear transformation L : Rn → Rm is the m × n matrix with
columns L(e1 ), L(e2 ), . . . , L(en ), where e1 , e2 , . . . , en are the standard basis vectors in Rn . In our case
m = n = 3, e1 = (1, 0, 0), e2 = (0, 1, 0), e3 = (0, 0, 1), and
L(1, 0, 0) = (1 + 0, 0 + 0, 1 + 0) = (1, 0, 1)
L(0, 1, 0) = (0 + 1, 1 + 0, 0 + 0) = (1, 1, 0)
L(0, 0, 1) = (0 + 0, 0 + 1, 0 + 1) = (0, 1, 1).
Writing these row vectors as column vectors, we obtain
1 1 0
A= 0 1 1
1 0 1
[4 pts] (b) Determine whether the vector (0, 1, −1) belongs to Ker(L).
Solution. By definition of the kernel, (x, y, z) ∈ Ker(L) if and only if L(x, y, z) = (0, 0, 0) = 0 ∈ R3 . For
(x, y, z) = (0, 1, −1),
L(0, 1, −1) = (0 + 1, 1 − 1, 0 − 1) = (1, 0, −1) 6= (0, 0, 0)
so (0, 1, −1) does not belong to Ker(L).
[4 pts] (c) Determine whether the vector (1, 1, 2) belongs to Im(L).
Solution. The vector (1, 1, 2) belongs to Im(L) if and only if there exist (x, y, z) such that
L(x, y, z) = (x + y, y + z, x + z) = (1, 1, 2).
This is equivalent to asking if the system of linear equations
x + y = 1
y + z = 1
x + z = 2
has a solution. This is a problem we know how to solve using the RREF method. Writing down the
augmented matrix which corresponds to the system and row reducing we get
1 1 0 1 1 0 0 1
0 1 1 1 − RREF
−−−→ 0 1 0 0
1 0 1 2 0 0 1 1
We can now read off the unique solution x = 1, y = 0, and z = 1 to conclude that (1, 1, 2) belongs to
Im(L).
9 of 11
[4 pts] (d) Find Ker(L).
Solution. The kernel of L is the set of all (x, y, z) ∈ R3 such that L(x, y, z) = (0, 0, 0), Equivalently, we
look for all solutions to the system of linear equations
x + y = 0
y + z = 0
x + z = 0
Using the RREF method as in part (c), we get
1 1 0 0 1 0 0 0
0 1 1 0 − RREF
−−−→ 0 1 0 0
1 0 1 0 0 0 1 0
which provides the unique solution x = 0, y = 0, and z = 0. Thus Ker(L) = {(0, 0, 0)}, a singleton set.
[4 pts] (e) Decide, with proof, if L is injective.
By a theorem we learned in class, the linear transformation L is injective if and only if Ker(L) = {0}.
Since in our case 0 = (0, 0, 0) and Ker(L) = {(0, 0, 0)}, we obtain that L is injective.
10 of 11
5. Answer the following questions.
[6 pts] (a) Consider the subspace W of R3 defined by
W = (x, y, z) ∈ R3 : x − y = 0, 2y + z = 0 .
Find a basis for W. (Justify your answer.)
Solution. If (x, y, z) ∈ W, then by the condition x − y = 0, we must have y = x, and by the condition
2y + z = 0, we must have z = −2y, i.e., z = −2x. Thus
(x, y, z) = (x, x, −2x).
Conversely, for any x ∈ R, we have that (x, x, −2x) ∈ W, so we obtain that
W = {(x, x, −2x) : x ∈ R} = {x(1, 1, −2) : x ∈ R}.
Thus W is the span of the single vector (1, 1, −2) ∈ R3 , i.e., {(1, 1, −2)} is a generating set for W. Since
{(1, 1, −2)}, as a set containing a single non-zero vector, is also linearly independent, we obtain that the
single vector (1, 1, −2) is a basis for W.
[8 pts] (b) Let the transformation L : C ∞ (R) → R2 be defined by
L(f ) = (f (0), f (1)), f ∈ C ∞ (R).
Prove or disprove that L is a linear transformation.
Solution. We check that L passes the two tests for being a linear transformation.
Addition test: Let f, g ∈ C ∞ (R). Then (f + g)(t) = f (t) + g(t) for all t ∈ R and therefore
L(f + g) = f (0) + g(0), f (1) + g(1)
= f (0), f (1) + g(0), g(1)
= L(f ) + L(g)
so L passes the addition test.
Scalar multiplication test: Let f ∈ C ∞ (R) and α ∈ R. Then (αf )(t) = αf (t) for all t ∈ R and therefore
L(αf ) = αf (0), αf (1)
= α f (0), f (1)
= αL(f )
so L passes the scalar multiplication test.
Since L has passed both tests, it is a linear transformation.
11 of 11
[6 pts] (c) Let V and W be vector spaces and let L : V → W be a linear map. Let v1 , v2 and v3 be vectors in
V. Show that if the set {v1 , v2 , v3 } is linearly independent and Ker(L) = {0V }, where 0V denotes the
zero vector of V, then the set {L(v1 ), L(v2 ), L(v3 )} is linearly independent.
Solution. To prove that {L(v1 ), L(v2 ), L(v3 )} is linearly independent, let α1 , α2 , α3 ∈ R be such that
α1 L(v1 ) + α2 L(v2 ) + α3 L(v3 ) = 0W .
By the linearity of L, this is equivalent to
L(α1 v1 + α2 v2 + α3 v3 ) = 0W
which gives that α1 v1 + α2 v2 + α3 v3 ∈ Ker(L). But we know that Ker(L) = {0V }, so we obtain
α1 v1 + α2 v2 + α3 v3 = 0V .
Since the set {v1 , v2 , v3 } is linearly independent, this is only possible if α1 = α2 = α3 = 0. In conclu-
sion, α1 L(v1 ) + α2 L(v2 ) + α3 L(v3 ) = 0W implies that α1 = α2 = α3 = 0, which means that the set
{L(v1 ), L(v2 ), L(v3 )} is linearly independent.