Is there a formula for the product of 3 matrices? That is, if A in RR^(m xx n),B in RR^(n xx n), and C in RR^(n xx p), and I want the (i,j) entry of the product D=ABC, how can I write D_(i,j)?

acapotivigl 2022-09-13 Answered
Is there a formula for the product of 3 matrices? That is, if A R m × n , B R n × n ,, and C R n × p , and I want the (i,j) entry of the product D=ABC, how can I write D i , j ? I know ( A B ) i , j = k = 1 n a i k b k j , but I'm not sure if this can be generalized to more than 2 matrices.
You can still ask an expert for help

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

Solve your problem for the price of one coffee

  • Available 24/7
  • Math expert for every subject
  • Pay only if we can solve it
Ask Question

Answers (2)

Annie Wells
Answered 2022-09-14 Author has 17 answers
You can done it for a arbritary number of matrices, the case of tree matrices goes
( A B ) i , j = k A i , k B k , j
With some renaming we reach
( X Y ) a , b = c X a , c Y c , b
So we replace X with AB
( ( A B ) Y ) a , b = c ( A B ) a , c Y c , b
( ( A B ) Y ) a , b = c ( k A a , k B k , c ) Y c , b
After some basic manipulations we get
( A B Y ) a , b = c k A a , k B k , c Y c , b
Finally replace Y with C
( A B C ) a , b = c k A a , k B k , c C c , b
So we had derivted our triple matrix formula. (And like this we can generalize for n matrices)

We have step-by-step solutions for your answer!

ubumanzi18
Answered 2022-09-15 Author has 2 answers
It would be similar to the 2 matrices case but it involves 2 nested sums. I am not sure if this is very efficient in practice:
d i j = u v a i u b u v c v j

We have step-by-step solutions for your answer!

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

New questions