Let $x,y,z\in\mathbb{R}^n$. I am trying to compute
$$ \frac{\partial}{\partial x} (x\circ y)^Tz\\ \frac{\partial}{\partial x} (x\circ y)^T(x \circ y) $$
where $x\circ y$ is the Hadamard product of $x$ and $y$, but it is throwing me for a loop. Can someone show me how to proceed with these derivatives?
Based on this answer, it appears that I can write $f(x,y)=(x\circ y)^T(x\circ y) = (x\circ y)^TI(x\circ y)$ and thus
$$ \frac{\partial f}{\partial x} = y\circ (I^T+I)(x\circ y) $$ but I am confused about the first part, $y\circ(I^T+I)$. The dimensions do not seem to match up properly since $y\in\mathbb{R}^n$ and $I\in\mathbb{R}^{n\times n}$.
Context: I would like to compute the gradient of the following:
$$ \begin{split} ||x-\alpha\circ y||_2^2 &= (x-\alpha\circ y)^T(x-\alpha\circ y)\\ & = x^Tx - x^T(\alpha\circ y) - (\alpha\circ y)^Tx + (\alpha\circ y)^T(\alpha\circ y) \end{split} $$
with respect to $\alpha$ as part of the derivation of a gradient descent update. If there is a simpler way to compute the derivative of this 2-norm, please share; however, I'd still like to know how to compute the individual derivatives as well!