Problem 8    Due 2/11/00

In this problem we examine the norms
of vectors and matrices.  First, let's
look at norms of vectors:

a. Write a matlab function which calculates
the manhattan norm, the euclidean norm and
the infinity norm of a vector.  I want you
-not- to use the 'norm' command here.  Apply
this function to the vector:

x = [1, 2, 3, 4] 

and compare the output to the output of the
relevant 'norm' command.

b. Consider the matrix A given by:

A = [1, 2, 3; 4, 5, 6; 7, 8, 10]

I want you to write a script which calculates
the ratio ||Ax|| / ||x|| as a function of the
direction of x.  Note that this direction is
specified by the two angles in spherical 
coordinates.  Plot this ratio as a function of
these angles (use a 3-D plot here, such as 'mesh')
and determine both the minimum and the maximum.
Show that these match the values expected from
the norms of the columns of A and inv(A), and 
calculate the condition number.  Compare this
condition number to those determined by the matlab
functions cond(A) and condest(A).  Why do the
values differ?  (Hint: typing in 'help cond' and
'help condest' will give you some ideas.)