# Derivative of the Frobenius norm with respect to a vector

I am trying to calculate the derivative of an energy function with respect to a vector $\mathbf{x}$. The energy is given by:

$\psi(\mathbf{F}) = \lVert\mathbf{F}-\mathbf{I}\rVert_F^2.$

Where $\mathbf{F}$ is a square matrix that is a function of $\mathbf{x}$ (a column vector):

$\mathbf{F(x)} = (\mathbf{x}\cdot\mathbf{u^T})\mathbf{A}$

$\mathbf{u^T}$ is a constant row vector and $\mathbf{A}$ is a constant square matrix. The goal is to find $\frac{\partial\psi}{\partial\mathbf{x}}$.

[Petersen 06] gives the derivative of a Frobenius norm as $\frac{\partial\lVert\mathbf{X}\rVert_F^2}{\mathbf{X}} = 2\mathbf{X}$, but I am unsure how to extend it to this case (presumably using the chain rule somehow).

I would like to learn how to perform this type of differentiation in general, either using the differentials method, or some other approach so references (text books, papers) are welcome. If it's possible to do it without introducing higher order tensors then even better.

• It just so happens that $\|x u^T\|_F = \|x\|_2\cdot \|u\|_2$. I would think that this will be easier to work with. – Omnomnomnom Dec 8 '13 at 19:52

Use the Frobenius product to rewrite the function and then take its differential \eqalign { \psi &= (F-I):(F-I) \cr d\psi &= 2\,(F-I):d(F-I) \cr &= 2\,(F-I):dF \cr &= 2\,(F-I):dx\,\,u^TA \cr &= 2\,(F-I)A^Tu:dx \cr &= \bigg(\frac {\partial\psi} {\partial x}\bigg) :dx \cr } So the derivative must be \eqalign { \frac {\partial\psi} {\partial x} &= 2\,(F-I)A^Tu \cr }
The differential of $\mathbf{F} = \mathbf{x.u'.A}$ is $\mathbf{dF = dx.u'.A}$
The differential of $\psi = \mathbf{(F-I):(F-I) \equiv (F:F - 2I:F + I:I)}$ is $d\psi = 2\mathbf{(F-I):dF}$
Substituting $\mathbf{dF}$ yields $d\psi = 2\mathbf{dx.(F-I).A.u}$
• Thanks Lynne, I am not familiar with the colon notation ($\mathbf{F:F}$), does this refer to the double dot product? Also, why does $\mathbf{u'.A}$ part of ($\mathbf{dF}$) appear reversed in the final expression $d\psi$? – Mark Dec 8 '13 at 21:05