BackSolve

# BackSolve - j u j,j 1 y j 1 u jn y n = b j and since at...

This preview shows page 1. Sign up to view the full content.

Solving Square Triangular Systems When you were taught Gaussian Elimination, you were probably taught to stop the elimination process when you achieved an “upper triangular form”, at which point you could solve the system by backward substitution. By upper triangular we mean that all matrix entries below the main diagonal are 0’s. Let’s teach a computer to solve the upper triangular system of linear equations Uy = b , where U R n × n . It is called backward substitution because the last equation has the form u nn y n = b n , and can be solved as y n = b n /u nn . Now since we know y n , the penultimate equation u n - 1 ,n - 1 y n - 1 + u n - 1 ,n y n = b n - 1 can be solved as y n - 1 = ( b n - 1 - u n - 1 ,n y n ) /u n - 1 ,n - 1 . And so we count backward, from n down to 1, finding one solution coefficient at each equation. In pseudocode: for j = n : -1 : 1 do the following: find y(j) end for j So let’s see how to implement “find y(j)”. The j th equation is u jj
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: j + u j,j +1 y j +1 + ... + u jn y n = b j , and since at this point we know y j +1 ,...,y n , we can solve this for y j : y j = ( b j-n X i = j +1 u ji y i ) / u jj . The pseudocode now might be for j = n : -1 : 1 do the following: y(j) = ( b(j) - u(j,j+1:n) * y(j+1:n) ) / u(j,j) end for j That’s it! It is that simple: y(j) = (scalar - dot product ) / scalar Of course this only works when the diagonal of U has no zero elements; but that is precisely when U is nonsingular. Therefore (in exact arithmetic, at least), this method always returns the solution when a unique solution exists. What about ﬁnite precision arithmetic? It does remarkably well, in fact if ¯ y is the computed solution, then there exists a matrix E such that ( U + E )¯ y = b, where | E | ≤ n μ | U | + O( μ 2 )...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern