Logo

Matrix Calculator

C command line program

image

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

C
CLI
Low level programing
Arrays & pointers

How it's used

First, the user can enter up to 5 matrices:

imageimageimageimageimage

then the user can choose the wanted operation:

image

addition and subtraction:

imageimage

mathematical and dimensional errors are taken into consideration!

image

the user can also show the matrices he entered using "show" command

image

the user can type "@" symbol to enter the last calculated answer,

multiplication and matrix determinant:

imageimage

cofactor matrix and matrix inverse:

imageimage

and at last, matrix transpose.

image

You can see the code on the github repo from the link below: