Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a final tomorrow and it includes multiplying matrices (getting a table of values) but i do not understand how he is getting some of the numbers

something like this

suppose the matrices are

 A3X4  B4X5    C5x7    D7X2

in the results table he has

          A    B     C       D
    A     0    60    165     134
    B           0    140     110
    C                0       70
    D                        0

     A     B      C      D
A    A     A*B    A*B*C  A*B*C*D
B          B      B*C    B*C*D
C                 C      C*D
D                        D

How is he getting 165 unders C for example? I know how he is getting the twi dimentional ones like for instance the 140 under C would be B*C which is 4X5X7 = 140 but I have no idea how he is getting for the A*B*C = 165

Thank you

share|cite|improve this question
Does this make sense to other people? – Alex Becker May 1 '11 at 23:44
It does to my professor :(, I think the value on the table is the number of possible multiplications.. butt as you can see, he gets the 140 by multiplying 4X5X7... Thanks for helping me figure itt out – edprog May 1 '11 at 23:49
edprog: by possible number of muliplications, do you mean the possible number of multiplications of entries necessary to compute the resulting Matrix? This simply isn't making sense, and we're going to need more clarification in order to point you in the right direction. – amWhy May 2 '11 at 0:05
This is for Analysis and Design of Algorithms, I have a power point and this where the numbers are comming from, the topic is Multiplyinf Matrices – edprog May 2 '11 at 0:19
It's confusing for me too – edprog May 2 '11 at 0:19
up vote 2 down vote accepted

Here's my guess as to what's going on. The table purports to show the number of (scalar) multiplications necessary to carry out the indicated matrix multiplication in the most efficient way. E.g., the entry for $AB$ is $60$ because each entry in the product requires $4$ multiplications, and there are $15$ entries in the product, and $4\times15=60$.

Now things get a little tricky when there are more than two matrices involved. While of course $A(BC)=(AB)C$, the number of multiplications required can be different for the two ways of setting out the calculation. Let's look at $ABCD$ and see if we can reproduce that $134$. First, do $CD$. $7$ multiplications per entry, $10$ entries, so $70$ multiplications, resulting in a $5\times 2$ matrix. Then do $B(CD)$, a $4\times5$ times a $5\times2$. That takes $40$ multiplications, and yields a $4\times2$ matrix. Finally, do $A(B(CD))$, a $3\times4$ times a $4\times2$. That's another $24$ multiplications. All told, $70+40+24=134$, voila!

share|cite|improve this answer
Excellent, if you were to find the 110, how would you go about it? using the table? – edprog May 2 '11 at 0:27
Nevermind, you did it already when you places B(CD).. hmmm interesting – edprog May 2 '11 at 0:30
@Gerry: Yes, I think you're right. Good job. I was wondering if something like that was going on. – amWhy May 2 '11 at 0:36
That looks great, now so that I just completely understand.. how would you get the 165 with your concept?, i can use it tomorrow in my final – edprog May 2 '11 at 0:40
It seems like it depends from where I am picking the values.. if I start per row.. for 165 i can duplicate your throty but if i take per column.... i get a higher number.. I am just confused in which way to go – edprog May 2 '11 at 0:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.