Derivative of a quadratic form: Difference between revisions
| Line 25: | Line 25: | ||
:<math>\frac{\|x_0^{\mathrm T}Ax_0 + h^{\mathrm T} Ax_0 + x_0^{\mathrm T} Ah + h^{\mathrm T}Ah - x_0^{\mathrm T}Ax_0 - L(h)\|}{\|h\|} = \frac{\|h^{\mathrm T} Ax_0 + x_0^{\mathrm T} Ah + h^{\mathrm T}Ah - L(h)\|}{\|h\|}</math> | :<math>\frac{\|x_0^{\mathrm T}Ax_0 + h^{\mathrm T} Ax_0 + x_0^{\mathrm T} Ah + h^{\mathrm T}Ah - x_0^{\mathrm T}Ax_0 - L(h)\|}{\|h\|} = \frac{\|h^{\mathrm T} Ax_0 + x_0^{\mathrm T} Ah + h^{\mathrm T}Ah - L(h)\|}{\|h\|}</math> | ||
Focusing on <math>h^{\mathrm T} Ax_0</math>, it is a real number so <math>h^{\mathrm T} Ax_0 = (h^{\mathrm T} Ax_0)^{\mathrm T} = x_0^{\mathrm T}A^{\mathrm T}h</math>. | Focusing on <math>h^{\mathrm T} Ax_0</math>, it is a real number so taking the transpose leaves it unchanged: <math>h^{\mathrm T} Ax_0 = (h^{\mathrm T} Ax_0)^{\mathrm T} = x_0^{\mathrm T}A^{\mathrm T}h</math>. | ||
Now the fraction is | |||
:<math>\frac{\|x_0^{\mathrm T}A^{\mathrm T}h + x_0^{\mathrm T} Ah + h^{\mathrm T}Ah - L(h)\|}{\|h\|} = \frac{\|x_0^{\mathrm T}(A^{\mathrm T} + A)h + h^{\mathrm T}Ah - L(h)\|}{\|h\|}</math> | |||
==Using the chain rule== | ==Using the chain rule== | ||
Revision as of 23:04, 13 July 2018
Let be an by real-valued matrix, and let be defined by . On this page, we calculate the derivative of .
Understanding the problem
Straightforward method
Using the definition of the derivative
The derivative is the linear transformation such that:
Using our function, this is:
Defining , we have and
Focusing on the subexpression , since is a matrix, it is a linear transformation, so we obtain . Since the transpose of a sum is the sum of the transposes, we have . Now using linearity we have .
Now the fraction is
Focusing on , it is a real number so taking the transpose leaves it unchanged: .
Now the fraction is