Question

1. Matrix condition numbers, [2+1+2pt+2pt (extra credit)] Let us explore matrix norms and condition numbers. (a) For the following matrix given by calculate ||A||1, ||A||2, ||A||0, as well as the

condition numbers for each norm by hand. Is A well or poorly conditioned? (b) Recall the formulas from Theorems 2.7 and 2.8 in the text book. If you assume that taking the absolute value and determining the maximum does not contribute to the overall computational cost, how many flops (floating point operations) are needed to calculate ||A||1 and \|A\|_{\infty} \text { for } A \in \mathbf{R}^{n \times n} ? By what factor will the calculation time increase when you double the matrix size? (c) Now implement a simple code that calculates || A||1 and ||A||. for a matrix of any size n > 1. Try to do this without using loops?! Using system sizes of n1 =2nk, k = 1,... , 7, determine how long your code takes to calculate || A||1 and || A||. for a matrix A E R"i×ni with random entries and report the results. Can you confirm the estimate from (b)?100, nk+1 = 4(d) (extra credit) MATLAB has the build-in function norm to calculate matrix norms. Calculate for the system sizes in (c) ||A||1 and ||A||oo. using both your implementation and MATLAB's norm function, determine for each n; how long each code takes and plot the results in one graph. On average, by what factor is MATLAB's implementation faster than yours? Please also hand in your code.

Fig: 1

Fig: 2

Fig: 3

Fig: 4

Fig: 5

Fig: 6

Fig: 7

Fig: 8

Fig: 9

Fig: 10