留学生代考 Math 170A, Fall 2022 HOMEWORK #3 due Thursday, Oct 20

Math 170A, Fall 2022 HOMEWORK #3 due Thursday, Oct 20
Homework problems that will be graded (Q1 – Q5, 30pts in total):
(This is the first part of Question 3.1.5 from the textbook.) Consider the following data:
ti 1.0 1.5 2.0 2.5 3.0 yi 1.1 1.2 1.3 1.3 1.4

Copyright By PowCoder代写 加微信 powcoder

Set up the problem of minimization associated with least squares for a best fit line for this data.
1 3 6
 1   −1   2  w1=1,w2= 3,andw3=0 
be vectors in R4. Apply the classical Gram-Schmidt process to find an orthonor-
mal basis for the subspace spanned by w1,w2, and w3.
Q2. Let A = (aij) be a 10 × 10 positive definite matrix with Cholesky factor R = (rij).
Supposethata11 =9,a12 =12,a17 =3,a22 =25,anda27 =7. Solveforr27.
Q3. Let A be an n × n positive definite and symmetric matrix, and X an n × n invertible
matrix. Show that B = XT AX is positive definite and symmetric.
Q4. Show that the function from Rn×n to R given by
||A||max =max|aij| i,j
is not a norm by stating which of the 4 matrix norm conditions it fails to satisfy, and by demonstrating this fact via an example.
Q5. Write MATLAB functions classicalGS.m and modifiedGS.m, implementing the codes given in class to orthogonalize the columns of a matrix A, and output the factors Q and R (Q has orthonormal columns, and R is an upper triangular matrix with positive diagonal).
Once you saved the function scripts, go back to the Command Window and type A = hilb(8);

This makes A a particularly ill-conditioned 8×8 matrix form MATLAB’s matrix library (we will learn the concept of ill-conditioning later in the course).
Then, call
[Q1, ∼] = classicalGS(A); [Q2,∼] = modifiedGS(A);
to get the computed factors Q1 and Q2 with the classical, respectively, modified Gram- Schmidt algorithms.
Finally, let us now test the quality of the Q1 and Q2 factors. At the prompt, type norm(Q1′ ∗ Q1 − eye(8)),
followed by
norm(Q2′ ∗ Q2 − eye(8))
These commands let you know how close to orthogonal the matrices Q1, respectively
What do you notice? Comment on it. Take screenshots of the two codes and the
Command Window, making sure the outputs to the last two lines are visible.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com