Tensors and matrices multiplication

The multiplication of a tensor by a matrix (or by a vector) is called $n$-mode product.

Let $\mathcal{T} \in \mathbb{R}^{I_1 \times I_2 \times \cdots \times I_N}$ be an $N$-order tensor and $\mathbf{M} \in \mathbb{R}^{J \times I_n}$ be a matrix. The $n$-mode product is defined as

$$ (\mathcal{T} \times_{n} \mathbf{M})_{i_{1}\cdots i_{n-1}ji_{n+1}\cdots i_N} = \sum \limits_{i_n = 1}^{I_n} \mathcal{T}_{i_{1}i_{2}\cdots i_{n}\cdots i_{N}}\mathbf{M}_{ji_{n}}.$$

Note this is not a standard product like the product of matrices. However, you could perform a matricization of the tensor along its $n$-mode (dimension $n$) and thus effectuate a standard multiplication.

The $n$-mode matricization of $\mathcal{T}$, say $\mathbf{T}_{(n)}$, is an $I_{n} \times I_{1}\cdots I_{n-1}I_{n+1}\cdots I_{N}$ matrix representation of $\mathcal{T}$. In other words, it is just a matrix form to organize all the entries of $\mathcal{T}.$ Hence, the multiplications below are equivalent

$$\mathcal{Y} = \mathcal{T} \times_{n} \mathbf{M} \iff \mathbf{Y}_{(n)} = \mathbf{M} \mathbf{T}_{(n)}, $$ where $\mathbf{Y}_{(n)}$ is the $n$-mode matricization of the tensor $\mathcal{Y} \in \mathbb{R}^{I_1 \times \cdots \times I_{n-1} \times J \times I_{n+1} \times \cdots \times I_N}$.

For more details, see Tensor Decompositions and Applications.