Assignment Task
Hand problems
1. Answer the true or false questions below. Give a short proof/ justification/counterexample in each case.
- A matrix A is singular if and only if it has a zero
- The eigenvalues of a real matrix are
- The eigenvalues of a symmetric matrix are
- The eigenvalues of a skew-symmetric matrix are pure (A matrix A is said to be skew-symmetric if A ⊤ = − A .)
- The eigenvalues of a symmetric positive definite matrix are strictly
- The eigenvalues of an uppertriangular matrix R are the diagonal
2. (a) A matrix is “nilpotent” if A k = 0 for some k . What are the eigenvalues of a nilpotent matrix? (Justify your answer.)
(b) A matrix is “idempotent” if A 2 = A . What are the eigenvalues of an idempotent matrix? (Justify your answer.)
3. (a) Explain why, when computing the eigenvalue decompoisition of a dense matrix A using (i) Rayleigh quotient iteration and (ii) the QR iteration, it is beneficial to first compute an upper Hessenberg factorisation of A . What additional benefits are gained when A is symmetric?
(b) Prove Proposition 25.16 from the course notes
(c) Typically the shifted-QR algorithm applied to an upper Hessenberg introduces negligible values in the subdiagonal entries H 2 , 1 or H n,n −1 . Suppose a shift could instead be chosen to introduce a zero in one of the interior subdiagonals, i.e., H k +1 ,k = 0, where 1 < k>
4. Complete the crossword below. (Simply write out the solutions in your answers. E.g., 7a = eigenvalue.)
5. Recall the singular value decompoisition of Topic 18.
- Show that the singular values are given by the square root of the eigenvalues of A H A , e., σ i ( A ) = √ λ ( A H A ).
- Suppose now that A is a square Show that the SVD of A may be computed form the eigenvalue decomposition of the matrix
(Hint: Notice that if A = U Σ V H then AV = U Σ and A H U = V Σ. Show that the eigenvectors of H are given by the columns of [ V ; U ] and [ V ; − U ].)
Computer Problems
1. Consider the matrix
- Use your built in eigenvalue solver to verify these eigenvalues and compute the associated Verify that A is a normal matrix and that its eigenvectors are unitary .
- Implement 30 steps of the normalised power iteration for the matrix A with starting guess x [0] . ∗ Compute the Rayleigh quotient at each iteration to approximate the largest (magnitude) eigenvalue of A at each iteration. Make sure your code is efficient in the sense that only one matrix-vector multiplication and one vector inner-product is performed during each Produce a table showing the approximations and errors at each iteration. Explain why the convergence is so slow.
- Repeat (b) but now using 13 steps of the inverse iteration to approximate the smallest (magnitude) eigenvalue of A . Make sure your code is efficient in the sense that only one linear solve is performed during each iteration. Explain why the convergence is much faster here.
- Repeat the above, but now applying 4 steps of the Rayleigh quotient iteration to A with starting vector x [0] . Make sure your code is efficient in the sense that only one matrix-vector multiplication and one linear solve is performed during each To which eigenvalue does the iteration converge in this instance? How does the convergence compare to the previous two methods? For most symmetric problems, the Rayleigh quotient iteration will convergence cubically , meaning the number of correct digits will approximately triple each iteration. Verify this here. If you were to perform one more iteration, you will likely get a warning about a singular or nearly singular matrix. Why?
- We seek now to use the Rayleigh quotient iteration to find the largest eigenvalue of A . To do so, perform the steps of the normalised power iteration, followed by three steps of the Rayleigh quotient iteration using x [3] as its initial vector. Produce a table as in the previous questions.
- The Rayleigh quotient iteration requires a shifted linear solve at each Explain why first computing a Hessenberg factorisation A = PHP ⊤ of A and applying the Rayleigh quotient iteration to H could make the √ a lg orithm more efficient. 1 Modify your code from (d) to do this, now using with a starting vector x [0] = P [1 , 2 , 3 , 4] ⊤ / 30.
- Implement 30 steps of the basic QR iteration (no Hessenberg reduction, shifting, or deflation). You may use the built-in QR factorisation routine in your software (e.g., qr) in MATLAB to compute the required factorisations). Display the matrix A [30] (but not any of the intermediate matrices). Comment on the structure of this matrix. What eigenvalue has been obtained? Explain how deflation could be used to find the remaining eigenvalues. Use your bulit-in eigenvalue solver the find the eigenvalues of A [30] (1 : 4 , 1 : 4) and verify this idea.
- Modify your QR iteration to use a Rayleigh shift (i.e., σ k = [ A k ] 4 , 4 ). How many iterations are required until deflation may be used now?
- Modify your QR iteration (from (g) or (h)) to compute the eigenvector corresponding to the computed
2. (a) Implement the Arnoldi algorithm as described in the lectures to find eigenvalues of the N = 10 2D Poisson problem from the lecture notes. Use a starting vector x 0 = [1 , 0 , 0 , . . . , 0] ⊤ and take 20 steps of the Arnoldi iteration. At each iteration, compute the eigenvalues of the relevant upper-Hessenberg matrix and produce a figure akin to that in Topic 26 of the notes. Compute the exact eigenvalues (using either the known formula or a built-in function) and display these at height k = 21 on your figure.
(b) A spy plot of the upper-Hessenberg matrices H k inthe Arnoldi above will show them to be dense. However, since A is symmetric, we know this is just due to rounding error and computing these values is a wasted effort. Explain why the Lanczos algorithm is more efficient. Implement the Lanczos algorithm and produce again the figure from (a).
3. Use the two approaches of HP5 to compute the singular values of the matrix A from CP1. Verify your answers by comparing with your built in svd routine.
4. Eigenvalue avoidance (or “avoided crossing”) is a phenomenon observed in quantum physics (as well as other areas of science and mathematics, such as the computation of the Riemann-zeta function) whereby eigenvalues of hermitian matrices tend to avoid coalescing. Demonstrate this in your software system by creating two random symmetric matrices with normally distributed entries (e.g., using A = randn(10); A = A+A'; in MATLAB) and, for a range of values of t in [0, 1], plotting the eigenvalues of tA + (1 t ) B . The figure below shows an example (with rng(42)). Experiment until you find a nice looking example, and include it in your report.
This Mathematics as been solved by our PhD Experts at My Uni Paper.