Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. (Applying LU and LUP decompositions, 14pt) In this problem, we'll use the LU/LUP decomposition to solve a linear system of equations. a) [3pt] For

image text in transcribed

4. (Applying LU and LUP decompositions, 14pt) In this problem, we'll use the LU/LUP decomposition to solve a linear system of equations. a) [3pt] For A=[4141147;74283;1010889;1196212;610102013]; find matrices P, L, and U so that PA = LU using Matlab's lu function. Based on your results: did Matlab use pivoting during the lu-computation? b) [4pt] For b=[4;24;7;16;6] solve Ax=b using the LU decomposition as follows. Solving Ax=b is the same as solving PAx =Pb. (With P from a). Since PA =LU, we need to solve LUx =Pb, and we can split that into two triangular systems as follows: Ly=Pb, and Ux=y Solve both of these systems using Matlab's linsolve, and state x and y explicitly. Hint: which one do you need to solve first? Remember what you have, and what you need. c) [2 pt] Compare the quality of the x you found in b to the solution of Ax=b you get from using linsolve by comparing the differences Ax - b. d) [1pt] You want so solve Ax=b for more than one vector b, so you collect the b-vectors into a single matrix B. Your goal then is to find a matrix X so that AX=B (one column x in X for each column b in B). (Check: If A is an mxn matrix, and B is a kxp matrix, what are the dimensions of X ?) For 23] solve AX=B using linsolve, and check that AX=B in Matlab. Hint: linsolve(A,B) works. e) [4pt] We now want to solve AX=B (with A from part a, and B from part d) using the LUP decomposition from parts a/b. Solving AX=B is the same as solving PAX=PB, so, as earlier, we can split this into two triangular systems: LY=PB and UX=Y. Solve these two equations using Matlab's linsolve. First find Y in LY =PB, and then use that to find X in UX=Y. Check that AXB is close to the zero matrix. For the last two problems, be sure to work with format short (or even format compact) so that the matrices don't use up too much screenspace

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions