https://github.com/ab23ms233/matrix-calculator
A Python-based matrix calculator for performing operations like addition, multiplication, inverse, determinant, eigenvalues, diagonalization, and matrix functions using NumPy, SymPy, and SciPy.
https://github.com/ab23ms233/matrix-calculator
linear-algebra numpy scipy
Last synced: 6 months ago
JSON representation
A Python-based matrix calculator for performing operations like addition, multiplication, inverse, determinant, eigenvalues, diagonalization, and matrix functions using NumPy, SymPy, and SciPy.
- Host: GitHub
- URL: https://github.com/ab23ms233/matrix-calculator
- Owner: ab23ms233
- Created: 2025-05-18T11:13:12.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-07-24T07:34:35.000Z (6 months ago)
- Last Synced: 2025-07-24T11:28:02.923Z (6 months ago)
- Topics: linear-algebra, numpy, scipy
- Language: Python
- Homepage:
- Size: 2.37 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🧮 Matrix Calculator
This is a Python-based Matrix Calculator that allows users to perform a wide range of matrix operations through a command-line interface and Jupyter notebook demo.
---
## 📂 Project Structure
```
Matrix-Calculator/
├── Class_MtxCalc.py # Contains the MatrixCalculator class with core logic
├── Program_MtxCalc.py # CLI program that interacts with the user
├── Matrix_Calculator_Demo.ipynb # Jupyter notebook demonstrating usage of each method
├── requirements.txt # Dependencies for pip users
├── environment.yaml # Conda environment file
└── .gitignore # Ignores unnecessary files that are auto-generated locally
```
---
## ⚙️ Features
- Matrix Addition & Multiplication
- Determinant calculation
- Inverse of a matrix
- Eigenvalues and Eigenvectors
- Diagonalization
- Powers of a matrix
- Matrix function operations:
`sin`, `cos`, `exp`, `log`, `sinh`, `cosh`
---
## 💻 How to Run
### 🔹 Option 1: Using pip
```bash
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run the calculator
python Program_MtxCalc.py
```
---
### 🔹 Option 2: Using conda
```bash
# Create environment
conda env create -f environment.yaml
# Activate it
conda activate matrix-calculator
# Run the calculator
python Program_MtxCalc.py
```
---
## 📓 Jupyter Notebook Demo
Open `Matrix_Calculator_Demo.ipynb` in Jupyter to see how each method in the `MatrixCalculator` class works individually.
```bash
jupyter notebook Matrix_Calculator_Demo.ipynb
```
---
## 🧠 Technologies Used
- [NumPy](https://numpy.org/) — for matrix and numerical operations
- [SymPy](https://www.sympy.org/) — for symbolic mathematics
- [SciPy](https://www.scipy.org/) — for matrix function evaluations
---
## 📌 Notes
- Only square matrices are supported for operations like determinant, inverse, diagonalization, etc.
- The CLI guides you through entering matrices interactively and supports undoing rows (`u`) or stopping input (`x`).
---
## 🙌 Acknowledgements
Thanks for using the Matrix Calculator!
Pull requests and suggestions are welcome. 🎉