Question
Please use Python preferably. Explain the answer thank you. 2.8. Multiplying both sides of a linear system Ax = b by a nonsingular diagonal matrix
Please use Python preferably. Explain the answer thank you.
2.8. Multiplying both sides of a linear system Ax = b by a nonsingular diagonal matrix D to obtain a new system DAx = Db simply rescales the rows of the system and in theory does not change the solution. Such scaling does affect the condition number of the matrix and the choice of pivots in Gaussian elimination, however, so it may affect the accuracy of the solution in finite- precision arithmetic. Note that scaling can intro- duce some rounding error in the matrix unless the entries of D are powers of the base of the floating- point arithmetic system being used (why?). Using a linear system with randomly chosen ma- trix A, and right-hand-side vector b chosen so that the solution is known, experiment with various scaling matrices D to see what effect they have on the condition number of the matrix DA and the solution given by a library routine for solv- ing the linear system DAx = Db. Be sure to try some fairly skewed scalings, where the magni- tudes of the diagonal entries of D vary widely (the purpose is to simulate a system with badly chosen units). Compare both the relative residuals and the error given by the various scalings. Can you find a scaling that gives very poor accuracy? Is the residual still small in this case?
2.8. Multiplying both sides of a linear system Ax = b by a nonsingular diagonal matrix D to obtain a new system D Ax = Db simply rescales the rows of the system and in theory does not change the solution. Such scaling does affect the condition number of the matrix and the choice of pivots in Gaussian elimination, however, so it may affect the accuracy of the solution in finite- precision arithmetic. Note that scaling can intro- duce some rounding error in the matrix unless the entries of D are powers of the base of the floating- point arithmetic system being used (why?). Using a linear system with randomly chosen ma- trix A, and right-hand-side vector b chosen so that the solution is known, experiment with various scaling matrices D to see what effect they have on the condition number of the matrix DA and the solution given by a library routine for solv- ing the linear system DAx = Db. Be sure to try some fairly skewed scalings, where the magni- tudes of the diagonal entries of D vary widely (the purpose is to simulate a system with badly chosen units). Compare both the relative residuals and the error given by the various scalings. Can you find a scaling that gives very poor accuracy? Is the residual still small in this case? 2.8. Multiplying both sides of a linear system Ax = b by a nonsingular diagonal matrix D to obtain a new system D Ax = Db simply rescales the rows of the system and in theory does not change the solution. Such scaling does affect the condition number of the matrix and the choice of pivots in Gaussian elimination, however, so it may affect the accuracy of the solution in finite- precision arithmetic. Note that scaling can intro- duce some rounding error in the matrix unless the entries of D are powers of the base of the floating- point arithmetic system being used (why?). Using a linear system with randomly chosen ma- trix A, and right-hand-side vector b chosen so that the solution is known, experiment with various scaling matrices D to see what effect they have on the condition number of the matrix DA and the solution given by a library routine for solv- ing the linear system DAx = Db. Be sure to try some fairly skewed scalings, where the magni- tudes of the diagonal entries of D vary widely (the purpose is to simulate a system with badly chosen units). Compare both the relative residuals and the error given by the various scalings. Can you find a scaling that gives very poor accuracy? Is the residual still small in this case
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started