# kevinzakka / learn-linalg

Learning some numerical linear algebra.
Python
Latest commit 5e4e5f3 Dec 28, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information. examples linalg .gitignore README.md setup.py

## linalg

Currently reinforcing my linear algebra and numerical analysis by reimplementing basic, fundamental algorithms in Python. My implementations are tested against `numpy` and `scipy` equivalents. Inspired by Alex Nichol's Go repository.

Feel free to read the notes which summarize parts of Justin Solomon's book as well as insights into my thought-process.

## Contents

• kahan: kahan summation for adding finite precision floating point numbers.
• gelim: gaussian elimination with naive, partial and full pivoting for solving `Ax = b`.
• ludecomp: `LU`, `PLU` and `PLUQ` decomposition for solving `Ax = b`.
• determinant: compute the determinant (or log det) of a square matrix A using PLU factorization.
• inverse: compute the inverse of a square matrix A using PLU factorization.
• cholesky: cholesky decomposition for symmetric positive definite matrices A.
• qrdecomp: `QR` decomposition of any matrix A using gram-schmidt or householder.
• solve: solve `Ax=b` using PLU decomposition.
• lstsq: solve least squares using QR decomposition.
• eigen: single and multi eigenvalue finding algorithms, hessenberg factorization and the qr algorithm.
• svd: singular value decomposition `SVD` of any matrix A.

## Applications

• imagealign: align a crooked image using least squares.
• benchmarks: speed comparisons of different decompositions for solving `Ax = b`.

## Todos

• Make QR decomposition more efficient for Hessenberg matrices.
• Implement QR decomposition with Givens rotations.