I have the following equation:
$Y = [ C \bullet R ] \times X \times[C^T \bullet R^T ]$
In my textbook, this conveniently rearranges to:
$Y = [ C \times X \times C^T ] \bullet [R \bullet R^T ]$
where $\times$ denotes matrix multiplication, $\bullet$ is Hadamard (pointwise multiplication), and $R^T$ is the transposition of $R$.
How do they manage to rearrange this?
I've played around with it, and it seems that they're using the following identity:
$[ A \bullet B ] \times C = A \bullet [B \times C]$
I've tried proving it true, without success. For example, if
$D = [ A \bullet B ] \times C$ and $E = A \bullet [B \times C]$,
then
$D_{00} = \sum_{k=0}^m A_{0k} B_{0k}C_{k0}$
$E_{00} = A_{00} \sum_{k=0}^m B_{0k}C_{k0}$
As $D_{00} \neq E_{00}$, the identity is false.
Where have I gone wrong?
EDIT
I'm working with $4 \times 4$ matrices here.
EDIT 2
Here are the matrices I'm dealing with:
$ C = \begin{pmatrix} 1 & 1 & 1 & 1\\\\ 2 & 1 & -1 & -2\\\\ 1 & -1 & -1 & 1\\\\ 1 & -2 & 2 & -1\\\\ \end{pmatrix} $
$ R = \begin{pmatrix} \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & \frac{1}{2}\\\\ \frac{1}{\sqrt{10}} & \frac{1}{\sqrt{10}} & \frac{1}{\sqrt{10}} & \frac{1}{\sqrt{10}}\\\\ \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & \frac{1}{2}\\\\ \frac{1}{\sqrt{10}} & \frac{1}{\sqrt{10}} & \frac{1}{\sqrt{10}} & \frac{1}{\sqrt{10}}\\\\ \end{pmatrix} $
$X$ is an arbitrary matrix with integer-only values.