Hadamard and Outer Products
Chapter 10: Matrix Block Partitioning — Hadamard vs Outer Products (also appears in Ch. 2)
From the book
Chapter 10: Matrix Block Partitioning. In the chapter mind map this icon labels Hadamard vs Outer Products. The discussion below is excerpted and lightly edited from § Theorem: Mode Products as a Kronecker Product in Mathematics for AI and Machine Learning. Related material also appears in Chapter 2 (Outer Product ($\mathbf{u}\mathbf{v}^\top$) & Hadamard ($A \odot B$)).
For $A \in \mathbb{R}^{m_1 \times n_1}$, $B \in \mathbb{R}^{m_2 \times n_2}$ and $C \in \mathbb{R}^{m_3 \times n_3}$,
__Proof:__ $\times_1 A$ maps each slice $X_l$ to $A X_l$, and $\times_2 B$ then maps it to $(B (A X_l)^\top)^\top = A X_l B^\top$, whose vectorization is $(B \otimes A)\, \mathrm{vec}(X_l)$ by @eq:vec-kronecker; on all slices together this is $I_{n_3} \otimes (B \otimes A)$. $\times_3 C$ replaces slice $l$ by $\sum_p c_{lp} X_p$, which is $C \otimes I_{m_1 m_2}$. By @eq:kronecker-mixed-product their product is $C \otimes B \otimes A$.
A matrix is a tensor with $n_3 = 1$, and then $X \times_1 A \times_2 B = A X B^\top$ is @eq:vec-kronecker. The same definitions and proof work for a tensor with $d$ indices: $\mathrm{vec}(\mathcal X \times_1 A_1 \cdots \times_d A_d) = (A_d \otimes \cdots \otimes A_1)\, \mathrm{vec}(\mathcal X)$.
What this drawing shows
What you see. Contrasts elementwise multiplication with outer-product expansion, two common ways to combine vectors or matrices.
In the mind map. Chapter 10 — Hadamard vs Outer Products. See From the book above for definitions, figures, and worked examples.
Also appears in Ch. 2 (Outer Product () & Hadamard ()).
Where to read next
Read the full definitions, figures, and worked examples in Chapter 10: Matrix Block Partitioning — see the mind-map node Hadamard vs Outer Products.
This concept is also referenced in Chapter 2 (Outer Product () & Hadamard ()).