Khatri-Rao product example

11k Views Asked by At

I am trying to understand the following definition of the Khatri-Rao product taken from Kolda, Tamara G., and Brett W. Bader. "Tensor decompositions and applications."(2009):

"The Khatri-Rao product is the "matching columnwise" Kronecker product. Given matrices $\mathrm{A} \in \mathbb{R}^{I \times K}$ and $\mathrm{B} \in \mathbb{R}^{J \times K}$, their Khatri-Rao product is denoted by $\mathrm{A} \odot \mathrm{B}$. The result is a matrix of size $(IJ) \times K$ and defined by $$\mathrm{A} \odot \mathrm{B} = [\mathrm{a}_1 \otimes \mathrm{b}_1 \mathrm{a}_2 \otimes \mathrm{b}_2 \ldots \mathrm{a}_k \otimes \mathrm{b}_k] $$."

I do understand the result of a matrix Kronecker product, but not of elementwise Kronecker products and so I'm having a hard time understanding the result of such a multiplication. So far I just can't find good online examples. Can someone give me a simple numerical example of what the result of such a multiplication should be?

1

There are 1 best solutions below

1
On BEST ANSWER

Here's an example. Suppose $I=J=2$ and $K=3$ and you have $$A=\begin{pmatrix} a & b & c \\ d & e & f\end{pmatrix}$$ and $$B=\begin{pmatrix} g & h & i \\ j & k & l\end{pmatrix}.$$

Then $A\odot B$ is the matrix $$A\odot B= \begin{pmatrix} ag & bh & ci \\ aj & bk & cl \\ dg & eh & fi \\ dj & ek & fl \\ \end{pmatrix}.$$

If you want a specific numerical example, you can just plug in whatever numbers you want for all the variables.

What's going on here is that the columns of $A\odot B$ are just what you get by taking the Kronecker products of the corresponding columns of $A$ and $B$ (as column vectors). So for instance, the first column $(ag,aj,dg,dj)$ is just obtained as the Kronecker product of $(a,d)$ and $(g,j)$, the first columns of $A$ and $B$.