3D matrix multiplication

I’m into Lesson 8 - of Intro to ML . I’m not able to wrap my head around 3d matrix multiplication. Multiplying two matrices of size MN and NQ gives M*Q. This is intuitive and I can visualize. I’m not able to do the same for Matrix multiplication of Tensor 3. How does 10000x28x28 by 10x28x28 give 10000x10 . Let’s take 1x28x28 and multiply by 10x28x28, the resulting tensor would be 1x10.How does the underlying matrix multiplication happen? By flattening, we get 1x764 multiplied by 10x764. But, how can this matrix mul be visualized without flattening?
Is there any visualization/better explanations out there?

This forum with Stack Overflow is awesome…

Here you go

2 Likes

Thank you. I was wondering if there are any visualizations like the one Jeremy shows for 2D matrix multiplication.

Remember that a matrix-matrix multiplication is just a bunch of dot products between vectors. We’ve put all these vectors into a matrix so that we can do all the dot products in one go, but if you wanted to you could take the dot products between the individual vectors and you’d end up with the same results. With a 3D matrix, it’s still a bunch of dot products.

Dot products of matrixs ?