16CHAPTER 3.SYSTEMS OF EQUATIONSAnother nice feature of the LU decomposition is that it can be done by over-writing A, therefore saving memory if the matrix A is very large.The LU decomposition is useful when one needs to solve Ax=bforxwhenA is fixed and there are many differentb’s. First one determines L and U usingGaussian elimination. Then one writes(LU)x= L(Ux) =b.We lety= Ux,and first solveLy=bforyby forward substitution. We then solveUx=yforxby backward substitution.When we count operations, we will see thatsolving (LU)x=bis significantly faster once L and U are in hand than solvingAx=bdirectly by Gaussian elimination.We now illustrate the solution of LUx=busing our previous example,whereL =⎛⎝100−210−111⎞⎠,U =⎛⎝−32−10−2500−2⎞⎠,b=⎛⎝−1−7−6⎞⎠.Withy= Ux, we first solve Ly=b, that is⎛⎝100−210−111⎞⎠⎛⎝?1?2?3⎞⎠=⎛⎝−1−7−6⎞⎠.Using forward substitution?1=−1,?2=−7 + 2?1=−9,?3=−6 +?1−?2= 2.We now solve Ux=y, that is⎛⎝−32−10−2500−2⎞⎠⎛⎝?1?2?3⎞⎠=⎛⎝−1−92⎞⎠.Using backward substitution,−2?3= 2→?3=−1,−2?2=−9−5?3=−4→?