Applied Linear Algebra (Winter 2012)
Class Time/Place: MWF 3:10pm-4:00pm, STORER 1344
Instructor: Jesus A. De Loera
Office: 3228 Math. Sci. Building
Email: deloera@math.ucdavis.edu
Office Hours: Monday 1-3pm, Wednesday 12-2pm (or by appointment), but
please also use the online virtual office hours!! via SMARTSITE discussion forum
TA: Ms. Joohee Hong
Office: 2123 Math. Sci. Building
Email: jhong@math.ucdavis.edu
Office Hours: Thursday 2-4pm.
Course Description:
This course aims to help you develop a solid useful
understanding of linear algebra, in particular focusing
on applied and computational aspects of the subject. Linear
algebra is truly important because linear equations
and eigenvalue problems appear everywhere in engineering and science.
Textbook: Gilbert Strang: Linear Algebra and Its Applications, 4th Ed., Brooks/Cole, 2006.
Here are the key topics:
- Quick Review of Vector Spaces, Subspaces, Linear Independence,
Bases, Rank, Linear Transformations, Determinants.
- LU decomposition and Linear system solving.
- Norms, Inner Products, Orthogonal Bases, Gram-Schmidt
Orthogonalization, QR Factorization
- Projections, Least Squares Problems, Data Fitting/Regression
- Eigenvalues, Eigenvectors, Diagonalization, Positive Definite
Matrices
- Range-Nullspace Decomposition, Singular Value Decomposition
- Applications to Statistics & Data Analysis,
Web Search Engines & Network problems, Information processing (signal & images, error-correcting codes), others.
Prerequisite and Expectations
- MAT 22A or MAT67 (i.e., practical understanding of elementary linear algebra).
- Basic knowledge of programming is required. Some experience
in MATLAB is preferable, but MATLAB is very easy to learn. If you do not
know how to use MATLAB, then you need to self-study using the MATLAB
Primer and other material listed below.
- Formal attendance will not be taken. However, whether you are
able to attend class or not, you are responsible for
all the material presented in class.
-
This is a 4 unit course! You are expected to work
3 hours at home for each hour of lecture. In other words,
expect to have 10 hours of homework each week.
Grading:
The grades will be calculated using the
average and standard deviation of the class. 100 points are possible
which will be divided as follows: Homeworks 30 points (8 homeworks of
5 points each, with the lowest two scores dropped), two midterm exams
worth 30 points each (in class, February 6 and March 19) with the
lowest score dropped, the Final Project 35 points (Due Saturday, March 24
at 6:00 pm) and 5 points awarded for participation in class, office hours,
or on the online discussion forum. Some important rules will be followed:
- It is very important that you think and discuss the material, that
is why I will give 1/2 point for each question and each valuable contribution to the discussion. This can be done online, in our forum
at SMARTSITE, in class or during office hours.
- The SMARTSITE online forum is a great way for all of us to work,
collaborate, and discuss what you are learning. If you have to enter
formulas, you can most likely paste them in from MATLAB OR you can
follow MATLAB's code notation to express equations. I will check the
online discussion every morning and evening. Students should comment
or make suggestions if you see how to help some else figure the
problem, but DO NOT POST STRAIGHT SOLUTIONS! Give hints not
answers!
- The homework and other material will be posted at bottom of the course
web site. Homework is due at the beginning of class on
the day the assignment is due. LATE HOMEWORK WILL NOT BE ACCEPTED.
- Your work is not being graded solely from the final answer,
I expect you to write neatly, justify your reasoning and
show all missing details.
- Each time, a subset of three homework problems will be graded.
You will loose a point automatically if you did not work out all problems.
The lowest two homework scores will be dropped when assessing your grade.
- I will assign some HW problems that require you to use MATLAB.
- I will mostly assign even problems, but to motivate you to do more
exercises, I plan to include 2 odd problems in the midterm.
- All exams are closed book. No calculators or cell phones allowed.
- There will be NO MAKE-UP EXAMS but I will drop the lowest score.
- The final project should be done in a team of 2 or 3 students. The
project will include writing MATLAB code to investigate one of the application
topics presented in class (see first lecture). More details and rules will
be stated after the first midterm.
SOFTWARE, VIDEO LECTURES, and other RESOURCES:
This class uses MATLAB. You have several options for accessing it:
- Create an account at the Math Department. Visit
http://www.math.ucdavis.edu/comp/class-accts
and follow the instructions. It is important to create your account before you
come to the Lab for the first time. You can then work either at the
Undergraduate Computer Lab (2118 Math. Sci. Bldg.) or from any other lab in the
campus or even from your home PC by remotely connecting to one of the
departmental servers, such as [point,cosine,sine,tangent].math.ucdavis.edu. The
lab is open 9am-5pm on weekdays.
- Use your own account at your own department if your department
has the MATLAB license. This is the case for most of the engineering
departments.
- Buy a Student Version of MATLAB at UCD Bookstore (costs about
$100).
- Install Octave system on your own PC, which is free
software and emulates MATLAB. Caution: Most likely you can do all
the lab exercises, but I have not tested all the exercises yet.
Visit the official web site of Octave at
http://www.octave.org for downloading and installing information.
For those who have never used MATLAB before or need to brush up their MATLAB
knowledge, please take a look at the following highly useful MATLAB
primers and tutorials.
VIDEO LECTURES, There are many useful resources in the
internet! More than I can mention here! In particular, our textbook was
written by world expert Prof. Gilbert Strang. Prof. Strang has
posted
his 1999 video lectures of another his linear algebra
books. They are for different books but they have large useful overlap so I
require you watch them before my own lecture.
During my lecture I plan to (1) go very quickly over the key points
again, (2) add material (missing proofs, tricky details, interesting
examples, correct mistakes, etc). More important (3) I plan to
actively engage you to see how YOU are thinking about the topic! I
will call on you, discuss your thoughts. Please be ready, I will call
on you in class. Math is not an spectator sport!! You learn by doing it!
HOMEWORKS & HANDOUTS
Diagnostic EXAM
Please solve on your own as much as you can of the diagnostic test .
Solutions are due on Tuesday January 10th in my office by 10am. This exam has no grade value,
but it will help me determine what you know already and it will help you remember it!!!
The computer slides announcing themes for final projects can be downloaded
here .
-
Homework 1, due January 18th:
READ: Chapter 1, sections 1-6.
WATCH: Strang lectures 1-4.
Section 1.4: 10,18,38.
Section 1.5: 10,14,24,38.
Section 1.6: 2,10,16,38,56.
-
Homework 2, due Jan 27:
READ: Chapter 1, section 7. Chapter 2, sections 1,2.
WATCH: Strang lectures 6,7,8.
Section 1.7: 2,7,8 (please use MATLAB, you will submit your code online).
Section 2.1: 2,4,14,22,28
Section 2.2: 2,4,6,12,34,44,48
Solve problems 2.2, 2.4, 2.7 in chapter 2 of Moler's MATLAB book
The slides I used for Chapter 2 are here.
-
Homework 3, due Feb 6rd:
READ: Chapter 2, section 7. sections 3,4,5,6.
WATCH: Strang lectures 9,10.
Section 2.3: 2,10,14,20,28,34
Section 2.4: 2,4,10,16,18,32,38
Section 2.6: 4,6,18,22,34,50
_______________MIDTERM 1, February 6th, will cover up to here___________________
IMPORTANT ANNOUNCEMENT: Details for final project are available
here
-
Homework 4, due Feb 15:
READ: Chapter 3, sections 1-3.
WATCH: Strang lectures 14,15,16.
Section 3.1: 22,34,38,44
Section 3.2: 10,12,16,22
Section 3.3: 1,3,6,8
-
Homework 5, due Feb. 24:
READ: Chapter 3, sections 1-3.
WATCH: Strang lectures 17,24,26.
Section 3.3: 14,18,25,27,41.
Section 3.4: 2,6,14,16,22,28,31,32.
Section 3.5: 1, 4, 11, 12.
MATLAB exercises (You are welcome to use MATLAB to check/guide
your answers for all other exercises):
(A) Problem 5.11(a,b) in Chapter 5 of Moler's book. The data set
is available
in there too together with all data for the book.
(B) Using MATLAB, do the following procedure:
- Download the data file to your directory and load it into your
MATLAB session by: >> load hw7;
- Check what variables (i.e., arrays) are defined in this data
file by running: >> whos
- Plot the data by: >>
plot(x,y); grid;
- Find the least squares line that best fits the
given data by minimizing ||Ax-y||, and call the solution of the
least squares problem x_line.
A simple way to construct the matrix A is by:
>> A=[x.^0 x.^1];
- Now find the polynomial of degree 2 that
best fits the given data by minimizing ||Ax-y||, and call the solution of
the least squares problem x_pol.
A simple way to construct the matrix A in this
case is by:
>> A=[x.^0 x.^1 x.^2];
- Overlay the least squares line over the current plot by:
>>
hold on;
plot(x, x_line(1)+x_line(2)*x, 'r--');
- Overlay the least squares polynomial over the current plot by:
>>
plot(x, x_pol(1)+x_pol(2)*x+x_pol(3)*x.^2, 'g-');
- Put title, axis labels by: >>
title('Least squares fit'); xlabel('x');
ylabel('y');
- Print out this plot and submit the hardcopy of the plot.
The slides I used for Chapter 3 are here!!
-
Homework 6, due March 2:
READ: Chapter 4. Chapter 5 sections 1,2.
WATCH: Strang lectures 18-20.
Chapter 4 Review Exercises 1,4,8,11
Section 5.1: 5,6,9,14,24,29,32,36,38.
Section 5.2: 2,4,7,10,32,38.
- Do problem 10.2 (a) of Moler's MATLAB book.
-
Homework 7, due March 9:
READ: Chapter 5 section 3,5,6 and Chapter 6 sections 1,2,3.
WATCH: Strang lectures 21,22,25.
Section 5.3: 4, 12, 14.
Section 5.5: 8,26,34,50.
Section 6.2: 2,4,14,19,20,24.
The slides I used for Chapters 4,5,6
In case you are interested, here I provide the LaTEX code for those slides.
-
Homework 8, due March 19:
READ: Chapter 6. sections 1,2,3.
WATCH: Strang lectures 27,28,29,33.
Section 6.2: 26,27,28,31,32.
Section 6.3: 1,2,10,12,15.
Using MATLAB, do the following exercise:
- Load the image called mandrill.mat, via:
>> load
mandrill;
This loads a matrix X containing a face of mandrill, and a map containing
the colormap of the image. If you cannot load this data in your MATLAB, then
download this data from this
link. Then, do the load
command
again. Display this matrix on your screen by:
>>
image(X); colormap(map)
and print it out.
-
Compute the SVD of this mandrill image and plot the distribution
of its singular values on your screen (Note that the MATLAB
svd function returns three matrices U, S, V for a given input matrix. So, the singular values are plotted by:
>>
plot(diag(S));
Then print this figure.
- Let σj, uj, vj be a singular value, the left and
right singular vectors of the mandrill image, respectively.
In other words, they are S(j,j), U(:,j), V(:,j) of the SVD of X
in MATLAB. Let us
define the rank k
approximation
of the image x
- For k=1,6,11,31, display the residuals, i.e., x-xk,
fit them in one page, and print them.
- Submit those three printouts as HW (the original image,
the singular value plot, and the plot with the SVD-reconstructed images).