๐จโ๐ซUnder the Supervision of Prof. Morteza Haghir Chehreghani
๐Spring 2021
This repository contains three projects focused on practical applications of linear algebra:
- ๐ข Solving Linear Equations with LU Decomposition
- ๐ Denoising Bitcoin Price Data Using Least Squares
- ๐ผ๏ธ Compressing Bitmap Images via SVD Decomposition
A Python implementation to solve systems of linear equations using LU decomposition and forward/backward substitution. This method efficiently handles multiple systems with the same coefficient matrix but different right-hand-side vectors.
- Python 3.x
- NumPy
The input consists of:
- Two integers
n(size of the square matrixA) andm(number of vectorsb) nlines representing the rows of matrixAmlines, each containing a vectorb
๐ Example Input:
3 5
5 6 2
4 5 2
2 4 8
18 7 2
4 5 8
15 7 6
11 9 5
13 12 12Solutions for each b are printed up to 4 decimal places.
๐ Example Output:
75.0 -64.0 13.5
-14.0 13.0 -2.0
53.0 -45.0 10.0
0.5 1.5 -0.25
-10.0 11.0 -1.5Applies the Least Squares Method to smooth noisy Bitcoin price trends, revealing underlying patterns.
Compresses .bmp images using Singular Value Decomposition (SVD), reducing file size while preserving visual quality.
- Provide the path to a
.bmpimage - The script outputs a compressed version
- ๐งฉ Modular Code Structure - Easy to understand and modify
- โก Efficient Algorithms - Optimized implementations of core linear algebra operations
- ๐ Academic Foundation - Based on rigorous mathematical principles
- Clone this repository
- Install dependencies:
pip install numpy matplotlib - Run individual project scripts
This project is licensed under the MIT License - see the LICENSE file for details
Special thanks to Prof. Chehreghani for guidance on these implementations

