General information

Numerical Linear Algebra ENM-TMA265 and GU-MMA600 7.5 credit points

• Answers to the questions at examination are here:
• Answers for examination at 24.10.2013
• Answers for examination at 16.01.2014
• Contents:

Numerical linear algebra problems arise in many different fields of science like computational fluid dynamics, solid mechanics, electrical networks, signal analysis, and optimisation. In this course we study basic linear algebra concepts like matrix algebra, theory for linear systems of equations, spectral theory, and vector- and matrix norms as well as numerical aspects like efficiency, reliability, error analysis and condition numbers. We consider three linear algebra building bricks in computation:

• For solving linear systems of equations we present Gaussian elimination with different pivoting strategies and blocking algorithms for higher performance using BLAS (basic linear algebra subroutines).
• For least-squares problems we study QR-factorisation and singular value decomposition.
• The methods for eigenvalue problems are based on transformation techniques for symmetric and non-symmetric matrices.
For all three building bricks above we discuss numerical algorithms with respect to applicability, reliability, accuracy, and efficiency. By computer exercises the students get experiences in implementation and evaluation of numerical algorithms for linear algebra problems.

By the completion of this course the students will be able to:

• use numerical linear algebra as building bricks in computation.
• make a linear algebra model of problems from the physical reality.
• derive and use the numerical techniques needed for a professional solution of a given linear algebra problem.
• use computer algorithms, programs and software packages to compute solutions to current problems.
• critically analyze and give advice regarding different choices of models, algorithms, and software with respect to efficiency and reliability.
• critically analyze the accuracy of the obtained numerical result and to present it in a visualized way.
The course consists of 36 lecture hours, 20 exercise hours and gives 7.5 points. The course code for engineering schools and students registered at Chalmers is TMA265. The course code for students registered in GU is MMA600.
Latest news
All current and recent information will be placed here. Regarding examination : CTH students should not register for this exam. Only GU students can register for the examination. CTH and GU students will get their personal exam numbers from Observers of this exam. Examination usually is at Maskinhuset at Chalmers:
• Where exactly (in which one room) will be exam You will know at the day of examination: the announcement will be placed at the blackboard close to the entree of Maskinhuset. Notes: GU students can do re-examination but they can not high their scores (for example, from G to VG) but Chalmers students can do re-examination and high scores. Please, follow this site to get exact information when and where will be re-examonation closer to the day of re-examination.
The schedule for the course can be found via the link to webTimeEdit top of the page.
Schedule

Day Time Place Remarks Office Hours
MON 13-15 MVF33 Lecture
WED 13-15 MVF24 Computer exercises
THU 10-12 MVF33 Lecture
FRI 13-15 MVF24 Computer exercises
Link to the system ping pong:
• Ping Pong
• Teachers
Course coordinator: Larisa Beilina, larisa@chalmers.se

