Practice Exam2 Sol
Practice Exam2 Sol
Practice Exam2 Sol
Practice Exam 2
1 2 4 3
1. Let v1 = 0 , v2 =
1 , v3 =
2 , and w = 1 .
−1 3 6 2
(a) Is w in {v1 , v2 , v3 }? How many vectors are in {v1 , v2 , v3 }?
(b) How many vectors are in span {v1 , v2 , v3 }?
(c) Is w in the subspace spanned by {v1 , v2 , v3 }? Why?
Solution.
(a) No. {v1 , v2 , v3 } is a set containing only three vectors v1 , v2 , v3 . Apparently, w equals none of
these three, so w ∈ / {v1 , v2 , v3 }.
(b) span {v1 , v2 , v3 } is the set containing ALL possible linear combinations of v1 , v2 , v3 . Particularly,
any scalar multiple of v1 , say, 2v1 , 3v1 , 4v1 , · · · , are all in the span. This implies span {v1 , v2 , v3 }
contains infinitely many vectors.
(c) To determine whether w belongs to span {v1 , v2 , v3 }, we are to look to write w as a linear
combination of v1 , v2 , v3 . For this purpose, we need to find three scalars c1 , c2 , c3 , such that
w = c1 v1 + c2 v2 + c3 v3 . This amounts to solve the system Ac = w for c = (c1 , c2 , c3 )T , where
matrix A = (v1 v2 v3 ). Note that actually we only need to determine if this system allows a
solution. Now apply Gaussian to reduce the augmented matrix in the echelon form:
1 2 4 3 1 2 4 3 1 2 4 3
R3 +R1 R3 −5R2
0 1 2 1 −−−−→ 0 1 2 1 −−−−−→ 0 1 2 1
−1 3 6 2 0 5 10 5 0 0 0 0
The bottom row doesn’t lead to inconsistency, so the system allows a solution (actually has
infinitely many). This shows that w is in the subspace spanned by {v1 , v2 , v3 }.
2. Given subspaces H and K of a vector space V , the sum of H and K, written as H + K, is the set of
all vectors in V that can be written as the sum of two vectors, one in H and the other in K; that is,
Proof.
(a) Since H and K are subspaces of V , the zero vector 0 has to belong to them both. Taking
u = v = 0, we have w = 0 + 0 = 0, which, by definition, belongs to H + K. Next, we are to show
H + K is closed under both addition and scalar multiplication. Suppose w1 , w2 are two vectors
in H + K. By definition, they can be written as
Hence,
w1 + w2 = (u1 + v1 ) + (u2 + v2 ) = (u1 + u2 ) + (v1 + v2 ),
1
Matrix Algebra Practice Exam 2
where cu1 ∈ H because H is closed under scalar multiplication; and cv1 ∈ K parallelly. Now
that cw1 has been written as the sum of two vectors, one in H and the other in K, it’s in H + K.
That is, H + K is closed under scalar multiplication. And we are done.
(b) Since H is a subspace of V , it’s nonempty, closed under addition and scalar multiplication. We
only need to show that H is a subset of H + K. This is derived from the fact that each vector
in H can be written as the sum of itself, which belongs to H, and the zero vector, which belongs
to K. A similar argument justifies K is a subspace of H + K, too.
3. Let x and y be linearly independent elements of a vector space V . Show that u = ax + by and
v = cx + dy are linearly independent if and only if ad − bc 6= 0. Is the entire collection x, y, u,v
linearly independent?
µ ¶
a c
Proof. Let A = (x y), B = (u v), C = , then
b d
µ ¶
a c
AC = (x y) = (ax + by cx + dy) = (u v) = B.
b d
Two key facts we’ll use later are that u and v (or, x and y) are linearly independent if and only if
the homogeneous system Br = 0 (or, Ar = 0) allows only trivial solution, denoted by Fact 1 (or,
Fact 2). Now slow down, carefully think of the following deduction process, and make sure you really
understand each step involved.
The entire collection x, y, u,v is linearly dependent, since we have four scalars, a, b, −1, 0, not all zero,
such that the linear combination ax + by + (−1)u + 0v = 0.
−2 4 −2 −4
4. Find bases for the column space (range) and null space (kernel) of the matrix A = 2 −6 −3 1 .
−3 8 2 −3
Solution. To find the basis for column space, we need to find pivot column(s). To find the basis for
null space, we need to find general solution to the homogeneous system Ax = 0. Both can be achieved
2
Matrix Algebra Practice Exam 2
We see that the first two columns are pivot columns, so the first two column of the ORIGINAL
MATRIX A, namely, {(−2, 2, −3)T , (4, −6, 8)T }, form a basis for Col A. The last two columns are
free, and we can easily read the general solution from the echelon form:
5 3
x2 = − x3 − x4 , x1 = 2x2 − x3 − 2x4 = −6x3 − 5x4 , x3 , x4 free
2 2
Written in vector form,
x1 −6x3 − 5x4 −6x3 −5x4 −6 −5
x2 − 5 x3 − 3 x4 − 5 x3 − 3 x4 5 − 32
x= 2
x3 =
2 = 2 + 2
x3 0
= x3 2 + x4
1
x3 0
x4 x4 0 x4 0 1
½ µ ¶ µ ¶¾ µ ¶
3 −4 2 2
5. Show that u1 = , u2 = is a basis for R . Let x = . Find the coordinate
−5 6 −6
vector for x with respect to this basis.
Solution. First of all, u1 and u2 are linearly independent because they are not multiples of each
other. Next, we are to characterize vectors in span {u1 , u2 }. Suppose vector b ∈ R2 belongs to
span {u1 , u2 }, then the linear system Ay = b is consistent, where matrix A = (u1 u2 ). Applying
Gaussian to the augmented matrix, we get
µ ¶ Ã !
3 −4 b1 R2 + 53 R1 3 −4 b1
−−−−−→
−5 6 b2 0 − 23 b2 + 53 b1
The system has a pivot in each row, thus is always consistent for all possible b ∈ R2 . Therefore,
span {u1 , u2 } = R2 , and {u1 , u2 } form a basis for R2 . To find the coordinate vector for x, we need
find the solution to Ay = x. Replacing b1 , b2 by 2, −6 respectively in the echelon form we obtained
above, we can write out the solution y = (6, 4)T . This is to say, x = 6u1 + 4u2 , so the coordinate
vector for x w.r.t {u1 , u2 } is (6, 4)T .
Proof.
(a) Suppose hx, vi = 0 for all v ∈ V . Simply let v = x and we get hx, xi = 0, which implies x = 0.
3
Matrix Algebra Practice Exam 2
hx, vi = hx, c1 v1 + c2 v2 + · · · + cn vn i
= c1 hx, v1 i + c2 hx, v2 i + · · · + cn hx, vn i (by linearity)
= c1 hy, v1 i + c2 hy, v2 i + · · · + cn hy, vn i (since hx, vi i = hy, vi i)
= hy, c1 v1 + c2 v2 + · · · + cn vn i (by linearity)
= hy, vi
Since this equality holds for all v ∈ V , part (b) tells us that x = y.
7. Prove that
(a1 + a2 + · · · + an )2 6 n(a21 + a22 + · · · + a2n )
for any real numbers a1 , · · · , an . When does equality hold?
Proof. Let u = (a1 , a2 , · · · , an )T , v = (1, 1, · · · , 1)T . Then,
8. Verify the formula kvk = max{|v1 + v2 |, |v1 − v2 |} defines a norm on R2 . Establish the equivalence
between this norm and the usual Euclidean norm k · k2 .
Proof. We need verify positivity, homogeneity and triangle inequality one by one.
Positivity: Since |v1 + v2 | > 0, |v1 − v2 | > 0, it’s clear that kvk > 0. Moreover, kvk = 0 if and only
if |v1 + v2 | = |v1 − v2 | = 0, that is, v1 = v2 = 0, namely v = 0.
Homogeneity: kcvk = max{|cv1 + cv2 |, |cv1 − cv2 |} = |c| max{|v1 + v2 |, |v1 − v2 |} = |c| kvk.
Triangle Inequality: We need use triangle inequality for absolute value
|a + b| 6 |a| + |b|,
and the fact (denoted by Fact 3) that “the maximum of sums is less than or equal to the sum of
maximums”,
max{a1 + a2 , b1 + b2 } 6 max{a1 , b1 } + max{a2 , b2 }.
4
Matrix Algebra Practice Exam 2
Both inequalities are usual. Having them, we can obtain the triangle inequality for norm k · k:
We just directly proved k · k defines a norm. If we think in another way, it can be verified that
namely, k · k is actually the 1-norm k · k1 . The proof is not difficult and left to you.
To show the equivalence of two norms, we need to find two POSITIVE constants m, M , such that
You may already find it’s convenient to compare squares of norms when Euclidean norm is involved.
So, let’s square:
This allows us letting m = 1. On the other hand, since |2v1 v2 | 6 v12 + v22 ,
1 1 1
9. Prove the matrix A = 1 2 −2 is positive definite. Find its Cholesky factorization.
1 −2 14
Proof. We apply Gaussian to show the matrix has all positive pivots and find the LDLT factorization.
1 1 1 1 1 1 1 1 1
R2 −R1 R +3R2
1 2 −2 − −−−→ 0 1 −3 −−3−−−→ 0 1 −3
R3 −R1
1 −2 14 0 −3 13 0 0 4
1 0 0 1 0 0 1 0 0
R2 +R1 R −3R2
0 1 0 − −−−→ 1 1 0 −−3−−−→ 1 1 0 =L
R3 +R1
0 0 1 1 0 1 1 −3 1
Now, we see the matrix is regular and has all positive pivots 1, 1, 4, thus is positive definite. Let D =
diag(1, 1, 4), S = diag(1, 1, 2), then we obtain the Cholesky factorization
A = LDLT = LS 2 LT = LSS T LT = M M T ,
³1 0 0
´
where M = LS = 1 1 0 .
1 −3 2