Abstract definition of matrix multiplication
In the following tables, matrix http://wiki.apache.org/hama-data/attachments/MatrixMultiply/attachments/matrix_a.gif represents the quantities of the materials P and Q to produce products M and N. Matrix http://wiki.apache.org/hama-data/attachments/MatrixMultiply/attachments/matrix_b.gif represents the prices of the materials P and Q of the suppliers C1 and C2.
In this case, the first row of the second column of AB, aq + bs, represents the total cost of the producing product A.
Product\Resource |
P |
Q |
M |
a |
b |
N |
c |
d |
Resource\Company |
C1 |
C2 |
P |
p |
q |
Q |
r |
s |
See how to multiply matrices using Map/Reduce