2D Array

C program to multiply two matrix

Multiply two matrix

This program illustrate the concept to multiply two matrix.

  • In this program “m=row” and “n=coloumn” for first matrix.
  • And “p=row” and “q=coloumn” for second matrix.
  • We can multiply two matrix if and only if rows of first matrix=coloumns of second matrix.

OUTPUT

If their is only one row and coloumn

multiply two matrix

If their are 3 rows and 3 coloums

multiply two matrix


What is matrix

  • It is a rectangular array arranged in rows and coloumns.
  • Suppose a matrix “A” is denoted by m x n order.Where m=rows and n=coloumns.
  • Individual item in matrix “A” will be denoted by “aij” where i=m and j=n.

How matrix multiplication takes place

If their is only one row and one coloumn

Multiply two matrice


Comment below if you are facing any problem


Also read

How to add two matrix in c program
How to transpose a entered matrix in c program