EE636: Matrix Computations (Spring 2024)

Instructor: Dr. Debraj Chakraborty

Email: dc@ ee.iitb.ac.in

Office: New Office Complex, 1st floor, EE

Lecture Hours: Slot 1 (EEG 401 Collaborative Classroom)

Website: http://www.ee.iitb.ac.in/~dc/EE636

 

Google Classroom: Join using https://classroom.google.com/c/NjQ2NjgzMjg4NTUz?cjc=rmlym7d

Github page for course related code: https://github.com/d-chakraborty/EE636_2024

 

TAs: Rishabh Singh (214070024 [AT] iitb.ac.in) and Diptanu Debnath (diptanu [AT] ee.iitb.ac.in)

 

Prerequisites:

·       Any linear algebra course equivalent to EE635. Familiarity with MATLAB/Python. Some experience with the Julia Programming language (https://julialang.org) is desired but not required.

·       Each student will need to bring a laptop with a working Julia installation, including the Julia software, editors and notebook support, to every class.

Syllabus

1.     Gaussian elimination:

·       Basic Gaussian elimination without pivoting, LU decomposition,

·       Floating Point Arithmetic, Roundoff errors

·       Gaussian elimination and LU factorization with pivoting.

·       Positive definite matrices, Cholesky factorization.

2.     Sensitivity of Linear Systems:

·        Condition number, residuals, Backward Stability

·        Forward and Backward error analysis

3.     QR decomposition:

·        Orthogonal matrices, rotators and reflectors.

·        Gram-Schmidt process

·        Solution of the least squares problem

·        Updating the QR decomposition.

4.     Eigenvalues and eigenvectors:

·        The power method, Unitary similarity transform, Schur’s theorem.

·        normal matrices, spectral theorem of normal matrices.

·        Hessenberg and tri-diagonal matrices, reduction to these forms.

·        The QR algorithm.

5.     SVD: Introduction. Algorithm. Applications. Sensitivity.

6.     Iterative methods for solving linear systems: if time permits

Text Book

No Text Book is prescribed. Lecture Notes will be provided.

Reference Books

1.     Eric Darve and Mary Wootters, Numerical linear algebra with Julia. SIAM; 2021 Sep 2.

·        Codes for the book: https://github.com/EricDarve/numerical_linear_algebra

2.     Watkins, David S. Fundamentals of matrix computations. John Wiley & Sons, 2004.

3.     Golub, Gene H., and Charles F. Van Loan. Matrix computations. JHU press, 2013.

 

Evaluation:

In-class coding assignments (10%), Home Assignments (20%), Mid-Sem (30%), End-Sem (40%).

Lecture Notes and Slides

1.      Linear Algebra Recap

2.      LU Factorization

3.      Floating Point Arithmetic, Errors and Sensitivity

4.      QR Factorization

5.      Least Squares

6.      Eigenvalues and Eigenvectors – part 1

7.      Eigenvalues and Eigenvectors – part 2

8.      QR Iteration Code explained

9.      SVD

Homework Assignments

Please refer to the EE636 google classroom

Coding Assignments

Please refer to the EE636 google classroom

Julia Installation Instructions

Many sources available on the internet. We provide a basic outline for beginners.

For windows users:

Installation of Anaconda

1.    Visit the following link to download anaconda

https://www.anaconda.com/download

2.    Install the version of Anaconda which you downloaded, following the instructions on the download page.

Installation of Julia

1.    Go to the following link and click on download. You should see the following window as shown in the following figure

https://julialang.org/downloads/

2.    Open the command prompt and enter the following

winget install julia -s msstore

It will take few seconds and Julia will be installed successfully.

 

 

3.    Now type julia in regular promt mode as shown below

C:\Users\Rishabh K Singh>julia

Make sure that you get the following as shown in below figure. It shows that Julia is installed successfully.

 

3.    Once at the Julia prompt julia>, type the character ] . This will enter the package management mode of Julia. Then type:

(@v1.10) pkg> add IJulia

This will install the IJulia package. The installation needs to done only once.

4.    You can return to the regular prompt mode using backspace key. Run

julia> using IJulia

julia> notebook()

It will take few minutes and Julia will get linked to Jupyter notebook.

5.    Open the Jupyter notebook and you should be able see Julia 1.10.0 as shown in red box.

 

Installation of Julia (For Linux users)

 

1. Open https://julialang.org/ >> Download

or directly open https://julialang.org/downloads/

 

 

 

 

 

 

 

 

 

 

 

 

 

2.  Copy:-  curl -fsSL https://install.julialang.org | sh

 and paste it in Terminal and press ENTER.  

3.  After successful installation type julia in Terminal and you will get

 

 

 

 

 

 

 

 

 

 

Installation of Julia Notebook:

1.  Open https://jupyter.org/install

 

 

 

 

 

 

 

 

 

 

 

 

2.  Open Terminal and run:   sudo apt update and sudo apt upgrade >>Enter >> give your password >> then Enter.

After this, run:  pip install notebook >> Enter

Then run :  jupyter notebook >> Enter

This will open Jupyter Notebook in your usual browser.

 

Adding Julia Packages such as IJulia:

 

1. The julia commend in Terminal start the Julia program. Once get the Julia prompt julia>, type the character ] .

Eg: Open Terminal>> julia >> Enter >>]  

Then type:

(@v1.10) pkg> add IJulia  >> Enter

This will install the IJulia package. Then using Backspace key, you can return to the regular prompt.

 

2. Inside the Julia console write:

 

julia> using IJulia

julia> notebook()

This will open Jupyter Notebook in your usual browser with Julia Kernel.

 

 

 

 

 

 

 

 

In the Jupyter Notebook,  

in right side >> click “new” >> the kernel will be shown

 

 

 

 

 

 

 

 

 

Select  “Julia 1.10.0”. You will get an untitled Jupiter window.