Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How to derive from this formula:

$$\frac{\partial(\mathbf g.\mathbf h)}{\partial \mathbf x} = \left(\frac{\partial(\mathbf g.\mathbf h)}{\partial x_1},\frac{\partial(\mathbf g.\mathbf h)}{\partial x_2},\frac{\partial(\mathbf g.\mathbf h)}{\partial x_3}\right)^T=\ldots$$

this formula:

$$\ldots=\frac{\partial(\mathbf h^T)}{\partial \mathbf x}\mathbf g+\frac{\partial(\mathbf g^T)}{\partial \mathbf x}\mathbf h$$

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

By linearity, the product rule $(gh)'=g'h+gh'$ and the assumption that $\mathbf g\cdot\mathbf h=\mathbf h\cdot \mathbf g$:

$$ \frac{\partial(\mathbf g.\mathbf h)}{\partial \mathbf x} = \left(\frac{\partial(\mathbf g.\mathbf h)}{\partial x_1},\ldots \right)^T= \left(\frac{\partial(\mathbf h^T)}{\partial x_1}\mathbf g+\frac{\partial(\mathbf g^T)}{\partial x_1}\mathbf h, \ldots \right)^T =\frac{\partial(\mathbf h^T)}{\partial \mathbf x}\mathbf g+\frac{\partial(\mathbf g^T)}{\partial \mathbf x}\mathbf h $$

share|improve this answer
add comment

For each element you can use the chain rule

$$ \frac{ \partial (\boldsymbol{g}\cdot\boldsymbol{h}) }{\partial x_i} = \frac{ \partial (\boldsymbol{g}\cdot\boldsymbol{h}) }{\partial \boldsymbol g} \cdot\frac{ \partial (\boldsymbol{g}) }{\partial x_i} + \frac{ \partial (\boldsymbol{g}\cdot\boldsymbol{h}) }{\partial \boldsymbol h} \cdot\frac{ \partial (\boldsymbol{h}) }{\partial x_i} = \boldsymbol{h} \cdot \frac{ \partial (\boldsymbol{g}) }{\partial x_i}+\boldsymbol{g} \cdot \frac{ \partial (\boldsymbol{h}) }{\partial x_i} $$

where $\boldsymbol{g}\cdot\boldsymbol{h} = \boldsymbol{g}^\top\boldsymbol{h} $.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.