Check Reasoning On Calculation Involving Diagonal Matrix and Matrix and Hadamard Products

71 Views Asked by At

I apologize in advance, as I kind of realize this is a dumb question. But I need a little more mathematical rigor to my naive logic.

Suppose I have an $n \times n$ diagonal matrix, $\mathbf{A}$, and 2 vectors $\mathbf{w}$ and $\mathbf{v}$ of length $n$. Now I want to show more generally that, $$ \begin{align*} \mathbf{v}^{\text{-}1} \circ \mathbf{A}\left(\mathbf{w} \circ \mathbf{v}\right) = \mathbf{A}\mathbf{w} \end{align*} $$ where $\circ$ denotes the hadamard product (element-wise) and $\mathbf{v}^{\text{-}1} = \left(\dfrac{1}{\mathbf{v}}\right)$. Not sure if it matters, but all the diagonal elements of $\mathbf{A}$ lie in the interval $[0, 1]$.

Since $A$ is a diagonal matrix then, $$ \begin{align*} \mathbf{A} (\mathbf{w} \circ \mathbf{v}) = (\mathbf{w} \circ \mathbf{v}) \mathbf{A} \end{align*} $$ which means, $$ \begin{align*} \mathbf{v}^{\text{-}1} \circ \mathbf{A}\left(\mathbf{w} \circ \mathbf{v}\right) = \mathbf{v}^{\text{-}1}\circ \left(\mathbf{w} \circ \mathbf{v}\right)\mathbf{A} \end{align*} $$ Now it's easy to see my proposition, $$ \begin{align*} \mathbf{v}^{\text{-}1}\circ \left(\mathbf{w} \circ \mathbf{v}\right)\mathbf{A} = \mathbf{w}\mathbf{A} \end{align*} $$ because, $$ \mathbf{v}^{\text{-}1}\circ \left(\mathbf{w} \circ \mathbf{v}\right) = \dfrac{ \left(\mathbf{w} \circ \mathbf{v}\right)}{\mathbf{v}} = \mathbf{w} $$ Does this reasoning make sense?

And because $\mathbf{A}$ is diagonal, $\mathbf{w}\mathbf{A} = \mathbf{A}\mathbf{w}$.

1

There are 1 best solutions below

0
On BEST ANSWER

Let $\,\,A = {\rm Diag}(a)$
Then there is a simple rule for switching between matrix and Hadamard multiplication $$Ax=a\circ x$$ Apply this rule (and the commutivity of Hadamard products) to the current problem $$\eqalign{ v^{-1}\circ A(w\circ v) &= v^{-1}\circ a\circ(w\circ v) \cr &= v^{-1}\circ v\circ a\circ w \cr &= a\circ w \cr &= Aw \cr }$$