You are on page 1of 2

DS 284: Numerical Linear Algebra

Homework 1
1. Given A R10002 , B R21000 and C R10001 , write down the number of real number multiplications needed to compute
the product ABC by the two procedures indicated below:
A(BC)
2. Prove that the eigenvalues of a real symmetric matrix are real.
3. If U RN N satisfies U T U = I, then U is called an orthonormal/unitary matrix.
Prove that the eigenvalues of U lie on the unit circle in the complex plane.
Prove that kxk2 = kbk2 .
Is kxk1 = kbk1 ?
4. Prove the following properties of a lower-triangular matrix:
Product of two lower triangular matrix is again lower triangular

EM
bk

Inverse of a lower-triangular matrix is lower triangular

As

Write down the solution to the linear system U x = b.

rn
^

(AB)C

The eigenvalues of a lower-triangular matrix are its diagonal entries


5. Prove the Cauchy-Schwarz inequality: If x, y Rn , we then have
T
x y kxk kyk
2
2
6. Norm equivalence: Let x Rn

kxk2 kxk1 n kxk2

kxk kxk2 n kxk

vr
Am
^ a

7. C++ programming question: Given a matrix A Rmn , find kAk1 .

An incomplete code in the file named HW1 P7.cpp has been provided. Add your code to the above file. Make sure all the
relevant checks are done on the input. For instance, you need to check if that rows are positive integers, the entires are indeed
real numbers and so on. If there is any error in the input, your output should be INPUT ERROR.
FileName: Do not change the name of your .cpp file; It should be HW1 P7.cpp.
Input Format:
The first line contains the number of rows (positive integer) in the matrix.
The second line contains the number of columns (positive integer) in the matrix.
The third line onwards contains the entries (real number) of the matrix row-wise.
Output Format:
Print a single number as the kAk1 .

Ef

Sample Input 1:
2
2.71
Sample Output 1:
INPUT ERROR
Sample Input 2:
3.14
Sample Output 2:
INPUT ERROR
Sample Input 3:
2
3
e
Sample Output 3:
INPUT ERROR

DS 284: Numerical Linear Algebra


Homework 1

Ef

vr
Am
^ a

EM
bk

As

rn
^

Sample Input 4:
2
3
3.0
5.0
6.25
7
1.98
0.31
Sample Output 4:
10.0

You might also like