Question: Consider the 100 times 100 matrix A = (-4 1 1 1 - 4 1 1 1 - 4 1 1), b = (1 1),

 Consider the 100 times 100 matrix A = (-4 1 1

Consider the 100 times 100 matrix A = (-4 1 1 1 - 4 1 1 1 - 4 1 1), b = (1 1), c =(0 1 2) which has -4 on the main diagonal and ones ons the 2nd and n/2-th sub/super diagonals (use integer division for n/2) (a) Solve the systems Ax = b and Ay = c. Calculate the LU-decomposition only once. Useful Python functions: scipy.linalg.lu factor, scipy.linalg.lu.solve (b) Calculate the LU-decomposition and plot the "sparsity patterns" of A, L and U. These are plots which are black in the positions where the respective matrices are non-zero and white where they are zero. What do you observe? Useful Python functions: scipy.linalg.lu, matplotlib.pyplot.spy (c) What is the difference between lu and lu_factor (In terms of the returned results)? Which one would you use in practice

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 Databases Questions!