1

If I have a vector $v$ of length $n_1\times n_2\times n_3$ and a matrix $M$ of shape $(n_1\times n_2\times n_3, n_1\times n_2\times n_3)$, I can do matrix vector multiplication of $Mv$ to get a resulting vector $v'$ of size $n_1\times n_2\times n_3$.

So far so good.

Question

Let's say I reshape $v, v'$ into a matrices each with three dimensions (i.e., have size $(n_1, n_2, n_3)$). Is there:

  1. an operation I can perform on $M$
  2. a way to apply $M$ to vector $v$

so that $M$ applied to 3d matrix $v$ gives 3d matrix $v'$?

Initial thoughts

It seems it should be possible because if I write things as a vector then I know how to do matrix multiplication.

But if I rewrite $v, v'$ as matrices, the problem is $M$ somehow needs to be applied to $n_1, n_2, n_3$ dimensions correctly. I suspect this is related to Kronecker products/tensor products because I know that is one way to build bigger spaces from smaller spaces, but I am not sure what I would take the tensor product of $M$ with.

Andrei
  • 39,869
  • 4
    Check tensors and tensor products; see e.g. https://en.wikipedia.org/wiki/Tensor – KBS Dec 15 '22 at 12:56
  • Thanks! If someone would like to write this up as an answer I would be happy to accept as a solution. – Physics Enthusiast Jan 26 '23 at 07:33
  • Just found the following related questions in case others have a similar question: https://math.stackexchange.com/questions/63074/is-there-a-3-dimensional-matrix-by-matrix-product https://math.stackexchange.com/questions/94590/matrix-multiplication-for-n-dimensional-arrays – Physics Enthusiast Feb 16 '23 at 19:17

0 Answers0