Question: Conditioning and relative error In this question, we will be looking at the condition number for performing a matrix vector multiplication y=Ax. Note that in

Conditioning and relative error In this question, we will be looking at the condition number for performing a matrix vector multiplication y=Ax. Note that in this problem, x is the input and y is the output. How much error should we expect in the output y for a known error in the input x ? We will assume all norms and condition numbers refer to the 2-norm. You are given a 5050 matrix A, the true vector x (xt rue) and an approximate vector x^ (xhat). 1. Compute the perturbation in the input x=xx^ and store it in err__xhat. 2. Compute the relative error for the input xx and store it in rel_err__hat. 3. Compute the relative error for the output yy and store it in rel_err_Axhat. Recall that y=Ax 4. Compute the condition number of A and store it in cond_A (you may use numpy. linalg. cond). 5. Suppose you only had the condition number of the matrix, and the relative error in the input (items 2 and 4 above). Determine the upper bound for relative error of the output. Store this upper bound in the variable bound_rel_err_Axhat. Verify that your result in item 3 satisfies this bound. The setup code gives the following variables: Your code snippet should define the following variables
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
