Derivative of cross product wrt vector I have the following function: $f(\dot r, r)=(\dot r+\omega\times r)^2$ where $\omega$ is constant.
I need to find $\partial f/\partial r$, but I'm struggling to figure out how to derive $\omega\times r$, which I need to do in order to use the chain rule.
As far as I can tell, because $\omega$ is constant, $\partial /\partial r (\omega\times r)=\omega \times \partial r/\partial r=\omega \times I$, but this seems wrong - is the cross product of a vector and a matrix even defined, or am I missing something earlier in the calculation?
Thanks for the help!
 A: You can express the cross product as a matrix multiplication by introducting the function
$$\operatorname{skw}\colon \mathbb R^3 \to \mathbb R^{3\times 3}, \omega\mapsto\operatorname{skw}(\omega) = \begin{bmatrix}0&-\omega_3 &\omega_2\\\omega_3&0&-\omega_1\\-\omega_2&\omega_3&0\end{bmatrix},$$
that maps each 3D vector on a skew-symmetric matrix which encodes the cross product:
$$ a\times b = \operatorname{skw}(a)\cdot b $$
and of course
$$ \frac d{db}\bigl(\operatorname{skw}(a)\cdot b\bigr) = \operatorname{skw}(a). $$
In your terms this means
$$ \frac d{d r}\omega\times r = \frac d{d r} \operatorname{skw}(\omega)\cdot r = \operatorname{skw}(\omega).$$

In the following section I have derived the function $f$ that you gave with respect to $r$:
You write (assuming the squared vector means dot-multiplying it by itself)
$$f(r,\dot r) = (\dot r + \operatorname{skw}(\omega)\cdot r)^T\cdot(\dot r + \operatorname{skw}(\omega)\cdot r) $$
and finally get
\begin{align}
\frac\partial{\partial r} f(r,\dot r) &= 2(\dot r + \omega\times r)^T\cdot\operatorname{skw}(\omega) \\
&= 2 \bigl(\operatorname{skw}^T(\omega)\cdot(\dot r + \omega\times r)\bigr)^T \\
&= -2 \bigl(\operatorname{skw}(\omega)\cdot(\dot r + \omega\times r)\bigr)^T \\
&= -2 \bigl(\omega\times(\dot r + \omega\times r)\bigr)^T \\
\end{align}
because $\operatorname{skw}$ is antisymmetric.
Note that $\frac{\partial f}{\partial r}$ is, as usual, a 3D row vector. If you need the column vector, use $\nabla_rf$.
A: Write $r=\sum_{i=1}^3 r_i e_i$ where $\{e_i\}_{i=1,2,3}$ is the canonical basis of $\mathbb{R}^3$. $$\frac \partial {\partial r_j} \omega\times \sum_{i=1}^3 r_i e_i  = \omega \times e_j  $$  so the Jacobian of $r\in\mathbb{R}^3\mapsto \omega\times r\in\mathbb{R}^3 $ has column $j$ equal to  $\omega\times e_j$. You can also define the vector product of $\omega$ with a matrix $A\in \mathbb{R^{3\times 3}}$ in this way:
$$\omega \times [A_1|A_2|A_3] = [\omega\times A_1|\omega\times A_2|\omega\times A_3]$$
where $A_j\in \mathbb{R}^3$ is  $j$-column of $A$, so you have $\nabla_r \omega\times r = \omega \times I$.
