Skip to content

A Python-based matrix calculator for performing operations like addition, multiplication, inverse, determinant, eigenvalues, diagonalization, and matrix functions using NumPy, SymPy, and SciPy.

Notifications You must be signed in to change notification settings

ab23ms233/Matrix-Calculator

Repository files navigation

🧮 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

# 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

# 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.

jupyter notebook Matrix_Calculator_Demo.ipynb

🧠 Technologies Used

  • NumPy — for matrix and numerical operations
  • SymPy — for symbolic mathematics
  • SciPy — 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. 🎉

About

A Python-based matrix calculator for performing operations like addition, multiplication, inverse, determinant, eigenvalues, diagonalization, and matrix functions using NumPy, SymPy, and SciPy.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •