Derivative of a quadratic form: Difference between revisions
(Created page with "Let <math>A \in \mathcal M_{n,n}(\mathbf R)</math> be an <math>n</math> by <math>n</math> real-valued matrix, and let <math>f\colon \mathbf R^n \to \mathbf R</math> be defined...") |
|||
| Line 6: | Line 6: | ||
==Using the definition of the derivative== | ==Using the definition of the derivative== | ||
The derivative is the linear transformation <math>L</math> such that: | |||
:<math>\lim_{x\to x_0; x\ne x_0} \frac{\|f(x) - (f(x_0) + L(x-x_0))\|}{\|x-x_0\|} = 0</math> | |||
Using our function, this is: | |||
:<math>\lim_{x\to x_0; x\ne x_0} \frac{\|x^{\mathrm T}Ax - x_0^{\mathrm T}Ax_0 - L(x-x_0)\|}{\|x-x_0\|} = 0</math> | |||
Defining <math>h = x-x_0</math>, we have <math>x = x_0 + h</math> and | |||
:<math>\frac{\|(x_0 + h)^{\mathrm T}A(x_0 + h) - x_0^{\mathrm T}Ax_0 - L(h)\|}{\|h\|}</math> | |||
Focusing on the subexpression <math>(x_0 + h)^{\mathrm T}A(x_0 + h)</math>, since <math>A</math> is a matrix, it is a linear transformation, so we obtain <math>(x_0 + h)^{\mathrm T}(Ax_0 + Ah)</math>. Since the transpose of a sum is the sum of the transposes, we have <math>(x_0^{\mathrm T} + h^{\mathrm T})(Ax_0 + Ah)</math>. Now using linearity we have <math>x_0^{\mathrm T}Ax_0 + h^{\mathrm T} Ax_0 + x_0^{\mathrm T} Ah + h^{\mathrm T}Ah</math>. | |||
==Using the chain rule== | ==Using the chain rule== | ||
Revision as of 22:59, 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 .