Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. The n × n factorization A = LU, where L = (lj) is lower triangular and U = (\

ID: 662986 • Letter: 2

Question

2. The n × n factorization A = LU, where L = (lj) is lower triangular and U = ("ij) is upper triangular, can be computed directly by the following algorithm (provided zero divisions are not encountered): Specify cither E orn and compute the other such that 11114m = a11-Compute the first column in L by 0i1 and compute the first row in U by Now suppose that columns 1, 2,.k- I have been computed in L and that rows 1,2,.k-1 have been computed in U. At the kth step, specify either or and compute the other such that E-I taa"k.-@g1.""-. Compute the kth column in L by and compute the kth row in U by tk This algorithm is continued until all elements of U and L are completely determined. when lii = 1 ( 1 i n), this procedure is called the Doolittle factorization, and when Iljj 1 ( 1 s) n), it is known as the Crout factorization. Define the test matrix 7 10 8 7 A=16 8 10 9 5 7 9 10 Using the algorithm above, compute and print factorizations so that the diagonal entries of L and U are of the following forms: diag(L) [1, 1, 1, 1] 17, 7, 7, diag(U) [?, ?, ? ?) 1, Crout Doolittle 12, 1, 2, , 2, (7, ?, 7, 9] [3, 5, 7, Here the question mark means that the entry is to be computed. Write code to check the results by multiplying I and U together.

Explanation / Answer

function [results] = matrixMultiply(L, U)

results = L*U;

end

L = [1 1 0 0];
U = [1; 2; 3; 4];

matrixMultiply(L, U)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote