Matrix Calculator
C command line program
Project description
The Matrix Calculator is a command-line program developed in C that allows users to perform various matrix operations. It supports operations such as addition, subtraction, multiplication, transpose, cofactor, determinant, and inverse.
The program was initially for the CS50X final project, and after that I added more features to make it better.
The program is organized into two main files:
matrix.h: This file contains the core logic for all matrix operations. It handles the mathematical computations required for each operation.
main.c: This file manages user interactions, including input and output. It guides the user through selecting and performing operations on matrices and displays the results. Together, these files form a cohesive tool for working with matrices directly from the command line.
Technologies and concepts used
How it's used
First, the user can enter up to 5 matrices:
then the user can choose the wanted operation:
addition and subtraction:
mathematical and dimensional errors are taken into consideration!
the user can also show the matrices he entered using "show" command
the user can type "@" symbol to enter the last calculated answer,
multiplication and matrix determinant:
cofactor matrix and matrix inverse:
and at last, matrix transpose.
You can see the code on the github repo from the link below: