



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Exam Practice Problems Material Type: Notes; Class: NUMERICAL LINEAR ALGEBRA; Subject: Computer Science; University: University of Colorado - Boulder; Term: Fall 2008;
Typology: Study notes
1 / 6
This page cannot be seen from the preview
Don't miss anything!




September 23, 2008
Exam Practice Problems Selected Solutions
Hx = (I − 2 P )x = (x − P x) − P x = y − P x
takes the component y and adds to it −P x. This has the effect of recreating the vector x but reflected about y. H^2 x is just x. By the same argument as above, the second application of H reflects Hx back across the line orthogonal to P x.
(^) and b =
(^).
Split b into p + q with p in the column space of A and q perpendicular to that space. Which of the four fundamental subspaces of A contains q? Why? Solution: The projection of b onto the column space of A is
P b = A(AT^ A)−^1 AT^ b =
( 9 − 9 − 9 18
)− 1
T
(^) =
(^).
Use p = P b, then q = b − p = ( − 2 2 1 )T^. Check that this q is orthogonal to p: pT^ q = 0. Thus, q is in the left nullspace of A.
A =
( 1 − 1 0 0
) , B =
( 0 0 0 0 0 0
) .
Solution: The column space of A is the set of all linear combinations of the two column vectors
( 1 0
) and
( − 1 0
)
. That is, it is the set of all vectors
of the form
( α − β 0
) for some scalars α and β or, in other words, all vectors of dimension 2 with a zero second element. The nullspace of A is the set of all solutions to the homogeneous system Av = 0. If v =
( v 1 v 2
) is a solution, then
Av =
( v 1 − v 2 0
( 0 0
) .
So the nullspace of A is the set off all vectors v with equal elements. The column space of B is the zero vector of dimension 2 because all columns of B are the zero vector and all linear combinations of the zero vector are the zero vector itself. The nullspace of B is all of R^3 because any vector multiplied by B gives the zero vector.
√^1 3 √^1 14 √^1 3 √^2 14 √^1 3 √^ −^3 14
is orthogonal. Is there more than one choice for that third column? Why or why not?
Solution: We can build the third column out of any vector that is linearly inde- pendent of the first two. To make the math a little easier, we choose a starting vector of v = ( 42 0 0 )T^. But ANY linearly independent starting vector will give the same answer or its negative. (There are two possible solutions along the same line but with opposite direc- tions.) Applying the Classical Gram-Schmidt process gives
ˆq 3 = v − (vT^ q 1 )q 1 − (vT^ q 2 )q 2
(^) − ( √^42 3
√^1 3 √^1 3 √^1 3
−^ (
√^1 14 √^2 14 √^ −^3 14
(^) − 2 2 +
(^) √^1 2
(^) − √^2 2
(^).
The second column is different, and we have
H 1 a 2 =
( I − 2 uuT ‖ u ‖ 22
) a 2
(^) − 2 2 +
(^) √^1 2
(^) − √^2 2
(^).
We then have to put a zero in the (3,2) position using H 2. We thus work on the vector x =
( √^2 2
)
. In this case,
u =
x + ‖ x ‖ 2 e 1 √ 1 + x 1
( 2 +
) ,
and Hx =
) .
With this result, we have R =
(^). We get Q by form-
ing H 1 and H 2 explicitly and multiplying to get Q = H 2 T H 1 T =
.
You can check that this result agrees exactly with Matlab’s.
Solution: Machine epsilon is the smallest number x such that f l(1 + x) > 1. Here’s a script that finds it:
function meps = macheps
meps = 1; while (1.0 + meps > 1.0) meps = meps/2; end meps = meps*
You just have to be careful not to get macheps/2.
emin = (000) 2 = 0 emax = (111) 2 = 7.
The values 0 and 7 are reserved, so the range of biased exponents is [1, 6]. In IEEE, where there are 8 bits for the exponent, the bias on the exponent is 2^8 −^1 − 1 = 127. So, the bias on our exponent is 2^3 −^1 − 1 = 22 − 1 = 3, and the range of unbiased exponents p is [1 − 3 , 6 − 3] = [− 2 , 3]. For the 5 bit fraction:
fmin = (.00000) 2 = 0
fmax = (.11111) 2 = 0. 96875. Which translates into a mantissa of
mmin = min(1.f ) 2 = (1.00000) 2 = 1 mmax = max(1.f ) 2 = (1.11111) 2 = 1. 96875.