Khatri-Rao product as a matrix multiplication

645 Views Asked by At

Assume the following matrices are defined

$$ \mathbf{A}\in\mathbf{R}^{N\times P},\ \mathbf{B}\in\mathbf{R}^{M\times P},\ \mathbf{q}\in \mathbf{R}^{P\times 1},\ \mathbf{Q}^{P\times P}=\text{diag}(\mathbf{q}) $$

where $\mathbf{R}$ denotes the set of real numbers. Through different numerical examples, I can verify that $$ \text{vec}\{\mathbf{B}\mathbf{Q}\mathbf{A}^T\}=(\mathbf{A}\odot\mathbf{B})\mathbf{q} $$ where $\odot$ denotes the Khatri-Rao product, vec denotes the vectorization operation and $^T$ is the transpose operation. I was wondering if there is a mathematical proof for the above equation.

1

There are 1 best solutions below

0
On

Let $B=[\mathbf{b}_1\dots \mathbf{b}_P]$ and $A=[\mathbf{a}_1\dots \mathbf{a}_P]$. Then: $$ \begin{aligned} \text{vec}\{\mathbf{B}\mathbf{Q}\mathbf{A}^T\} &= \sum_{p=1}^Pq_p\text{vec}(\mathbf{b}_p\mathbf{a}_p') \\&= \sum_{p=1}^Pq_p \mathbf{a}_p \otimes\mathbf{b}_p \\&= [\mathbf{a}_1 \otimes\mathbf{b}_1 \dots \mathbf{a}_P \otimes\mathbf{b}_P] \begin{bmatrix} q_1\\ \vdots \\ q_P\end{bmatrix} \\&= (\mathbf{A}\odot\mathbf{B})\mathbf{q}. \end{aligned} $$