[Math] Express Hadamard product as a normal matrix product

hadamard-productmatrices

I have $N^2$ equations which I can write as the following Hadamard product. Is there a way I can get rid of the Hadamard product and express this using usual matrix operations?

$\left[
\begin{matrix}
0 & a_{21} & \cdots & a_{n1} \\
a_{12} & 0 & \cdots & a_{n2} \\
\vdots & \vdots & \ddots & \vdots\\
a_{1n} & a_{2n} &\cdots & 0\\
\end{matrix}
\right]\bigcirc \left[\begin{matrix}
b_1 & b_2 & \cdots & b_n \\
b_1 & b_2 & \cdots & b_n \\
\vdots & \vdots & \ddots & \vdots\\
b_1 & b_2 & \cdots & b_n\\
\end{matrix}
\right]=\left[
\begin{matrix}
c_{11} & c_{21} & \cdots & c_{n1} \\
c_{12} & c_{22} & \cdots & a_{n2} \\
\vdots & \vdots & \ddots & \vdots\\
c_{1n} & c_{2n} &\cdots & c_{nn}\\
\end{matrix}
\right]$

Best Answer

You can achieve the stated goal by applying the vec operation to both sides of the equation $$\eqalign{ A\circ B &= C \cr {\rm vec}(A)\circ {\rm vec}(B) &= {\rm vec}(C) \cr {\rm Diag}\Big({\rm vec}(A)\Big) {\rm vec}(B) &= {\rm vec}(C) \cr {\cal A}\,b &= c \cr }$$ but why on earth would you want to do that?

Since $\,b,c\in {\mathbb R}^{N^2}$ and $\,{\cal A}\in{\mathbb R}^{N^2\times N^2}$ the operation count went from $N^2$ to $N^4$

Related Question