The derivative of a unit vector with respect to itself

derivativesmatrix-calculusmultivariable-calculusprojection-matrices

I just saw an engineering paper which claims that $$\frac{\partial \hat{\mathbf{x}}}{\partial \hat{\mathbf{x}}} \stackrel{?}{=} -S(\hat{\mathbf{x}})^2 = I – \hat{\mathbf{x}}\hat{\mathbf{x}}^T$$ where $\hat{\mathbf{x}}$ is a unit vector, $S(\hat{\mathbf{x}})$ is the skew symmetric matrix packing of $\hat{\mathbf{x}}$ for use in the cross-product, and I've used the $\stackrel{?}{=}$ symbol to represent the equality I'm calling into question. Is this right? I would have guessed that $$\frac{\partial \hat{\mathbf{x}}}{\partial \hat{\mathbf{x}}} = I$$ just like it is for the vector $\mathbf{x}$, but I'm not sure if the fact that $\hat{\mathbf{x}}$ is a constrained vector somehow explains the appearance of the $-\hat{\mathbf{x}}\hat{\mathbf{x}}^T$ term. Any confirmation or correction is greatly appreciated.

Best Answer

$ \def\l{\lambda} \def\x{{\hat x}} \def\qiq{\quad\implies\quad} \def\c#1{\color{red}{#1}} $Let $\x$ be the direction and $\lambda$ the length of an unconstrained vector $x$.

Calculate the differential of $\x$ as follows $$\eqalign{ \l^2 &= x^Tx \qiq \l\,d\l = x^Tdx \\ \x &= \l^{-1}x \\ d\x &= \c{\l^{-1}dx} - x\l^{-2}d\l \\ &= \l^{-1}I\,dx - \l^{-3}x\l\,d\l \\ &= \l^{-1}(I - \l^{-2}xx^T)\,dx \\ &= \l^{-1}(I - \x\x^T)\,dx \\ }$$ Rearranging the terms yields $$\eqalign{ d\x &= (I - \x\x^T)\,(\c{\l^{-1}dx}) \\ &= (I - \x\x^T)\,(\c{d\x+x\l^{-2}d\l}) \\ &= (I - \x\x^T)\,d\x + (I-\x\x^T)\,\x\l^{-1}d\l \\ &= (I - \x\x^T)\,d\x + (x-\x\x^Tx)\,\l^{-1}d\l \\ &= (I - \x\x^T)\,d\x + (0)\,\l^{-1}d\l \\ &= (I - \x\x^T)\,d\x \\ \frac{\partial\x}{\partial\x} &= (I - \x\x^T) \\ }$$ which is the desired result.

Related Question