$35.00
Description
First of all, carefully reread Chapter 2, especially the sections on vector norms and operator norms.
Problem 01 Using MATLAB, do the following procedure.
(a) Download the data file
HW_02.mat
from Canvas to your working directory, and load it into your MATLAB session. Check what variables (i.e., arrays) are defined in this data file by running
>> whos
(b) Plot the data by typing
>> plot(x,y); grid;
(c) Create the Vandermonde matrix for polynomials of degree 1; (i.e., lines) by typing
>> A=[x.^0 x.^1];
(d) Compute the least squares line over the given data by typing
>> sol = inv(A’_{*}A)_{*}A’_{*}y;
Then, overlay the least squares line over the current plot by typing
>> hold on; plot(x, sol(1)+sol(2)_{*}x, ’–’);
Create the title and axis labels by typing
>> title(’Least Squares Linear Fit’); xlabel(’x’); ylabel(’y’);
Print out this plot and include a the PDF copy of the plot in you HW PDF file also with a carefully written description of how you obtained the plot and what it is.
(e) Finally, create a MATLAB file HW_02.m from the above commands with appropriate comments. Use the MATLAB listing in the Solutions to HW_01 as an example of good commenting practice.
(f) Write a detailed explanation of what this MATLAB program does and put it in your PDF file.
Problem 02 Prove that for a square matrix A, null(A) ˘ {0} implies A is invertible.
Problem 03 Find the minimum value of kxk_{1} subject to kxk_{2} ˘ 1 in R^{2}. Which x achieves such minimum? [ Hint: set x ˘ [cos µ, sin µ]^{T}, 0 • µ • 2…. ]
© Professor E. G. Puckett – 1 – Revision 1.04 Fri 27^{th} Apr, 2018 at 14:43
1•i •m
MAT 167–001 HOMEWORK 02
Problem 04 Let k ¢ k denote any norm on R^{m} and also the induced matrix norm on R^{m}^{£}^{m} . Let ‰(A) be the spectral radius
def
of A; i.e., ‰(A) ˘ max j‚_{i} (A)j, where ‚_{i} (A) is the i th eigenvalue of A. Prove ‰(A) • kAk.
Problem 05 Let A ˘ uv^{T} where u 2 R^{m} and v 2 R^{n} . Prove kAk_{2} ˘ kuk_{2}kvk_{2}.
Problem 06 (a) Define the following matrix
2_{1 2}3
A˘40 25,
1 3
in MATLAB. Then, compute the 2norm by the norm function, and report the result in a long format (16 digits) via

format long

norm(A)
(b) Compute the 2norm explicitly using the largest eigenvalue of A^{T} A using the eig function, i.e.,
>> sqrt(max(eig(A’_{*}A)))
Then, compare the result with that of Part (a). What is the relative error between the norm computed in Part (a) and that in Part (b)?
(c) Compute the 1norm, 1norm, and Frobenius norm of A by hand using the formulas derived in the class. Then, using the norm function, compare the MATLAB outputs with your handcomputed results. You should check how to use the norm function using the help utility:
>> help norm
(d) ] Let’s load the MATLAB data file
>> load HW_01.mat
that you used for HW 01 again. It’s located on both Piazza and Canvas Then, compute first the coefficient vector by
>> a = U’_{*}x;
Now, compute kxk_{p} and kak_{p} , p ˘ 1, 2, 1, using the norm function, and report the results. Which value of p, you got kxk_{p} ˘ kak_{p} ?
(e) Now, compute the matrix norms, kUk_{p} , p ˘ 1, 2, 1 as well as kUk_{F} using the norm function, then report the results.
Problem 07 Linear Least Squares: You are meant to do this problem by hand calculation as you would on a test.
(a) Set up the normal equation for the linear least squares approximation for the data (1, ¡1), (2, 3), and (3, 1).
MAT 167–001 HOMEWORK 02 SPRING QUARTER 2018
(b) Solve for the least squares approximation from Problem 07 (a).
© Professor E. G. Puckett – 3 – Revision 1.04 Fri 27^{th} Apr, 2018 at 14:43