Starting from:

$30

MATH366- Homework 3 Solved

Problem 1: A “matrix norm” is a way of assigning a numerical measurement to a matrix. If A ∈ Rn×m is a matrix the four commonly used norms are denoted by,

||A||1,||A||∞,||A||2,||A||F
There are different types of matrix norms, each useful in their own context.

Let A ∈ Rn×m. The “Frobenius norm” is defined as follows,

 

(square root of the sum of squares, which is how you compute the norm of a vector in multivariable calculus). Sometimes the Frobenius norm is also called the Euclidean norm and can also be denoted by ||A||E.

The “1-norm” is defined as,

 !

(in other words, add up all the columns in absolute value, and out of all those column sums, pick the largest number).

The “∞-norm” is defined as,

 !

(in other words, add up all the numbers in the rows with absolute value, and out of all those row sums, pick the largest number).

1

Finally, the 2-norm is the most difficult to define,

||A||2 = max(σ1,σ2,...,σm)

where the σk are the “singular values” of A, i.e.

 σk = pλk(AtA)

Simply put, calculate the eigenvalues of AtA, the largest of the radicals of the eigenvalues is the 2-norm of the matrix.

Create a code in R called:

mat.norm(A,type=c(‘‘one’’,‘‘inf’’,‘‘F’’,‘‘2’’))

which calculates the matrix norm depending on which type of norm you want to use.

Problem 2: Another method for approximating roots is called Newton’s method. Suppose f() is some function for which we wish to find a root. Let g() denote the derivative of f(). Newton’s method proceeds by first making an initial guess x0 (a “guess” is just an arbitrary starting value). We then construct the sequence,

(x0,x1,x2,...,xn)

defined by the rule that,

 

The last number in this sequence, xn, will be a good approximation for the root.

Write a code in R called newtons.method(f,g,x0,n) which calculates the last term in the sequence of approximations.

More products