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

Gradient function using matrix notation

  1. Mar 13, 2010 #1

    hotvette

    User Avatar
    Homework Helper

    I think I'm having a brain freeze. I'm trying to determine grad f where f(x) = 1/2 xTQx + qTx. I can get to the point where df = (xTQ + qT)dx, but I don't know how to get to the final result grad f = Qx + q.

    Can someone explain it?
     
    Last edited: Mar 13, 2010
  2. jcsd
  3. Mar 14, 2010 #2

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    hi hotvette! :smile:

    Hint: use xTQx = ∑ij Qijxixj, qTx = ∑i qixi :wink:
     
  4. Mar 14, 2010 #3

    quasar987

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    What is df = (xTQ + qT)dx supposed to mean?

    Using the definition of the derivative Df, I calculated that the matrix of Df (that is, grad(f)) is, is ½(Qx+xQ)+q. If Q is a symmetric matrix, then xQ=Qx and we find your result grad(f)=Qx+q.
     
  5. Mar 14, 2010 #4

    hotvette

    User Avatar
    Homework Helper

    tiny-tim and quasar987,

    Thanks for your replies. The calculus classes I had (l-o-n-g time a go) never used matrix notation, so I'm trying to learn it on my own. I've been using this:

    http://www.ee.ic.ac.uk/hp/staff/dmb/matrix/calculus.html#deriv_linear

    as a guide and was following the terminology in the link. I'm treating dx as a vector quantity (e.g. dx = [dx1, dx2, ..., dxn]T). I'm just having a hard time deriving the expression for grad f based on the info in the link. Also, sorry, but I don't see where the sum notation leads.
     
  6. Mar 15, 2010 #5

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    hi hotvette! :smile:
    eugh! :yuck: I've never come across that terminology before, and I find it really confusing.

    Personally, I'd use some other book.

    What do you think, quasar987? :smile:
     
  7. Mar 15, 2010 #6

    hotvette

    User Avatar
    Homework Helper

    I don't follow it very well either. I'd be delighted to use an understandable alternative. Are there any online references you'd recommend?
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook