Multiplication of two matrices
Matrics: Matrics means the there should be column and rows. Let there be m rows and n column. A three dimensional matrix can be represented as:
A11
|
A12
|
A13
|
A21
|
A22
|
A23
|
A31
|
A32
|
A33
|
Algorithm:
Step 1: Start
Step 2: Take the elements in the first and second matrices.
Step 3: Check if number of columns of first matrix is equal to the number of rows of second matrix, then matrix is possible for multiplication otherwise it is not possible.
Step 4: If matrices are compatible then find the sum of the product of corresponding element of each row of A with the corresponding element of each column of B and sum the element and equate it to the corresponding position of the product matrix.
Step 5: Print the multiplication of two matrices and arrange it into the matrix form.
Step 6: Stop.