Professional Documents
Culture Documents
MIT 18.335, Fall 2006: Review Problems, Solutions
MIT 18.335, Fall 2006: Review Problems, Solutions
u
v
v
v +r
Since Pr = Pu = u and v, r are orthogonal we get
Pr
2
2
= u
2
2
=
u
v
2
v
2
2
+r
2
2
But when P
2
= 1 it must also be true that
Pr
2
2
P
2
2
r
2
2
= r
2
2
which is only possible if v
v
The eigenvalue
1
corresponding to the eigenvector x
1
= v is then
Fx
1
= Fv = v 2
vv
v
v = v =
1
v
1
= 1
And all the other eigenvalues
i
corresponding to the eigenvectors x
i
, which are orthogonal
to v, are:
Fx
i
= x
i
2
vv
v
x
i
= x
i
=
i
v
i
= 1
The geometric interpretation of this is as follows. The reector F reects the space C
n
across
the hyperplane H orthogonal to v. The reection of v is v, so this must be an eigenvector
with the eigenvalue 1. All the other eigenvectors x
i
are in H, and are not aected by the
reection, that is, Fx
i
= x
i
. This means that all the other eigenvalues are 1.
1
(Trefethen/Bau 10.1b)
det(F) =
n
i=1
i
(F) = 1
(Trefethen/Bau 10.1c)
The singular values of F are the eigenvalues of F
F:
F
F =
I 2
vv
I 2
vv
= I 4
vv
v
+ 4
vv
vv
(v
v)
2
= I
which are all 1.
4. (Trefethen/Bau 15.1e)
First, we note from the Taylor expansion of e
x
that in exact arithmetic, if n terms are included
in the sum, the terms neglected
k=n+1
1/k! are bounded by O(
machine
). Also, since there
are no inputs x to this problem, we can not have backward stability unless
f = f, which
is impossible since f = e. Instead we consider the forward error |
f f| to determine if the
algorithm is stable or unstable.
The factorial 1/k! can be computed with a relative accuracy of 2k
machine
+O(
2
machine
), since
it has k roundings to oating points, k 1 oating point multiplications, and 1 oating point
division. Now, the sum
f computed from the left can be written (neglecting second order
terms)
1
0!
(1 + 2 0
1
) +
1
1!
(1 + 2 1
2
)
(1 +
3
) +
1
2!
(1 + 2 2
4
)
(1 +
5
)
where |
i
|
machine
. The largest error is obtained if all
i
=
machine
, in which case the
coecient a
1
for all rst powers of
machine
is:
a
1
=
n
k=0
2k + 1
k!
+
k1
j=0
1
j!
But this coecient grows with increasing number of terms n, a simple lower bound is:
a
1
n
k=1
1
0!
= n
Therefore, since n grows with decreasing
machine
, the error cannot be bounded as O(
machine
)
and the algorithm is unstable.
(Trefethen/Bau 15.1f )
In this case, the algorithm computes
1
n!
(1 + 2n
1
) +
1
(n 1)!
(1 + 2(n 1)
2
)
(1 +
3
) +
1
(n 2)!
(1 + 2(n 2)
4
)
(1 +
5
)
2
and the coecient a
1
for all rst powers of
i
becomes
a
1
=
n
k=0
2(n k) + 1
(n k)!
+
k1
j=0
1
(n j)!
k=0
n k
(n k)!
+
n
k=0
1
(n k)!
+
n
k=0
n k
(n k)!
= 3
n1
k=0
1
(n k 1)!
+
n
k=0
1
(n k)!
4e
Therefore, the total relative error is bounded by O(
machine
), and the algorithm is stable.
5. (Trefethen/Bau 21.3)
1. Since A is nonsingular, it must have some nonzero entry in row 1, lets say in column j.
Let Q
1
swap columns 1 and j. The upper left element of AQ
1
will then be nonzero, and
one step of Gaussian elimination can be performed. The upper left element of U will
then also be nonzero, and the lower right (m1)(m1) submatrix will be nonsingular
just like A. This process can be applied recursively to this submatrix, and with the same
syntax as in the book, the matrix is factorized as
L
m1
L
2
L
1
AQ
1
Q
2
Q
m1
= U
or, equivalently, with Q = Q
1
Q
2
Q
m1
and L = (L
m1
L
2
L
1
)
1
,
AQ = LU
2. If A is singular, it is not always possible to change columns so that the upper left element
of the matrix is nonzero. The algorithm will then break down, and the matrix cannot
be factorized in the form AQ = LU.
An example is the matrix
A =
0 0
1 1
The columns are equal, so AQ = A. But this cannot be factorized as LU, since
0 0
1 1
1 0
l
21
1
u
11
u
12
0 u
22
u
11
u
12
l
21
u
11
l
21
u
12
+u
22