Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Math 170A, FA 2022

Sample final

Q1.  Consider the positive definite matrix A ∈ Rn×n, and let A = RT R be its Cholesky

decomposition.  Show that κ2 (A) = (κ2 (R))2 , where κ2  stands for “condition number in norm 2”.

Q2.  Let A  =  [5, 12]T   and b  =  [1, − 1]T .  Find the minimizer x  ∈ R for the least squares

problem minxR  ||b Ax||2  in two ways: one, by using the full QR factorization for A,

Q3.  Suppose you are solving

[ 1(1)   1(2) ] x = [0(2).(.)2(8) ] .

Using a magic crystal ball that is decent at math, you find an approximate solution

x+δx = [1(1) ].  Without calculating the true solution, use the companion inequality for

the relative error in the right hand side and the relative error in the solution, together with the 1-norm, to decide whether  is smaller than 0.01. Show your work.

Q4.  Show that the matrix

A = [0(2)   2(ϵ) ]

is defective for any ϵ  0.

 

Remember that you can always check your answer by computing A = PT LU .

Q6. To answer the questions below, you may assume that the following holds (you don’t

need to prove this):

∥x∥∞  ≤ ∥x∥2  ≤ ∥x∥1  ≤ ^nx2  ≤ n∥x∥.

Questions:

a) Show that ∥A∥1  ≤ n∥A∥.

b) Find an example of a matrix for n = 2 such that A∥1   = 2∥A∥.  You must compute both norms to show that your example works.

Hint:   It may help to first find an example of a length 2 vector x for which ∥x∥1  = 2∥x∥∞  first.

Q7.  Suppose that the matrix A ∈ C4×4  has eigenvalues {2, −2, 1.5, 0.5}, with eigenvectors

Q8. Let

l  1                    l  1                   l    0

v1  =  图(图) 1(1)  '(')  ,  v2  =  图(图) 0(1)  '(')  ,  v3  =  图(图) 2(1)  '(')

a) Perform the Gram-Schmidt process on {v1 ,v2 ,v3 } to obtain three orthonormal vectors q1 ,q2 ,q3 .

b) Let A = [v1 ,v2 ,v3]; use a) to find the minimizer x for the least squares problem involving A and b = [1, 1, 1, 1]T .

Q9. Apply QR iteration (by hand) to the matrix

A = (1(0)   0(1)) .

What is your observation concerning convergence?

Q10.  Consider the matrix

\0(1)

A =  图(图)0 (1

 

 

2

 1

0

 

 

0

2

1

 

 

1(1))

1 '

2)

(a) Find a reflector Q1  that maps all entries below a11  to zero, i.e. the first column of

Q1 A should be of the form [⋆,0, 0, 0]T  where ⋆ is some positive number. (b) Compute Q1 AQ1 .

(c) Interpret your result in (b) in terms of the algorithm we discussed in class that finds the upper Hessenberg form of A.  The result in (b) does not provide the first step of this algorithm. Why? What is different compared to what we talked about in class?

Q11. Let A =  「(l)         .  Will the Jacobi iteration converge regardless of the initial

guess x(0) ? Explain your answer.

Q12. Write a MATLAB function that takes as input a matrix A, a vector b, an initial guess x(0) , and a maximal number of iterations k, and then uses the Jacobi method to solve Ax = b with initial guess x(0) . Your function should stop when the maximal number k of iterations is reached.

Note:  Write the MATLAB function by hand, because this is what you will need to do on the final in case there is a MATLAB question.  Once you are done, you can implement it in MATLAB to make sure it actually runs.

Q13.  Note:  This problem is an experimental question using MATLAB. Since you won’t be

able to use MATLAB in the final, a question like this won’t be on the final. Nevertheless, to prepare for the final, it is useful to understand the QR iteration code and experiment with it.

Consider the attached QR iteration code (it’s an implementation of what we did in the lecture).

Complete the following two experiments in MATLAB and interpret the results based on what we learned in the lecture.

a) Reset the random number generator by typing in rng(112233); then run the code with input

A =randn(6) + i∗randn(6),

making sure the output is displayed.

b) Type in clear  all; and then once again reset the random number generator by typing in rng(112233); repeat part a), this time with the matrix C obtained by typing

B =randn(6);  C = B + B\ ;