Course literature
1. Demmel, Applied Numerical Linear Algebra, SIAM 1997, selled at Cremona. List of Errata for the Textbook
2. PETSc libraries which are a suite of data structures and routines for the scalable (parallel) solution of scientific applications; user manual
Programme
• Homeworks and computer exercises
• Homeworks
• Homework and comp. ex. 1: 20 September
• Homework 2: 27 September
• Homework 3 and comp.ex. 2: 11 October
• Homework 4 and comp.ex. 3,4: 18 October
• Computer Exercises
• Deadline for the last computer exercise: 18 October
• Lecture 1
• Introduction to the course. Read chapter 1 in the textbook yourselves. Introduction to linear algebra and numerical linear algebra. If this looks unfamiliar you should better consult you former literature in linear algebra and refresh your knowledges. We will concentrate on the three building bricks in Numerical Linear Algebra (NLA) : (1) Linear Systems, (2) Overdetermined systems by least squares, and (3) Eigenproblems. The building bricks serve as subproblems also in nonlinear computations by the idea of linearization. Examples: Newtons method for solving nonlinear systems of equations and projection on linearized constraints in nonlinear optimization. We introduced some basic concepts and notations: transpose, inverse, scalar (inner) product, outer product, and LU-factorization.
• Lecture 2
• We will continue with the introduction: submatrices, principal submatrices and leading principal submatrices, eigenvalues and eigenvectors, characteristic equation, spectral radius, diagonalization, spectral theorem. orthoganality, orthogonal complement, orthogonal projection, orthogonal components. Basic theory for linear systems: nullspace, rangespace, rank, consistence, uniqueness. Block matrices. Matrix multiplication by inner and outer products, 2 by 2 block triangular matrices and their inverses, low rank corrections, Sherman-Morrison formula. We will discuss why we need norms: (1) to measure errors, (2) to measure stability, (3) for convergence criteria of iterative methods, and (4) for convergence property for fix point iteration. Definition of Vector norms.
• Lecture 3
• We will discuss computer exercises 1 and 2. Chapter 2: System of linear equations. Gaussian elimination, LU-factorization. Gaussian elimination (and LU factorization) by outer products (elementary transformations). Pivoting, partial and total.
• Lecture 4
• First we have discussed solution of computer labs 1 and 2. We will discuss the need of pivoting. Theorem 2.5 in the book. Different LU factorization algorithms. Complexity of the LU factorization. Error bounds for the solution Ax=y. Roundoff error analysis in LU factorization. Estimating condition numbers. Hagers's algorithm.
• Lecture 5
• First we discussed solution of parts 2 and 3 of comp.ex.1. Componentwise error estimates. Error bound using the residual. Backward analysis. Estimating condition number. Reading adwise regarding perturbation theory and error analysis: You should understand the ideas, not remember details. Iterative refinement. Blocking Algorithms for Higher Performance. LAPACK, BLAS-routines. How to Optimize Matrix Multiplication. Real Symmetric Positive Definite Matrices. Cholesky algorithm.
• Lecture 6
• Chapter 3: Linear least squares problems. Introduction and applications. Linear models and nonlinear models. Statistical models. A comment on other norms than the 2-norm. The normal equations, geometric interpretation. The generalized inverse. QR-factorization for linear least squares problems. A comparision between the normal equations and QR-factorization in a concrete application: Polynomial fitting.
• Lecture 7
• Singular value decomposition (SVD). SVD and the fundamental subspaces. SVD for linear least squares problems. Numerical rank, truncated SVD, condition number, best approximation of a matrix, truncated pseudoinverse, truncated least squares.
• Lecture 8
• Perturbation theory for the least-squares problem. Householder transformations and Givens rotations. QR-factorization by Householder transformation and Givens rotation. Examples of performing Householder transformation for QR decomposition and tridiagonalization of matrix.
• Lecture 9
• Eaxmples of QR-factorization by Householder transformations. Chapter 4, Introduction to spectral theory, eigenvalues, right and left eigenvectors. Similar matrices. Spectral decomposition. Right invariant subspaces. Multiplicity, algebraic and geometric, defective eigenvalues. Canonical forms: Jordan form and Schur form.
• Lecture 10
• We have continued to consider canonical forms: Jordan form and Schur form, real Schur form. Gerschgorin's theorem. Perturbation theory, Bauer-Fike theorem.
• Lecture 11
• Algorithms for the non-symmetric eigenproblem: power method, inverse iteration, invers iteration with shift, QR-iteration on Hessenberg matrices, preservation of Hessenberg form. Regular Matrix Pencils and Weierstrass Canonical Form. Example with damped mass-spring system.
• Lecture 12
• Regular Matrix Pencils and Weierstrass Canonical Form. Example with damped mass-spring system. Application of Jordan and Weierstrass Forms to Differential Equations. Generalized Schur Form for Regular Pencils. Definite Pencils. Singular Matrix Pencils and the Kronecker Canonical Form. Application of Kronecker Form to Differential Equations. Nonlinear Eigenvalue Problems. Chapter 5, Symmetric eigen problems Perturbation theory: Weyl's theorem. Corollary regarding similar result for singular values. Application of Weyl's theorem: Error bounds for eigenvalues computed by a stable method. Courant-Fischer (CF) theorem. Inertia, Sylvester's inertia theorem.
• Lecture 13
• Theorem that the Rayleigh quotient is a good approximation to an eigenvalue. Relative Weyl theorem. Algorithms for the Symmetric eigenproblem: Tridiagonal QR iteration, Rayleigh quitient iteration, Divide-and-conquer algorithm. QR iteration with Wilkinson's shift. Algorithms for symmetric matrices (continuation): bisection and inverse iteration algorithms. Spectrum slicing bisection. Jacobi's method.
• Lecture 14
• Algorithms for the SVD: QR iteration, LR iteration, divide-and-conquer, bisection and inverse iteration, Jacobi's method for the SVD, one-sided Jacobi. Differential equations and eigenvalue problems. The Toda lattice.
Computer labs
Wednesdays 13-15 (except the first week) in computer room MVF24 (Mathematical Sciences in Physics building).
Fridays 13-15 in computer room MVF24 (exept the first week).
Computer labs and Matlab/PETSc excercises will be included in the assignments below. Matlab programs which will be used in computer exercises:
• polyplot.m
• eigscat.m
• qrplt.m
• Templates for computer ex. 2:
• Template for computing of discretized Laplacian
• Template for the main program in PETSC for LU decomposition
• Example of Makefile to be able compile PETSc program at Chalmers
• Template for petsc function which removes zeros from the original matrix. We can work then with resulting matrix without zeros in the same way as with original matrix.

