Possible Duplicate:
Is there a 3-dimensional “matrix” by “matrix” product?
Is matrix multiplication of 3-dimensional matrices defined? I cannot wrap my mind around how it would even work. Equivalently, is matrix multiplication only defined for 2-dimensional matrices?
Edit: The linked question cleared things up for me. I was so used to coding in Matlab with multi-dimensional "matrices" that I didn't think about what I was really doing (eg. 3-dimensional element-wise multiplication isn't really matrix multiplication). Investigating tensors is probably the mathematically-correct answer to my less than precise question. The open-ended-ness of tensor contraction though, means that there isn't one solution to my question.