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-616ae06659dd1136341749/] Output : [crayon-616ae06659dda031430802/] 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-616ae06659ddd019195145/]

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

[crayon-616ae0665ac1e012155529/] Output : [crayon-616ae0665ac27546623025/] 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[0][0] is subtracted from a[0][0] and result is stored in c[0][0] We 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-616ae0665b018496477221/] Output [crayon-616ae0665b021408308079/] Note : 2-D array needs two nested for loops [crayon-616ae0665b028378617277/] 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[0][0] is added with b[0][0] and result is stored in c[0][0] Special Note : We required two 'for loops' (nested) for following Perpose : Accepting Matrix Displaying Matrix Manipulating Matrix Performing Different Operations on Matrix

Accessing 2-D Array Elements In C Programming

Accessing Array Elements To Access Every 2-D Array we requires 2 Subscript variables. i - Refers the Row number j - Refers Column Number a[1][0] refers element belonging to first row and zeroth column Accept & Print 2x2 Matrix from user [crayon-616ae0665baa1764206020/] 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[0][0],a[0][1],a[0][2]) 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-616ae0665be5c658650577/] Output : [crayon-616ae0665be65483535240/] Explanation : Suppose we have to find Inverse of - [crayon-616ae0665be68541440118/] Step 1 : Create One Matrix of Size 3 x 6 i.e Create 3 x 3 Matrix and Append 3 x 3 Unit Matrix Step 2 : Factor = a[0][0] Now For First Row : Divide all Elements by Factor Itself Step 3 : Now Factor = a[1][0] and Apply Following Formula to 2nd Row [crayon-616ae0665be6c967767720/] Step 4 : Now Factor = a[2][0] and Apply Following Formula to 3rd Row [crayon-616ae0665be6f712611379/] Step 5 [...]

C Program to Multiply Two 3 X 3 Matrices

Program : [crayon-616ae0665c2a7321191651/] Steps : [crayon-616ae0665c2b5170907977/] Multiplication is Possible iff - [crayon-616ae0665c2b9740558192/] Resultant Matrix Will of Dimension- [crayon-616ae0665c2bc711472567/] Steps 1 : [crayon-616ae0665c2be880011339/] Step 2 : [crayon-616ae0665c2c1624873105/] Programmable Implementation : [crayon-616ae0665c2c4322687029/]