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

Matrix Calculus

  1. Feb 27, 2008 #1


    User Avatar
    Homework Helper

    Referring to:


    Is there an easy way to illustrate why the following is true?

    [tex]d(x^TCx) = x^T(C+C^T)dx[/tex]

    My attempt at using the product rule doesn't seem to work:

    [tex]A = x^TC[/tex]

    [tex]B = x[/tex]

    [tex]d(AB) = (dA)B + A(dB) = d(x^TC)x + x^TC[/tex]
    Last edited: Feb 27, 2008
  2. jcsd
  3. Feb 27, 2008 #2
    From your link:

    [tex]d(X^TCX): = (X^TCdX): + (d(X^T) CX): = (I ¤ X^TC) dX: + (X^TC^T ¤ I) dX^T:[/tex]

    Anyway, it looks like they did exactly what you did, except that they didn't set dx to the identity matrix. You are assuming differentiation by dx. This might not be the case. Also notice that (d(X^T) CX) is scaler and thus invariant to the transpose operator. They multiplied this scaler by the identity matrix so adding the two matrices make sense. Anyway, nice link. It is a good reference.
    Last edited: Feb 27, 2008
  4. Feb 28, 2008 #3


    User Avatar
    Homework Helper

    I was just trying to understand why the 2nd item under the heading "Differential of Quadratic Products":

    [tex]d(x^TCx) = x^T(C+C^T)dx = [C=C^T]2x^TCdx[/tex]

    is true. Is there any way to illustrate?

    Assuming the standard product rule is valid, it means:

    [tex]d/dx(x^TCx) = x^TC + (d/dx(x^T))Cx = x^TC + x^TC^T=x^T(C+C^T)[/tex]

    What I don't understand is why:

    [tex](d/dx(x^T))Cx = x^TC^T[/tex]
  5. Feb 29, 2008 #4

    [tex]x^TCdx + (dx)^TCx = x^TC^Tdx + (dx)^TC^Tx[/tex]

    Since they are scalars

    [tex]x^TCdx + \left((dx)^TCx\right)^T = x^TC^Tdx + \left((dx)^TC^Tx\right)^T[/tex]

    [tex]x^TCdx + \left(x^TC^Tdx\right) = x^TC^Tdx + \left(x^TCdx\right)[/tex]

    [tex]x^T\left(C+C^T\right)dx = x^T\left(C^T+C\right)dx[/tex]

    If [tex]C[/tex] is symmetric then that equals [tex]2x^TCdx[/tex]
  6. Mar 2, 2008 #5


    User Avatar
    Homework Helper

    Thanks, I get it now. The key is the fact that the expressions evaluate to scalars. John Creighto mentioned that also. I didn't see that before. Thanks to both of you.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Matrix Calculus