Multiplication Problem Statement
Multiplication Problem Statement
Final Project
Aero 220-500
We are asked to find the multiplication between two matrices where the matrices are any real numbers. In order to multiply two matrices, the number of rows in the first matrix must have the same number of columns in the second matrix.
Matrix 2= 4 1 5 4 6 8
Matrix 1*Matrix 2= 6 21 7 13 40 17 22 64 30
Matrix 2 * Matrix 1= 30 25 51 46
Algorithm 1) void Matrixclass::multiplication(Matrixclass z, ofstream&outfile)//Main function for Multiplication a. Matrixclass product(height, z.width) b. for (int i=0; i<product.height; i++) //for loops for the resultant matrix c. for (int j=0; j<product.width; j++) d. for (int k=0; k<z.height; k++) i. product.matrix[i][j]+=matrix[i][k]*z.matrix[k][j]//the formula for multiplying two matrices 2) product.display(outfile)//displays the product matrix in a text file
Jonathan P. LaGrone
Final Project
Aero 220-500