Description

Don't use plagiarized sources. Get Your Custom Essay on

Linear Algebra and Coding Questions

Just from $13/Page

MAT 167

HOMEWORK 02

WINTER QUARTER 2020

First of all, carefully reread Lecture Notes 04–06, and Chapter 2 & Section 3.6 in Eldén, You want to especially focus on

vector norms, operator norms and the Least Squares problem.

Problem 01 (25 points) Prove that for a square n × n matrix A,

Ax = b

(1)

has one and only one solution if and only if A is invertible; i.e., that there exists a matrix n × n matrix B such that

AB = I = BA.

(2)

NOTE 01: The statement or theorem is of the form P iff Q, where P is the statement “Equation (1) has a unique solution”

and Q is the statement “The matrix A is invertible”. This means that you must prove two things: 1) P =⇒ Q and 2)

Q =⇒ P.

NOTE 02: For this problem the most mathematically sound (and ‘pleasing’) proof does not involve jumping to any of the

statements in the list of non-singular equivalences, in, for example “LINEAR ALGEBRA IN A NUTSHELL” on the last page

of the textbook for 22A “Introduction to Linear Algebra”, by Gilbert Strang unless you have derived that statement yourself

directly from the fact that equation (1) has a unique solution. See if you can do the problem this way. If you just jump

from one the statements in the list of non-singular equivalences, to another, without deriving the equivalence, you will

receive 25% credit for this problem.

HINT: What is the first step to one of the other non-singular equivalences, which you can take directly from equation (1)?

In other words, find and prove a second non-singular equivalence such that equation (1) is essentially the definition of

this second statement.

Ask if you need help trying to prove the statement in Problem 01 this way.

Problem 02 You do not have to turn in a MATLAB program for this problem. However you do have to report your results

with an explanation (i.e., a brief explanation of what the numbers you have printed are and how you interpret them) in

your PDF file.

(a) (05 points) Define the following matrix

00

10

A = 1014

1012

1003

1009 ,

1006

(3)

in MATLAB. Then, compute the 2-norm by the norm function, and report the result in a long format (16

digits) via

>> format long

>> norm(A)

(b) (05 points) Compute the condition number κ(A) of A with MATLAB

>> cond(A)

(c) (10 points) Approximately how many digits are lost in the solution of the problem in (1) if the matrix A in (1) is

the same as the one in this problem?

© Professor E. G. Puckett

–1–

Revision 3.02

Tue 4th Feb, 2020 at 12:39

MAT 167

HOMEWORK 02

WINTER QUARTER 2020

Problem 03 (25 points) Let A = u vT where u ∈ Rm and v ∈ Rn . Prove that kAk2 = kuk2 kvk2 .

Problem 04 You do have to turn in a well documented MATLAB program for Problem 04. Make sure you follow the

naming convention on the HW 02 Assignments page on CANVAS. You also must report your computational results in

your HW PDF file with an explanation if the question asks for one. Your explanation may be a brief explanation of what

the numbers you have printed are and how you interpret them, but it needs to be long enough to give a complete and

correct interpretations of your computational results.

(a) (05 points) Define the following matrix

1 2

A = 0 2 ,

1 3

in MATLAB. Then, compute the 2-norm by the norm function, and report the result in a long format (16

digits) via

>> format long

>> norm(A)

(b) (05 points) Compute the 2-norm explicitly using the largest eigenvalue of AT A using the eig function, i.e.,

>> sqrt(max(eig(A’*A)))

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) (05 points) Compute the 1-norm, two norm, ∞-norm, and Frobenius norm of A by hand using the formulas

derived in class. Then, using the norm function, compare the MATLAB outputs with your hand-computed

results. You should check how to use the norm function using the help utility:

>> help norm

(d) (05 points)Let’s load the MATLAB data file

>> load CA_01.mat

that you will also use for CA 01. It’s located on CANVAS in the same place as this PDF file. Then, compute first

the coefficient vector by

>> a = U’*x;

Now, compute kxkp and kakp for p = 1, 2, ∞, using the norm function, and report the results. For which value

of p, did you find kxkp = kakp ?

Can you explain this?

(e) (05 points) Now, compute the matrix norms, kUkp , for p = 1, 2, ∞ as well as kUkF using the norm function,

then report the results.

© Professor E. G. Puckett

–2–

Revision 3.02

Tue 4th Feb, 2020 at 12:39

MAT 167

HOMEWORK 02

WINTER QUARTER 2020

Problem 05 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 (0, 3), (1, −2), and (2, 5).

(b) Solve for the least squares approximation from Problem 05 (a).

Problem 06 (50 points) Consider the following matrix.

A=

·

¸

3 1

1 1

(4)

In your answers to the following questions write your answer explicitly in terms of of the entrties of the matrix A or some

equation that you may have simplified involving these four numbers. DO NOT simply write down the definition of the

norm as your answer for parts (a)–(d).

(a) (10 points) Compute kAk1 .

(b) (10 points) Compute kAk∞ .

(c) (10 points) Compute kAk2 .

(d) (10 points) Compute the Frobenius norm kAkF of A.

(e) (10 points) What is the condition number κ (A) of A in the two norm?

© Professor E. G. Puckett

–3–

Revision 3.02

Tue 4th Feb, 2020 at 12:39

574

Six Great Theorems / Linear Algebra in a Nutshell

Six Great Theorems of Linear Algebra

‘

Dimension Theorem All bases for a vector space have the same number of vectors.

$

Counting Theorem Dimension of column space + dimension of nullspace = number of columns.

Rank Theorem Dimension of column space = dimension of row space. This is the rank.

Fundamental Theorem The row space and nullspace of A are orthogonal complements in Rn .

SVD There are orthonormal bases (v’s and u’s for the row and column spaces) so that Av i = σi ui .

Spectral Theorem If AT = A there are orthonormal q’s so that Aqi = λi q i and A = QΛQT .

&

%

LINEAR ALGEBRA IN A NUTSHELL

(( The matrix A is n by n ))

Nonsingular

Singular

A is invertible

The columns are independent

The rows are independent

The determinant is not zero

Ax = 0 has one solution x = 0

Ax = b has one solution x = A−1 b

A has n (nonzero) pivots

A has full rank r = n

The reduced row echelon form is R = I

The column space is all of Rn

The row space is all of Rn

All eigenvalues are nonzero

AT A is symmetric positive definite

A has n (positive) singular values

A is not invertible

The columns are dependent

The rows are dependent

The determinant is zero

Ax = 0 has infinitely many solutions

Ax = b has no solution or infinitely many

A has r

Purchase answer to see full

attachment