matrix operations in c

matrix multiplication:

To multiply two matrixes sufficient and necessary condition is “number of columns in matrix A = number of rows in matrix B”.
Loop for each row in matrix A.
Loop for each columns in matrix B and initialize output matrix C to 0. This loop will run for each rows of matrix A.
Loop for each columns in matrix A.
Multiply A[i,k] to B[k,j] and add this value to C[i,j] Return output matrix C.

PROGRAM FOR MATRIX MULTIPLICATION

matrix addition:

To add two matrixes sufficient and necessary condition is “dimensions of matrix A = dimensions of matrix B”.
Loop for number of rows in matrix A.
Loop for number of columns in matrix A.
Input A[i,j] and Input B[i,j] then add A[i,j] and B[i,j] store and display this value as C[i,j];

PROGRAM FOR MATRIX ADDITION