Matrix multiplication - Wikipedia, the free encyclopedia
If you're multiplying a matrix with it's transposition (X,Y) * (Y,X), then the resultant matrix is going to be square (either X,X or Y,Y)
Your output result isn't square.
Which makes me suspect your calculation isn't square either.
1. Initialise your arrays.
Code:
int m, x, n, c = 0, d, k, matrix[10][10] = { { 0 } }, transpose[10][10] = { { 0 } }, product[10][10] = { { 0 } };
Then the results are
Code:
Enter the number of columns of matrix 5
Enter the elements of matrix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 99
Here is your matrix:
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
Transpose of entered matrix :-
1 6 11
2 7 12
3 8 13
4 9 14
5 10 15
The Product Of The Two Matrices Is:
55 130 205 0 0
130 330 530 0 0
205 530 855 0 0
NOW - go through and add some variable names like
int matRows, matCols;
int transRows, transCols;
int multRows, multCols;