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

Homework Help: Linear Algebra

  1. Oct 11, 2008 #1
    1. The problem statement, all variables and given/known data
    f(x)=(1/2)*(x^T)*(A)*(x)-(x^T)*(b)

    Show that the gradient of f(x) is (1/2)*[((A^T)+A)*x]-(b)

    where x^transpose is transpose of x and A^transpose is transpose of A.

    Note: A is real matrix n*n and b is a column matrix n


    2. Relevant equations



    3. The attempt at a solution
    I need to kinda proof that.
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
  3. Oct 11, 2008 #2

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Write it in index notation. (1/2)*x_i*A_ij*x_j+x_i*b_i. All indices summed. Now dx_i/dx_k=delta(i,k). You kinda knew that, right? Use the product rule on the A part.
     
  4. Oct 11, 2008 #3
    All indices summed. Now dx_i/dx_k=delta(i,k).

    what do you mean by that?
     
  5. Oct 11, 2008 #4

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Can you write it in index notation? By dx_i/dx_k=delta(i,k) I mean the derivative is 1 if i=k and 0 if i is not equal k.
     
  6. Oct 11, 2008 #5
    I think that I may be able to make the function into index notation form.
    If I make the equation to be (1/2)*x_i*A_ij*x_j+x_i*b_i, I then take the derivative respect with x_k? How this will work?
    If k=i, after taking the derivative the equation will become (1/2)*1*A_ij*x_j+1*b_i. What I will have to do for the A_ij? I have not learned how to do the product rule of a matrix yet.
    Will k=i and j so that I will have to do 2 derivative of i and j? if so how this works?
     
  7. Oct 11, 2008 #6

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    You don't have a matrix anymore once you indexed everything out. There are two x's on the first term one on the right and one on the left which is why you are getting A+A^T.
     
  8. Oct 12, 2008 #7
    would you mind to show me the steps to get from f(x)=(1/2)*(x^T)*(A)*(x)-(x^T)*(b) to (1/2)*[((A^T)+A)*x]-(b).

    I did a lot of research about this problem these days. I found a relation: D[f(x)^Tg(x)] = g(x)^Tf'(x) + f(x)^Tg'(x). however i am not convinced. I am sorry this is the first time i do this kinda proof. I can't handle it.
     
  9. Oct 12, 2008 #8

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    I can't do that until you at least make a try at the problem. I've told you what to do. The gradient of f(x) is the vector (df(x)/dx_1,df(x)/dx_2,...df(x)/dx_n). Write out the expression as a summation over indices and take d/dx_k of it.
     
  10. Oct 12, 2008 #9
    hi dick thankz i think that i got it YEAH! XD

    I have another question if i want to find all the matrices for X that satisfies this equation A*X*B^T = C. How should I deal with this problem? should i also make that into index notation?

    B^T is the transpose of B.
     
  11. Oct 12, 2008 #10

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Are A or B invertible?
     
  12. Oct 12, 2008 #11
    It doesn't really say. This is the original question:
    Find all matrices X that satisfy the equation A*X*B^T = C, in terms of the LU
    factorizations of A and B. State the precise conditions under which there are no
    solutions.
     
  13. Oct 12, 2008 #12

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    I'm really not an expert on LU factorization stuff. I think you should post this in a new thread so other people can take a crack at it.
     
  14. Oct 12, 2008 #13
    Thanks Man anyway. You are my big help.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook