http:/www.rnet.ryerson.ca/~rphan/mth719/w2013
Raymond Phan
Ph.D. Candidate
Department of Electrical & Computer Engineering
Ryerson University
Topics Covered
Introduction
Quick intro to me and contact information
Well be using MATLAB in the course. Yay?
MTH 719 Winter 2013 Final Exam
1. F
2. F
3. F
4. T
5. F
6. T
7. F
8. T
9. F
10. T
11. F
12. F
True of False
1. F
2. F
3. F
4. T
5. F
6. F
7. F
8. T
9. T
10. T
MTH 719 Applied Linear Algebra
Lab 10
Standard Inner Product
Given two vectors x and y in Rn their standard inner product is dened to be the number
T
x y = x1 y1 + x2 y2 + + xn yn . This is also called the dot product, and many authors use the
notation x
MTH 719 Applied Linear Algebra
Lab 8
This week I have published two test functions to evaluate your programs for Assignment 2. There
are two versions of your test function because samll dierences in the way you may have written
your code will eect the res
MTH 719 Applied Linear Algebra
Lab 6 Solutions
Exercise 1
Recalling the theorems we proved in class for calculating matrix norms |A|1 , |A|2 and |A| ,
write Matlab functions of the form N = myNorm(A) that calculate these norms without using
Matlabs norm f
MTH 719 Applied Linear Algebra
Lab 3
Sparse Matrices
Often matrices have well placed zeros, which makes them easier to work withtheoretically at
least. We already know that in principle it takes one or two orders of magnitude less ops to solve a
triangula
MTH 719 Applied Linear Algebra
Lab 12 Solutions
Exercise 1
We should like to design matrices with various properties. Often this is easy to do with diagonal
matrices. However, we wish to create interesting matrices with the desired properties. Let us agre
MTH 719 Applied Linear Algebra
Lab 12
QR factorization
Let A be an m n matrix with rank n. Thus m n and the columns of A are linearly
independent. In this case we may nd the reduced and the full QR-factorization of A.
A reduced QR-factorization is an m n
Mathematics 719 Applied Linear Algebra
Winter 2015
Assignment 1
Due: February 5, 2015 in lab.
Include all written answers, tables, graphs, images and MATLAB code for each problem. Send a separate .m
file for each question as appropriate. Also remember to
Mathematics 719 Applied Linear Algebra
Winter 2015
Assignment 2
Due: March 12, 2015 in lab.
Include all written answers, tables, graphs, images and MATLAB code for each problem. Send a separate .m
file for each question as appropriate. Also remember to se
NOTES
n= # of var
m= # of eqns
n-rank(A) = free var
constant if rank(A)=m
for many and unique
at most one soln rank(A) = n
inconsistant if has no solutions
only for square matrix
AX=B has unique soln iff rank(A) = n
AX=B never has unique iff rank(A) < n
e
Mathematics 719 Applied Linear Algebra
Winter 2015
Assignment 3 DRAFT
Due: April 9, 2015 in lab.
Include all written answers, tables, graphs, images and MATLAB code for each problem. Send a separate .m
file for each question as appropriate. Also remember
function yv = dif_vals ( nd, xd, yd, nv, xv )
%*80
%
% DIF_VALS evaluates a divided difference polynomial at a set of points.
% Parameters:
%
Input, integer ND, the order of the difference table.
%
Input, real XD(ND), the X values of the difference table.
function yi = NewtonInter(x,y,xi)
% Newton interpolation algorithm
% x,y - row-vectors of (n+1) data values (x,y)
% xi - a row-vector of x-values, where interpolation is to be found (could be a
single value)
% yi - a row-vector of interpolated y-values
n
function B = a2b(A,X)
[m, n] = size(A);
[M, N] = size(X);
if n > m
A = A';
end
if N > M
X = X';
end
X = [X; X(length(X) + 1];
Y = (vandermonde(X)*A);
B = divDiffPoly(X',Y');
end
function A = b2a(B,X)
[m, n] = size(B);
[M, N] = size(X);
if n > m
B = B';
end
if N > M
X = X';
end
X = [X; X(length(X) + 1];
Y = dividedDifference(X)*B;
A = vanderPoly(X',Y');
end
n=2
while n<8193
Agen=rand(n);
Aupp=triu(rand(n);
Atri=diag(rand(n,1)+diag(rand(n-1,1),-1)+diag(rand(n-1,1),1);
B=rand(n,1);
%time to solve a general n*n matrix
tic
Xgen=Agen\B;
toc
%time to solve an upper triangular n*n matrix
tic
Xupp=Aupp\B;
toc
%time
MTH 719 Applied Linear Algebra
Lab 10 Solutions
Exercise 1
Let
51
144
A=
111
102
18 16 14
48 50 41
30
52
36
24 54 35
Find A. That is nd all matrices B such that B 2 = A.
The matrix A is diagonalizable, i.e., A = P DP 1 , where P is an invertible matri
Mathematics 719 Applied Linear Algebra
February 19, 2015
Midterm Test 2
You are allowed to use any Matlab resources, including any m-les you have on a USB stick. Otherwise you
may not use any other resources on the computer, including, but not limited to
MTH 719 Applied Linear Algebra
Lab 8 Solutions
Exercise 1
Find a nonsingular matrix P such that P A = EA , where
1 2 3 4
A= 2 4 6 7
1 2 3 6
We may perform gauss elimination on the augmented matrix (A|I) which will lead us to
(EA |P ).
In Matlab
A = [1 2
9.4 Comparison of Procedures for Solving Linear
Systems
There is an old saying that time is money. This is especially true in industry where the cost of solving a linear
system is generally determined by the time it takes for a computer to perform the req