- +1-530-264-8006
- info@tutorsglobe.com

18,76,764

Questions

Asked

21,311

Experts

9,67,568

Questions

Answered

Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!

Submit Assignment
## The QR Method and Linear Algebra

The QR Method:The Power Method as well as Inverse Power Method each give us only one ew–ev pair. While both of these methods are able to be modified to give more ew’s and ev’s, there is a better method for obtaining all the ew’s called the QR method. This is the foundation of all modern ew software, including Matlab, so we summarize it briefly here.

The QR method utilizes the fact that any square matrix has QR decomposition. Specifically for any A there are matrices Q and R such the A = QR where Q has the property:

Q

^{−1}= Q′and R is upper triangular. A matrix Q with the property that its transpose equivalent its inverse is called an orthogonal matrix for the reason that its column vectors are mutually orthogonal.

The QR method comprises of iterating following steps:

- Transform A into a tridiagonal matrix H.

- decompose H in QR.

- multiply Q and R mutually in reverse order to form a new H.

The diagonal of H will converge to the eigenvalues.

We facts of what creates this method converge are beyond the scope of this book. Nevertheless we note the following theory behind it for those with more familiarity with linear algrebra. First the Hessian matrix H is acquired from A by a series of similarity transformation therefore it has the same ew’s as A. Secondly if we signify by H0, H1, H2, . . ., the sequence of matrices produced by the iteration, then:

H

_{i+1}= R_{i}Q_{i}= Q_{i}^{−1}Q_{i}R_{i}Q_{i }= Q′_{i}H_{i}Q_{i}.Therefore each H

_{i+1}is a related to H_{i }by an (orthogonal) similarity transformation and so they have the same ew’s as A.There is a built-in QR decomposition in Mat lab which is called with the command [Q R] = qr(A).

Therefore the following program implements QR method until it converges:

function E = myqrmethod(A)

[m n] = size(A);

if m ~= n

warning(’The input matrix is not square.’)

return

end

H = hess(A);

E = diag(H);

change = 1;

steps = 0;

while change > 0

Eold = E;

[Q R] = qr(H);

H = R*Q;

E = diag(H);

change = norm(E - Eold);

steps = steps +1;

end

steps

As you are able to see the main steps of the program are very simple. The actually hard calculations are contained in the built-in command qr(A).

Run this program as well as compare the results with Mat lab’s built in command:

>format long

>format compact

> A = hilb(5)

> Eqr = myqrmtheod(A)

> Eml =eig(A)

Latest technology based Matlab Programming Online Tutoring AssistanceTutors, at the

www.tutorsglobe.com, take pledge to provide full satisfaction and assurance inMatlab Programming helpviaonline tutoring. Students are getting 100% satisfaction byonline tutorsacross the globe. Here you can get homework help for Matlab Programming, project ideas and tutorials. We provide email basedMatlab Programming help. You can join us to ask queries 24x7 with live, experienced and qualified online tutors specialized in Matlab Programming. ThroughOnline Tutoring, you would be able to complete your homework or assignments at your home. Tutors at theTutorsGlobeare committed to provide the best qualityonline tutoringassistance forMatlab Programming Homework helpandassignment helpservices. They use their experience, as they have solved thousands of the Matlab Programming assignments, which may help you to solve your complex issues of Matlab Programming.TutorsGlobeassure for the best quality compliance to your homework. Compromise with quality is not in our dictionary. If we feel that we are not able to provide thehomework helpas per the deadline or given instruction by the student, we refund the money of the student without any delay.