Question: Problem 3 . [ 5 0 points ] Use Jupyter notebook for parts ( b ) , ( d ) and ( e ) of

Problem 3.[50 points] Use Jupyter notebook for parts (b),(d) and (e) of this problem.
Consider the following matrix
A=[5-1-1-1]
Here you will write your own QR decomposition algorithm for a 22 matrix and use it
repeatedly to find all the eigenvalues of A(not just the largest eigenvalue).
a.[10 points] Orthogonalize the column vectors of A by hand. In other words, let a1=(5,-1)
and a2=(-1,-1). Modify them using the QR decomposition method to find two orthogo-
nal vectors e1 and e2. Show that two vectors e1 and e2 are indeed orthogonal. Write down
the matrix Q=[e1,e2.].
b.[10 points] Write a Python function that takes an arbitrary 22 matrix as input and returns
the matrix Q. Provide A to your function as an input and show that the returned Q is equal
to the result from part (a).
c.[10 points] Construct the R matrix in the QR decomposition by hand. Write down your
matrix R.
d.[10 points] Add new code to the Python function defined in part (b), so that it returns R,
together with Q. Show that your Python function now takes in A as an input and returns Q
and R.
e.[10 points] Apply the QR function your wrote in part (d) repeatedly to find two eigenvalues of
A. Compare your numerical result with the eigenvalues found mathematically (i.e., calculate
the eigenvalues by hand following the definition).
Problem 3 . [ 5 0 points ] Use Jupyter notebook

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!