How to Derive the Quadratic Form of a Vector Function?

Click For Summary

Discussion Overview

The discussion revolves around deriving the derivative of a vector function in quadratic form, specifically the expression \(\frac {d(\vec{x}^TA\vec{x})} {d\vec{x}}\), where \(\vec{x}\) is a vector and \(A\) is a constant square matrix. Participants explore various mathematical approaches and reasoning related to this derivative, including index notation and dimensional consistency.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant presents a derivation of the derivative of the quadratic form and seeks clarification on a specific transition in the steps.
  • Another participant asserts that \(\frac {d\vec{x}^T}{d\vec{x}}A\vec{x}\) is a scalar quantity, which is challenged by a subsequent participant who argues that it should yield a matrix based on their previous proof.
  • A later reply suggests writing the expression in index notation to clarify the derivation process and highlights the dimensional inconsistency in the original reasoning.
  • Participants discuss the implications of dimensionality and the need to correctly handle the transpose operations in the derivation.

Areas of Agreement / Disagreement

There is no consensus on the nature of \(\frac {d\vec{x}^T}{d\vec{x}}A\vec{x}\) as a scalar or matrix, with participants presenting competing views. The discussion remains unresolved regarding the correctness of the original derivation steps.

Contextual Notes

Participants note potential dimensional inconsistencies in the derivation, particularly in the handling of vector and matrix dimensions during differentiation. The discussion also reflects on the necessity of careful notation and the implications of transposing terms.

Lucid Dreamer
Messages
25
Reaction score
0
Hi,

I am reading through a book called "Matrix Differential Calculus" by Magnus and Neudecker. They go through taking the derivative of a vector in quadratic form that I need help with.

For [itex]\vec{x}[/itex] being a vector and A being a constant square matrix
[tex]\frac {d(\vec{x}^TA\vec{x})} {d\vec{x}}[/tex]
[tex]= \frac {d\vec{x}^T}{d\vec{x}}A\vec{x} + \vec{x}^TA\frac {d\vec{x}}{d\vec{x}}[/tex]
[tex]= (\frac {d\vec{x}^T}{d\vec{x}}A\vec{x})^T + \vec{x}^TA\frac {d\vec{x}}{d\vec{x}} {?}[/tex]
[tex]= \vec{x}^TA^T\frac {d\vec{x}}{d\vec{x}} + \vec{x}^TA\frac {d\vec{x}}{d\vec{x}}[/tex]
[tex]= \vec{x}^T(A+A^T)\frac {d\vec{x}}{d\vec{x}}[/tex]

[tex]\frac {d(\vec{x}^TA\vec{x})} {d\vec{x}}=\vec{x}^T(A+A^T)[/tex]

I don't understand how one can go from the second line to the third line
 
Physics news on Phys.org
It's because [itex]\frac {d\vec{x}^T}{d\vec{x}}A\vec{x}[/itex] is a scalar quantity.
 
b17m4p said:
It's because [itex]\frac {d\vec{x}^T}{d\vec{x}}A\vec{x}[/itex] is a scalar quantity.

I don't see how it is a scalar quantity. We proved that for [itex]\vec{y}=A\vec{x}, \frac {d\vec{y}}{d\vec{x}}=A[/itex] using the definition [itex]\frac {d\vec{y}}{d\vec{x}}=[(\frac {d}{d\vec{x}})^T (\vec{y}^T)]^T[/itex]. This yields a matrix for [itex]\frac {d\vec{y}}{d\vec{x}}[/itex] and does as well for [itex]\frac {d\vec{x}^T}{d\vec{x}}[/itex].

This is the site that I am looking at
http://www.met.rdg.ac.uk/~ross/Documents/VectorDeriv.html
 
Oh, yeah sorry you're right. I don't know what I was thinking.
 
Well you could write it out in index notation

[tex]\frac{\partial}{\partial x_i} \left( x_j x_k A_{jk}\right) = \frac{\partial x_j}{\partial x_i} x_k A_{jk} + x_j\frac{\partial x_k}{x_i} A_{jk}[/tex]
[tex]= \delta_{ji} x_k A_{jk} + x_j \delta_{ki} A_{jk}[/tex]
[tex]= x_k A_{ik} + x_j A_{ji}[/tex]
[tex]= x_k A_{ik} + x_k A_{ki}[/tex]
[tex]= \left( \bf{A} + \bf{A}^T\right)x[/tex]
 
Yeah. that does make sense, thanks. But does anybody know why my original line of thought is wrong?
 
The dimensional inconsistency is really in the second line, where one term is nx1 and the other 1xn. It almost seems to me like you'd have to write
[tex]\frac {d(\vec{x}^TA\vec{x})} {d\vec{x}}[/tex]
[tex]= \frac {d\vec{x}^T}{d\vec{x}}A\vec{x} + \left(\vec{x}^TA\frac {d\vec{x}}{d\vec{x}}\right)^T[/tex]
[tex]= \left((\frac {d\vec{x}^T}{d\vec{x}}A\vec{x})^T + \vec{x}^TA\frac {d\vec{x}}{d\vec{x}}\right)^T[/tex]
[tex]= \left(\vec{x}^TA^T\frac {d\vec{x}}{d\vec{x}} + \vec{x}^TA\frac {d\vec{x}}{d\vec{x}}\right)^T[/tex]
[tex]= \left(\vec{x}^T(A+A^T)\frac {d\vec{x}}{d\vec{x}}\right)^T[/tex]
[tex]= (A + A^T)\vec{x}[/tex]
 

Similar threads

  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
3
Views
4K
Replies
27
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K