Skip to content

The project is aimed to perform Matrix operations like+, -, * and inversion using Operator overloading concept.

Notifications You must be signed in to change notification settings

ziaKhan1995/matrix-operation-using-matrix-overlading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

C++ operator overloading for matrix operations

Operator Overloading

Given two matrix mat1[][] and mat2[][] of NxN dimensions, the task is to perform Matrix Operations using Operator Overloading. Examples:

Input: arr1[][] = { {1, 2, 3}, {4, 5, 6}, {1, 2, 3}}, arr2[][] = { {1, 2, 3}, {4, 5, 16}, {1, 2, 3}} 
Output: 
Addition of two given Matrices is: 
2 4 6 
8 10 22 
2 4 6 
Subtraction of two given Matrices is: 
0 0 0 
0 0 -10 
0 0 0 
Multiplication of two given Matrices is: 
12 18 44 
30 45 110 
12 18 44 
Input: arr1[][] = { {11, 2, 3}, {4, 5, 0}, {1, 12, 3}}, arr2[][] = { {1, 2, 3}, {41, 5, 16}, {1, 22, 3}} 
Output: 
Addition of two given Matrices is : 
12 4 6 
45 10 16 
2 34 6 
Subtraction of two given Matrices is : 
10 0 0 
-37 0 -16 
0 -10 0 
Multiplication of two given Matrices is : 
96 98 74 
209 33 92 
496 128 204 

SCREEN OUTPUTs

1:Adition of matrices

image

2:Multiplication

image

image

Releases

No releases published

Packages

No packages published

Languages