Derivative of a quadratic form: Difference between revisions
| Line 11: | Line 11: | ||
:<math>x^{\mathrm T}Ax = x^{\mathrm T}\begin{pmatrix}\sum_{i=1}^n a_{1i}x_i \\ \vdots \\ \sum_{i=1}^n a_{ni}x_i\end{pmatrix} = \sum_{k=1}^n x_k \sum_{i=1}^n a_{ki}x_i</math> | :<math>x^{\mathrm T}Ax = x^{\mathrm T}\begin{pmatrix}\sum_{i=1}^n a_{1i}x_i \\ \vdots \\ \sum_{i=1}^n a_{ni}x_i\end{pmatrix} = \sum_{k=1}^n x_k \sum_{i=1}^n a_{ki}x_i</math> | ||
Now we find the partial derivative of the above with respect to <math>x_j</math>. | Now we find the partial derivative of the above with respect to <math>x_j</math>. To distinguish the constants from the variable, it makes sense to split the sum: | ||
:<math>\sum_{k=1}^n x_k \sum_{i=1}^n a_{ki}x_i = x_j \sum_{i=1}^n a_{ji}x_i + \sum_{k\ne j} x_k \sum_{i=1}^n a_{ki}x_i = x_j\left(a_{jj}x_j + \sum_{i\ne j} a_{ji} x_i\right) + \sum_{k\ne j} x_k \left(a_{kj}x_j + \sum_{i\ne j} a_{ki} x_i\right)</math> | |||
==Using the definition of the derivative== | ==Using the definition of the derivative== | ||
Revision as of 23:39, 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
Let and .
We expand
Now we find the partial derivative of the above with respect to . To distinguish the constants from the variable, it makes sense to split the sum:
Using the definition of the derivative
This is an expanded version of the answer at [1].
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
In the numerator, is a higher order term that will disappear when taking the limit, so the linear transformation we are looking for must be . Since is symmetric, we have and .