• Reference literature:
• Tobin A. Driscoll, Learning MATLAB, ISBN: 978-0-898716-83-2 (The book is published by SIAM)
Course outline and requirements
The following sections in the textbook will be considered in the book. Chapters 6 and 7 are saved for the another course.
Chapter 1
mainly repetition and brief revision on basic linear algebra.
Chapter 2
1-6, 7 except 2.7.4 and 2.7.5
Chapter 3
1-5
Chapter 4
1-4
Chapter 5
1-4
The following questions in the textbook are recommended:
• Chapter 1: 1, 2, 3, 4, 5, 7, 13.
• Chapter 2: 3, 6, 7, 10, 11, 12, 17, 19.
• Chapter 3: 1, 2, 3(parts 1,2,3), 4, 5, 6, 8, 9, 11, 14, 15, 18.
• Chapter 4: 1, 3, 4, 5, 6, 7, 10, 11, 12, 13.
• Chapter 5: 1, 3 (for symmetric matrix), 6, 7, 14, 15, 16, 17, 18, 22, 27, 28.
To each chapter belong an optional homework assignment and a computer exercise. The homework assignments are similar to the questions in the textbook and such you could expect at the examination. In the computer exercises you will be trained in using different algorithms in numerical linear algebra using MATLAB or PETSc libraries. Either you will use already existing MATLAB and PETSC programs or write your own small MATLAB or PETSc codes. The homework assignments give bonus credit points for the examination. Since the occasions reserved for the computer exercises are without supervision you may put questions on these exercises to me at the lectures. Passed computer exercises will be graded with grades 3, 4, or 5, see examination below.
Assignments

You may work in a group of 2 persons but hand in only one report for the group.

Wednesdays 13-15 (except the first week) in computer room MVF24 (Mathematical Sciences at Physics building) Fridays 13-15 in computer room MVF24 (exept the first week when it is in room MVF25). Hand in a short report of your work before the final exam.

Examination
• To pass this course you should pass the written exam and one of the 4 computer assignments.
• The two compulsory home assignments should be handed in before the final exam.

Written examination
• Final exam is compulsory, written, with a maximum score of 27 points.
• The theory questions will be choosen from the following list
• List of questions
• You should be able to state and explain all definitions and theorems given in the course and also apply them in problem solving.
• Grades are set according to the table below.
- <15 -
3 15-20 G 15-27
4 21-27 VG >28
5 >28
Bring ID and receipt for your student union fee (this is requirement only for Chalmers students. GU students can come on the exam without receipt).

Solutions to the exam will be published at the following link (will be added). You will be notified the result of your exam by email from LADOK (This is done automatically as soon as the exams have been marked an the results are registered.)
The exams will then be kept at the students office in the Mathematical Sciences building.
Check that the number of points and your grade given on the exam and registered in LADOK coincide.
Complaints of the marking should be written and handed in at the office. There is a form you can use, ask the person in the office.).

The following link will tell you all about the examination room rules at Chalmers: Examination room instructions

Examination procedures
In Chalmers Student Portal you can read about when exams are given and what rules apply on exams at Chalmers.
At the link Schedule you can find when exams are given for courses at University of Gothenburg.
At the exam, you should be able to show valid identification.
Before the exam, it is important that you report that you want to take the examination. If you study at Chalmers, you will do this by the Chalmers Student Portal, and if you study at University of Gothenburg, so sign up via GU's Student Portal.

You can see your results in Ladok by logging on to the Student portal.

At the annual examination:
When it is practical a separate review is arranged. The date of the review will be announced here on the course website. Anyone who can not participate in the review may thereafter retrieve and review their exam on Mathematical sciences study expedition, Monday through Friday, from 9:00 to 13:00. Check that you have the right grades and score. Any complaints about the marking must be submitted in writing at the office, where there is a form to fill out.

At re-examination:
Exams are reviewed and picked up at the Mathematical sciences study expedition, Monday through Friday, from 9:00 to 13:00. Any complaints about the marking must be submitted in writing at the office, where there is a form to fill out.
Old exams
Old exams are given here:
• Old exams