## C Program to Check whether Matrix is Magic Square or Not ?

A square containing integers arranged in an equal number of rows and columns so that the sum of the integers in any row, column, or diagonal is the same. is called magic Square.

## C Program to Print Square of Each Element of 2D Array Matrix

C Program : C Program to Print Square of Each Element of 2D Matrix [crayon-5f6c5de34977c037186947/] Output : [crayon-5f6c5de349784336810051/] Explanation : Note 1 :Wherever a macro name occurs in Program the Preprocessor Substitutes the code of the macro at that position. Whenever we use variable name instead of Macro it will throw error.[crayon-5f6c5de349788867488171/]

## Program to find Transpose of Given Square Matrix

[crayon-5f6c5de349b2e127418273/]

## C Program to find addition of Lower Triangular Elements in C Programming

[crayon-5f6c5de349e91938270709/] Output : [crayon-5f6c5de349e99397600702/] Explanation : Considering above 3x3 matrix  -By Observing , it is clear that when i > j Condition is true then and then only we have to add the elements

## C program to calculate sum of Upper Triangular Elements in C

[crayon-5f6c5de34a221925887623/] Output [crayon-5f6c5de34a229321807552/] Explanation :Considering above 3x3 matrix -By Observing , it is clear that when i < j Condition is true then and then only we have to add the elementsDownload Program : [ Click Here ]

## C Program to evaluate Subtraction of two matrices ( matrix ) in C

[crayon-5f6c5de34a5d7107448659/] Output : [crayon-5f6c5de34a5e1293522833/] Note : 2-D array needs two nested for loops Keep in mind :One Matrix can be subtracted with another only if the order of both matrices is Equal No of rows of MAT-1 = No of rows of MAT-2 No of col of MAT-1 = No of col of MAT-2 During subtraction b is subtracted from a and result is stored in cWe required two 'for loops' (nested) for following Perpose :Accepting Matrix Displaying Matrix Manipulating Matrix Performing Different Operations on Matrix

## C program for addition of two matrices in C

[crayon-5f6c5de34a9c3499257922/] Output [crayon-5f6c5de34a9cc470982679/] Note : 2-D array needs two nested for loops [crayon-5f6c5de34a9d2210404945/]One Matrix can be added with another only if the order of both matrices is Equal No of rows of MAT-1 = No of rows of MAT-2 No of col of MAT-1 = No of col of MAT-2 During addition a is added with b and result is stored in cSpecial Note : We required two 'for loops' (nested) for following Perpose :Accepting Matrix Displaying Matrix Manipulating Matrix Performing Different Operations on Matrix

## Addition of Diagonal Elements in Matrix

[crayon-5f6c5de34adae647576450/] Output [crayon-5f6c5de34adb6518056891/] Explanation :Considering above 3x3 matrix  -We have to add a,a,a By Observing , it is clear that when i = j Condition is true then and then only we have to add the elements

## Addition of All Elements in Matrix

[crayon-5f6c5de34b13f780427667/] Output : [crayon-5f6c5de34b147775397018/] Note : 2-D array needs two nested for loops

## Accessing 2-D Array Elements In C Programming

Accessing Array ElementsTo Access Every 2-D Array we requires 2 Subscript variables. i - Refers the Row number j - Refers Column Number a refers element belonging to first row and zeroth columnAccept & Print 2x2 Matrix from user [crayon-5f6c5de34b4c4263263956/] How it Works ?For Every value of row Subscript , the column Subscript incremented from 0 to n-1 columns i.e For Zeroth row it will accept zeroth,first,second  column ( a,a,a) elements In Next Iteration Row number will be incremented by 1 and the column number [...]

## C Program to Find Inverse Of 3 x 3 Matrix in 10 Lines

Program : Finding Inverse of a 3 X 3 Matrix [crayon-5f6c5de34b870140895417/] Output : [crayon-5f6c5de34b879283009480/] Explanation : Suppose we have to find Inverse of - [crayon-5f6c5de34b87c434935075/] Step 1 :Create One Matrix of Size 3 x 6 i.e Create 3 x 3 Matrix and Append 3 x 3 Unit MatrixStep 2 :Factor = a Now For First Row : Divide all Elements by Factor ItselfStep 3 :Now Factor = a and Apply Following Formula to 2nd Row[crayon-5f6c5de34b880676103640/]Step 4 :Now Factor = a and Apply Following Formula to 3rd Row[crayon-5f6c5de34b884205844308/]Step 5 [...]

## C Program to Multiply Two 3 X 3 Matrices

Program : [crayon-5f6c5de34bd2a576605078/] Steps :[crayon-5f6c5de34bd33539467139/] Multiplication is Possible iff - [crayon-5f6c5de34bd36033081126/] Resultant Matrix Will of Dimension- [crayon-5f6c5de34bd39903990066/]Steps 1 : [crayon-5f6c5de34bd3c532706108/] Step 2 : [crayon-5f6c5de34bd3f006817016/] Programmable Implementation : [crayon-5f6c5de34bd42699820369/]