# Implementing SVD using Lanczos algorithm

**Description:**
The main objective of Deliverable 3 was to implement SVD using Lanczos algorithm.

I improved speed by using a QR algorithm to find the eigenvalues.

I also made an improvement on Lanczos algorithm by doing full reorthogonalization during each Lanczos iteration.

The full reorthogonalization was needed because I quickly lost orthogonality of the Lanczos vectors due to not being able to

completely reduce them to a tridiagonal form.

The full reorthgonaliztion process was carried out using a Gram-Schmidt process.

**You can find a zip file containing source codes and a screenshot of the output below.**

The zip file consists of two java files - Lanczos.java and matrix.java.

Lanczos.java contains main and methods for calculating SVD and changing a symmetric matrix into a tridiagonal matrix using Lanczos algorithm.

Matrix.java contains methods for common matrix operations.