Homework 6  Due on Friday May. 29th, 2015 (due before
12:30 40 points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are available.
Applied linear algebra and numerical analysis
AMATH 352  Spring 2015
Yuqi Wu
Department of Applied Mathematics
May 18th 2015
Oce hour this week
Oce hour on Wednesday May 20th will be moved to 2:00 to
4:00 pm Tuesday May 19th.
Solution of linear system
Homework 7  Due on Wednesday June 3rd, 2015 (due before
12:30 40 points)
The programming part is due on 12:30 pm Friday June 5th.
The rst two exercises should be submitted online via Dropbox. Instructions of submission are
on the Catalyst webpage. For Ex
Homework 5  Due on Wednesday May. 20th, 2015 (due before
12:30 40 points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are availabl
AMATH 352 HW4 SOLUTION
SPRING 2015
Homework is worth 40 points (16 for programming part, 24 for written part).
Problems 6, 8, and 9 were graded.
Problem 1
% Hw4 ex1
% implement Jacobi and GS method
% Yuqi Wu
clear all
% input matrix A, vector b, and the
Homework 4  Due on Friday May 1st, 2015 (due before 12:30
40 points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are available. A
AMATH 352 HW5 SOLUTION
SPRING 2015
Homework is worth 40 points (16 for programming part, 24 for written part).
Problems 3, 7, and 8 were graded.
Problem 1
% Hw5 ex1
% Yuqi Wu
% QR algorithms
clear all;
format long
% Matrix A
myEps = 1.0e06;
A = diag(ones
Homework 3  Due on Apr. 24th , 2015 (due before 12:30 40
points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are available. After
Homework 2  Due on Apr. 17th, 2015 (due before 12:30 40
points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are available. After y
AMATH 352 HW3 SOLUTION
SPRING 2015
Homework is worth 40 points (16 for programming part, 24 for written part).
Problems 5, 6, and 10 were graded.
Problem 1
% Homework 3, exercise 1
%
% implement Richardson
%
% Yuqi Wu
clear all
% input matrix A, vector b,
Homework 1  Due on Apr. 10th, 2015 (due before 12:30 40
points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are available. After y
Name:
Student number:
QUIZ 1
1. True of False
(a) x =
x1
x2
R2 , is the function x = x1  a norm?
ANS: False.
Because x = 0 does not guarantee that x = 0. Counter example,
0
2
=
0
0
0
2
= 0, but
.
(b) Is the set S = x R2  x
1
=1
a linear space?
ANS
Name:
Student number:
QUIZ 2
1. True of False
(a) If S1 and S2 are subspaces of Rn of the same dimension, then S1 = S2 .
1
0
ANS: False. Counter example span
= span
0
1
(b) If S = span(u1 , u2 , u1 + u2 ), then dim(S) 2.
ANS: True. Because those three vec
Applied linear algebra and numerical analysis
AMATH 352  Spring 2015
Yuqi Wu
Department of Applied Mathematics
May 20th 2015
LU Factorization
Denition
A matrix A is regular if and only if it can be factored
A = LU
where L is lowertriangular with diagona
Applied linear algebra and numerical analysis
AMATH 352  Spring 2015
Yuqi Wu
Department of Applied Mathematics
May 22nd 2015
Homework 6
Homework 6 will be posted this afternoon
Due Friday May 29th in class
Other Factorizations
The Crout factorization
Applied linear algebra and numerical analysis
AMATH 352  Spring 2015
Yuqi Wu
Department of Applied Mathematics
May 27th 2015
Partial Pivoting
Denition
LU factorization with partial pivoting takes the form
PA = LU
where P is a permutation matrix, L is a l
Applied linear algebra and numerical analysis
AMATH 352  Spring 2015
Yuqi Wu
Department of Applied Mathematics
May 29th 2015
Homework 7
Homework 7 will be posted this afternoon
Due Wednesday June 3rd in class
Final
Final is scheduled on Friday June 5t
Applied linear algebra and numerical analysis
AMATH 352  Spring 2015
Yuqi Wu
Department of Applied Mathematics
June 1st 2015
Homework 7
Homework 7 will be posted this afternoon
Writtne part Due Wednesday June 3rd in class
Programming part Due Friday J
AMATH 352  Midterm Exam
Feb. 14th, 2014
Name:
Signature:
Show all your work! Details your answers. Closed book, no notes, no calculator, no phone.
1. (15 points) True or False, no explanation is required
(a) For any matrix A Rmn , the induced and 1 norms
(b) TriLL:
CC) False
(cJ
ct
FxeN(4)
1
Hr
A
t
(cc
A
k
V
cm
p
4
*
A
N
N
S
c_
F
_4
N
A
A
IN
pF
1
>4
:3
v
V
\
(4
cm
4
IL
3


N
44
4
cm
.
t
F
4
A
jf\
5
N
4
A
jiA
4
I
N
4
A.
t
ci?
V
4
c4C
Y
F
VI
)%(
r.
V
C,
3
C
3
4
C
8
:4
44
t

9.:
33.
C
=:
5<
_
_
_
_
_
_
_
_
AMATH 352

Final Exam
December 12th 2013
Name:
Signature:
Show all your work! I)etail
work! (losid book, no
your
notes. 110
o:alculator.
) I) points) True or false. iio flxplaliatioll is required
(a) For nov matrix A
A)
(b) [f A
c IR
>
i
Name:
Student number:
QUIZ 3
1. True of False
(a) If A Rmn and rank(A) < n, then the linear system Ax = 0 has innity many
solutions.
ANS: True. Because rank(A) < n, then dim(N (A) >= 1. Therefore, the homogenous
system has innity many solution.
(b) For an
AMATH 352  Midterm Exam
May. 8th, 2015
Name:
Signature:
Show all your work! Details your answers. Closed book, no notes, no calculator, no phone.
1. (15 points) True or False, no explanation is required
(a) For any A, B Rnn , AB
matrix.
2
A
2
B 2 . Here
%Hw6 ex1
% Yuqi Wu
clear all
% matrix A
n=100;
A = toeplitz([3 2 1 zeros(1,n3)],[3,2,1,zeros(1,n3)]);
% LU factorization
U = A; L = eye(n,n);
for k = 1: (n1)
for i= k+1:(min(k+2,n)
L(i,k) = U(i,k)/U(k,k);
for j = k:(min(k+2,n)
U(i,j) = U(i,j)  L(i,k
Problem 3
ti
yi
1
1/5
3/4
4/13
1/2
1/2
(a) Find the straight line y = + (t
1/4
4/5
0
1
1/4
4/5
1/2
1/2
3/4
4/13
1
1/5
1) that best ts the data.
First we can set up the problem as a system of linear equations Ax = y, where A is a 9 2
matrix. Here the r
%Hw6 ex1
% LU factorization of tridiagonal matrix,
clear all
% matrix A
n=100;
A = toeplitz([3 2 1 zeros(1,n3)],[3,2,1,zeros(1,n3)]);
% LU factorization
U = A;
L = eye(n,n);
for k = 1: n1
% fill your code here
end
save L1.dat L ascii
save U1.dat U
Homework 1 solution
January 16, 2014
1. MATLAB problem
% Hw1 ex1
% Yuqi Wu
clear all;
% part a
F10 = 0.0;
for n=1:10
F10 = F10 + 1.0/(n+2)*(n+4);
end
save A1.dat F10 ascii
F100 = 0.0;
for n=1:100
F100 = F100 + 1.0/(n+2)*(n+4);
end save A2.dat F100 ascii
% Hw4 ex1
% implement a GS method
% Yuqi Wu
clear all
% input matrix A, vector b, and the stopping tolerance tol
A = [12 3 5 2; 1 6 3 1; 3 7 13 1; 1 2 1 7];
b = [ 2;3;10;11];
tol = 1.e8;
% set x0
n = size(A,1);
x = zeros(n,1);
countR=0;
for k=0:10