Matrix/Vector Differentiation: Proving the Derivative of x'Mx

In summary, the conversation is about proving the result that the derivative of g(x) = x'Mx, where M is an n-by-n real constant matrix and x' denotes the transpose of vector x, is equal to (M + M')x. The attempt at a solution involved using the product rule, but it was determined that the dimensions of Mx and x'M do not match and cannot be grouped together. The suggestion is to think about indices and the derivative of x'Mx with respect to x_n.
  • #1
wu_weidong
32
0

Homework Statement



Hi all,
I need help proving the result:

Let g(x) = x'Mx, where M is a n-by-n real constant matrix and x' denotes the transpose of vector x. Then the derivative of g(x) = (M + M')x.

The Attempt at a Solution



I was thinking of using product rule on x'(Mx) to get Mx + x'M, but apparently this is incorrect as the dimensions of Mx and x'M don't even match and so cannot be grouped together to get (M + M')x.

Please help.

Thank you.

Regards,
Rayne
 
Physics news on Phys.org
  • #2
Think indices. x'Mx=x_i*M_ik*x_k (summed over i and k). What's the derivative of that wrt, say, x_n?
 

1. What is the difference between a matrix and a vector?

A matrix is a rectangular array of elements, often represented by rows and columns, while a vector is a one-dimensional array of elements. Matrices can contain multiple rows and columns, while vectors only have one row or column.

2. How do you differentiate a matrix or vector?

To differentiate a matrix or vector, each element is differentiated separately, while keeping the rest of the elements constant. This results in a new matrix or vector with the same dimensions as the original.

3. What is the purpose of matrix/vector differentiation?

Matrix/vector differentiation is used in many areas of mathematics and science, including optimization, machine learning, and physics. It allows for the calculation of important quantities such as gradients and Hessians, which can be used to solve complex problems.

4. Can matrix/vector differentiation be used for non-linear functions?

Yes, matrix/vector differentiation can be used for both linear and non-linear functions. For non-linear functions, the differentiation process may involve more complex methods such as the chain rule or partial derivatives.

5. Are there any common mistakes when differentiating matrices or vectors?

One common mistake is forgetting to keep the rest of the elements constant while differentiating each element. Another mistake is incorrectly applying the rules of differentiation, such as the product rule or chain rule. It is important to carefully follow the rules and pay attention to the dimensions of the resulting matrix or vector.

Similar threads

  • Calculus and Beyond Homework Help
Replies
22
Views
2K
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
2
Replies
39
Views
4K
  • Math Proof Training and Practice
2
Replies
69
Views
3K
  • Special and General Relativity
2
Replies
62
Views
3K
  • Calculus and Beyond Homework Help
Replies
4
Views
3K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
Back
Top