Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to get the derivative of this convex quadratic

  1. Oct 17, 2011 #1
    [itex]\frac{d}{dx}f(x)=\frac{d}{dx}[ \frac{1}{2}x_{}^{T}Qx-b_{}^{T}x][/itex]

    how to get this derivative, what is the answer? is there textbook describe it?
  2. jcsd
  3. Oct 17, 2011 #2


    User Avatar
    Science Advisor

  4. Oct 23, 2011 #3
    This equation is analogous to a second degree polynomial, so I think the derivative is simply Qx - b.
  5. Oct 24, 2011 #4


    User Avatar
    Science Advisor

    Not quite. Because multiplication of matrices is not commutative, taking the derivative you have to "symmetrize" Q- the derivative is [itex][(Q+Q^T)/2]x- b[/itex].

    Look at the simple two dimensional situation:
    [tex]\frac{1}{2}\begin{bmatrix}x & y \end{bmatrix}\begin{bmatrix}a & b \\ c & d \end{bmatrix}\begin{bmatrix}x \\ y\end{bmatrix}- \begin{bmatrix}e & f\end{bmatrix}\begin{bmatrix}x \\ y\end{bmatrix}[/tex]
    [tex]= \frac{1}{2}ax^2+ \frac{b+ c}{2}xy+ \frac{1}{2}dy^2- ex- ey[/tex]

    The "derivative with respect to x", since x is a vector, is the gradient:
    [tex]\begin{bmatrix}ax+ \frac{b+c}{2}y- e & dy+ \frac{b+c}{2}x- f\end{bmatrix}[/tex]
    [tex]= \begin{bmatrix}a & \frac{b+c}{2} \\ \frac{b+c}{2} & d\end{bmatrix}\begin{bmatrix}x \\ y\end{bmatrix}- \begin{bmatrix}e & f\end{bmatrix}[/tex]
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook