Skip to content

๐Ÿงฎ Python implementations of LU decomposition, least squares denoising, and SVD-based image compression.

Notifications You must be signed in to change notification settings

Amirbehnam1009/Linear-Algebra-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“Š Linear Algebra Projects

๐Ÿ‘จโ€๐ŸซUnder the Supervision of Prof. Morteza Haghir Chehreghani
๐Ÿ‚Spring 2021

This repository contains three projects focused on practical applications of linear algebra:

  1. ๐Ÿ”ข Solving Linear Equations with LU Decomposition
  2. ๐Ÿ“‰ Denoising Bitcoin Price Data Using Least Squares
  3. ๐Ÿ–ผ๏ธ Compressing Bitmap Images via SVD Decomposition

๐Ÿงฎ Project 1: Linear Equations Solver with LU Decomposition

๐Ÿ“ Overview

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.

โš™๏ธ Requirements

  • Python 3.x
  • NumPy

๐Ÿ“ฅ Input Format

The input consists of:

  1. Two integers n (size of the square matrix A) and m (number of vectors b)
  2. n lines representing the rows of matrix A
  3. m lines, each containing a vector b

๐Ÿ“‹ 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 12

๐Ÿ“ค Output Format

Solutions 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.5

๐Ÿ“‰ Project 2: Denoising Bitcoin Price Data Using Least Squares

๐Ÿ“ Overview

Applies the Least Squares Method to smooth noisy Bitcoin price trends, revealing underlying patterns.

๐ŸŽจ Simulated Result

Denoised Bitcoin Price

๐Ÿ–ผ๏ธ Project 3: Bitmap Image Compression via SVD Decomposition

๐Ÿ“ Overview

Compresses .bmp images using Singular Value Decomposition (SVD), reducing file size while preserving visual quality.

โ–ถ๏ธ How to Run

  1. Provide the path to a .bmp image
  2. The script outputs a compressed version

๐ŸŽจ Simulated Result

Original vs. Compressed Image
Image Compression Demo


โœจ Key Features

  • ๐Ÿงฉ Modular Code Structure - Easy to understand and modify
  • โšก Efficient Algorithms - Optimized implementations of core linear algebra operations
  • ๐Ÿ“š Academic Foundation - Based on rigorous mathematical principles

๐Ÿš€ Getting Started

  1. Clone this repository
  2. Install dependencies: pip install numpy matplotlib
  3. Run individual project scripts

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details

๐Ÿ™ Acknowledgments

Special thanks to Prof. Chehreghani for guidance on these implementations

About

๐Ÿงฎ Python implementations of LU decomposition, least squares denoising, and SVD-based image compression.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published