Math 241: Exam 1 Review Practice Problems Solutions
NOTE. For some of these problems, you would likely be expected to offer a longer expla-
nation. There are some problems for which only a numerical solution is given; a full exam
solution would include a demonstration of how that numerical solution was determined.
1 0
1. Let u = 2 , and v = −1 . Write an expression for the line that goes through
3 1
3
these two vectors in R .
Solution: A line through two points is given by the affine combinations:
{αu + βv | α, β ∈ R, α + β = 1}
This can also be presented in several other forms, such as
{αu + (1 − α)v | α ∈ R} , or
{v + α(u − v) | α ∈ R} ,
or by interchanging the roles of u, v in any of the above.
2. Let u, v be vectors over Z2 . Explain why u + v = u − v.
Solution: In Z2 , we have 1 = −1 and 0 = −0, and therefore x = −x for
every x ∈ Z2 . Thus, v = −v, so u + v = u − v.
3. Here is a piece of code used to solve a triangular system of n equations in n variables.
def triangular_solve(coeff, b):
n=len(b)
x=zero_vec(n)
for i in reversed(range(n)):
x[i] = (b[i]-dot_product(coeff[i], x))/coeff[i][i]
return x
In this code, the first input is a list of lists representing coefficients for the equations,
and the second input is the right hand side of the system. So, for example, if you had
a system
2x1 + 3x2 = 3
4x2 = 1
then the inputs would take the form
coeff=[[2,3],[0,4]], b=[3,1].
You may assume here that zero vec and dot product are correctly defined helper func-
tions that return the length n zero vector (as a list) and the dot product of two vectors
(represented as lists), respectively.
(a) Explain (perhaps by showing a small example) how this algorithm works to solve
a triangular system.
(b) Explain (perhaps by showing a small example) when this code will fail.
Solution:
(a) The code implements the back-substitution method we have discussed in
class to solve an upper triangular system. Starting from n, it calculates a
value for each xi , and then stores these values in the list x. To calculate
the value for x[i], the code computes
x[i] = (b[i] − coef f [i] · x)/coef f [i][i].
If the ith equation in the system takes the form ai,i xi + ai,i+1 xi+1 + · · · +
ai,n xn = bi , then coef f [i] = [0, 0, . . . , 0, ai,i , ai,i+1 , . . . , ai,n ]. At the time
of the computation, the list x takes the form [0, 0, . . . , 0, xi+1 , xi+2 , . . . , xn ].
Hence, the variable xi is calculated to be bi −(xi+1 ai,i+1 +· · ·+ai,n xn )/ai,i ,
just as it should be.
(b) This code will fail anytime that ai,i is 0. This is because there will be
no way to calculate a value for xi .
4. Show that the set
1 1 1
0 , 1 , 1
0 0 1
is a generating set for R3 .
x
Solution: Let v = y be an arbitrary vector in R3 . Notice that we can
z
write
x 1 1 1
y = (x − y) 0 + (y − z) 1 + z 1 ,
z 0 0 1
and hence v is a linear combination of the three listed vectors. By definition,
then as any vector in R3 can be written as a linear combination of the three
listed vectors, these vectors are a generating set for R3 .
Alternative Approach: Show that e1 , e2 , e3 can all be written as linear com-
binations of the three listed vectors.
5. Show that the set
1 1 2
1 , 0 , 1
0 1 1
is not a generating set for R3 .
0
Solution: Consider the vector v = 0 . Suppose that there are constants
1
α, β, γ such that
1 1 2 0
α 1 + β 0 + γ 1 = 0 .
0 1 1 1
By considering the third coordinate, we note then that β + γ = 1, and hence
β = 1 − γ. By considering the second coordinate, we note that α + γ = 0,
and hence α = −γ. By considering the first coordinate, we therefore have
that α + β + 2γ = 0. However, α + β + 2γ = −γ + (1 − γ) + 2γ = 1, a
contradiction.
Therefore, no such constants can exist, so the three listed vectors do not
generate R3 .
Alternative Approach: Label these vectors as v1 , v2 , v3 , respectively. Note
that v3 = v1 + v2 , and hence any linear combination of the three vectors can
be written as a linear combination of just v1 and v2 . Thus, the three listed
vectors generate only a plane in R3 .
6. Consider the plane in R3 given by the solutions to the equation 4x − 3y + z = 0. Write
this plane as the span of some vectors in R3 .
Solution: Notice that we can write z = −4x + 3y. Hence, we have
x x
y | x, y, z ∈ R, 4x − 3y + z = 0 = y | x, y, z ∈ R, z = −4x + 3y
z z
x
= y | x, y ∈ R
−4x + 3y
1 0
= x 0 +y 1 | x, y ∈ R
−4 3
1 0
= Span 0 , 1
−4 3
7. Determine whether each of the following sets is a vector space in R4 . Justify your
response.
x1
x
2
4
(a) ∈ R : x1 + x2 = 3
x3
x4
0
0
Solution: No. 0 is not a member of this set.
0
x 1
x
2
4
(b) ∈ R : x1 + x2 + x3 + x4 = 0
x3
x4
Solution: Yes. Letting A be the 1×4 matrix 1 1 1 1 , we have that
this set is the null space of A, and null spaces are always vector spaces.
x 1
x
2
4
(c) ∈ R : x x x x
1 2 3 4 = 0
x3
x4
1 0
1 0
Solution: No. Note that 0 and 1 are both members of the set,
0 1
1
1
but 1 is not. Hence, this set is not closed under addition.
8. Let Pn denote the vector space of polynomials having degree at most n, with coefficients
from R. Show that the set of polynomials having degree at most k, with k < n, is a
vector subspace of Pn .
Solution: Notice that the described set can be written as Span 1, x, x2 , . . . xk .
As spans of any elements are vector spaces, the described set is therefore a
vector subspace of Pn .
9. Explain how to represent a system of equations with a matrix equation. You may want
to use an example to help illustrate your points.
Solution: Suppose we have a system of linear equations
a1 · x = b1
a2 · x = b2
.. ,
.
am · x = bm
where each ai is a vector of coefficients, x is a vector of variables, and each
bi is a constant. By definition, the matrix product Ax takes the dot product
of each row of A with the vector x, and hence we can represent this list of
dot products as a matrix-vector product, taking the matrix A to have rows
b1
b2
aT1 , . . . , aTm . The equation then takes the form Ax = b, where b = .. .
.
bm
a b
10. Let A = be a real-valued matrix. Show that Null (A) is nontrivial if and only
c d
if ad − bc = 0.
Solution: We consider two cases, according to whether a = 0 or a 6= 0.
0 b
Case 1: If a = 0, then we have A = . The null space consists of
c d
x1
all vectors satisfying bx2 = 0 and cx1 + dx2 = 0. If b 6= 0, then the
x2
first equation implies that x2 = 0. The second equation, then implies that
cx1 = 0, and hence either c = 0 or x1 = 0. If c = 0, then we may choose
x1
any value for x1 , yielding that any vector of the form is a member of
0
the null space. We note in this case that ad − bc = 0, since both a = 0 and
0
c = 0. Otherwise, if c 6= 0, then the only member of the null space is .
0
Moreover, b, c are both nonzero, and a = 0, so ad − bc 6= 0.
If b = 0, then ad − bc = 0. Moreover, the only equation necessary to be
satisfied in order that a vector be a member of the null space is cx1 +dx2 = 0,
which always has infinitely many solutions for x1 , x2 .
Thus, in the case that a = 0, the nullspace is nontrivial if and only if ad−bc =
0.
Case 2: If a 6= 0, then we consider the two equations ax1 + bx2 = 0 and
cx1 + dx2 = 0. We add −c/a times the first equation to the second, yielding
the two new equations
ax1 + bx2 = 0
cb
(d − a
)x2 = 0
As a 6= 0, we note that this has a unique solution (namely x1 = x2 = 0) if
and only if d − cba 6= 0, if and only if ad − bc 6= 0.
11. Let Ax = b be a matrix equation, and let x1 be a solution to this equation. How do
you find other solutions? Why does this technique work?
Solution: To find the remaining solutions, we add any vector that is a mem-
ber of the null space of A. This technique works because if we have any
other solution x2 , we have that A(x2 − x1 ) = b − b = 0, so it must be that
x2 − x1 is a member of the null space of A. Since their difference lies in the
null space, we must have that x2 is obtained from x1 by adding a null space
vector.
Similarly, if y is any null space vector, we have that A(x + y) = b + 0 = b,
and hence we may always add null space vectors to yield additional solutions.
12. Let
1 2 3 4
0 1 −1 1
A=
0
0 0 2
0 0 0 0
Write the null space of A as the span of some vector(s).
Solution:
−5
1
Null (A) = Span
1
0
13. Define a function f : R4 → R4 by f (x) = Ax, where
1 0 −1 4
0 0 1 −1
A= 0 0 0
0
0 0 0 0
(a) Write Ker (f ) as the span of some vector(s).
Solution:
−3 0
0 1
Ker (f ) = Span 1 , 0
1 0
(b) Write Im (f ) as the span of some vector(s).
Solution:
1 −1
0 , 1
Im (f ) = Span
0 0
0 0
(c) Is f injective? Why/why not?
Solution: No, because Ker (f ) 6= {0}.
(d) Is f surjective? Why/why not?
Solution: No, because Im (f ) 6= R4 .
14. Suppose f : R2 → R2 is a linear function, and you know that
1 2 1 −1
f( )= , and f ( )=
0 3 1 2
Find a matrix A so that f (x) = Ax for all x ∈ R2 .
Solution: Note that
0 1 1 1 1 −1 2 −3
f( ) = f( − ) = f( )−f ( )= − = .
1 1 0 1 0 2 3 −1
Thus, as the columns of A are f (e1 ) and f (e2 ), we have
2 −3
A= .
3 −1
15. Let f : V → W be a linear function on vector spaces V and W . Explain how Ker (f )
relates to injectivity. Why is this property true?
Solution: We know that f is injective if and only if Ker (f ) = {0}. This is
true because f (v1 ) = f (v2 ) if and only if v1 − v2 is a member of the kernel
of f , and hence we can have two different vectors having the same function
value if and only if there is a nonzero member of the kernel.
16. Let f (x) = Ax be a linear function from Rn to Rm , where A is a matrix. Explain
how surjectivity of f relates to systems of linear equations with coefficients given by
A. You may wish to use an example to help illustrate your points.
Solution: Consider the linear system Ax = b, where b is a vector in Rm . If
f is surjective, then this system has a solution for x regardless of the choice
of b. If it is not surjective, then there are choices of b for which the system
has no solution.
17. Can you construct a 3 × 3 matrix A so that
x z+x
A y = y
z x
x
for all y ∈ R3 ? If so, do it. If not, explain why not.
z
Solution: Yes.
1 0 1
A = 0 1 0 .
1 0 0
18. Can you construct a 3 × 3 matrix A so that
x z+x+1
A y = y
z x
x
for all y ∈ R3 ? If so, do it. If not, explain why not.
z
Solution: No. Recall that the matrix vector product can be represented as
linear combination of the columns
of A; that is, if the columns of A are
x
a1 , a2 , a3 , then we have A y = xa1 + ya2 + za3 . However, the vector
z
z+x+1
y cannot be represented as a linear combination of three vectors
x
with weights x, y, z, as the constant term would not be present in such a
combination. Hence, this is impossible.
19. Suppose that v ∈ Span {v1 , v2 , . . . , vk }. Show that
Span {v1 , v2 , . . . , vk } = Span {v, v1 , v2 , . . . , vk } .
Solution: Certainly it is true that Span {v1 , v2 , . . . , vk } ⊆ Span {v, v1 , v2 , . . . , vk },
as anything written as a linear combination of v1 , v2 , . . . , vk can also be writ-
ten as a linear combination of v, v1 , v2 , . . . , vk by taking the coefficient of v
to be 0.
For the opposite containment, note that as v ∈ Span {v1 , v2 , . . . , vk }, we
have that there are coefficients a1 , a2 , . . . , ak such that v = a1 v1 + a2 v2 +
. . . ak vk .
Suppose w ∈ Span {v, v1 , v2 , . . . , vk }. Then we have that there are coeffi-
cients β, b1 , b2 , . . . , bk such that
w = βv + b1 v1 + b2 v2 + . . . bk vk
= β(a1 v1 + a2 v2 + . . . ak vk ) + b1 v1 + b2 v2 + . . . bk vk
= (βa1 + b1 )v1 + (βa2 + b2 )v2 + · · · + (βak + bk )vk .
Hence w ∈ Span {v1 , v2 , . . . , vk }.
20. Let W1 , W2 be vector subspaces of a vector space V . Define U = {w1 + w2 : w1 ∈
W1 , w2 ∈ W2 }. Is this a vector subspace of V ? Why/why not?
Solution: Yes. Consider the necessary properties:
1. 0 ∈ W1 and 0 ∈ W2 , hence 0 + 0 = 0 ∈ U .
2. Let w1 + w2 , v1 + v2 ∈ U , where w1 , v1 ∈ W1 and w2 , v2 ∈ W2 . Then
(w1 + w2 ) + (v1 + v2 ) = (w1 + v1 ) + (w2 + v2 ). But since W1 and W2 are
vector spaces, w1 + v1 ∈ W1 and w2 + v2 ∈ W2 . Hence (w1 + v1 ) + (w2 +
v2 ) ∈ U , so (w1 + w2 ) + (v1 + v2 ) ∈ U and U is closed under addition.
3. Let w1 + w2 ∈ U , where w1 ∈ W1 and w2 ∈ W2 , and let α be a scalar.
Then as αw1 ∈ W1 and αw2 ∈ W2 , we have that α(w1 + w2 ) = αw1 +
αw2 ∈ U , so U is closed under scalar multiplication.
21. Let D = diag(d1 , d2 , . . . , dn ) be a diagonal matrix over R, and let f (x) = Dx be a
linear transformation from Rn to Rn . Show that Ker (f ) is the span of all ei such that
di = 0, and Im (f ) is the span of all ei such that di 6= 0.
x1
x2
Solution: First, note that for any vector x = , we have that Dx =
..
.
xn
d1 x 1
d 2 x2
.. .
.
d n xn
Suppose x is such that Dx = 0. Note then that di xi = 0 for all i, so for any
xi with xi 6= 0, we must have di = 0. Hence, xi can be written as a linear
combination of ei , over only those ei having di = 0. Likewise, any such linear
combination will clearly have Dx = 0. Therefore, Ker (f ) is precisely the
span of all ei such that di = 0.
For the other part, consider the span of the columns of D. Note that any
column for which di = 0 is an all zeros column, and hence can be removed
from the generating set for the span of the columns. Thus, the only columns
that contribute to the span are those for which di 6= 0.