Derivatives of functions with matrices

Click For Summary
The discussion focuses on calculating derivatives of functions involving matrices, particularly using the chain rule and product rule. It emphasizes that while the chain rule applies, noncommutativity of matrices must be considered, leading to multiple terms in derivatives of matrix powers. The Leibniz rule for derivatives of products is confirmed to be valid, both under and without the trace operation. Additionally, it is noted that the derivative of a matrix-valued function is simply the matrix of derivatives of its components. Overall, understanding matrix operations is crucial for effectively applying these derivative rules.
Leo321
Messages
38
Reaction score
0
I try to understand how to calculate derivatives of functions, which contain matrices.
For a start I am looking at derivatives by a single variable.
I have x=f(t) and I want to calculate \frac{dx}{dt}. The caveat is that f contains matrices, that depend on t. Can I use the ordinary chain rule and product rule, and if not, then what can I use?
What for example would be \frac{d}{dt}Tr(M^kA)? Assume M is a function of t and A is constant. Would it be kTr(M^{k-1}\frac{dM}{dt}A), like it would have been for a scalar?
 
Physics news on Phys.org
Take as an example k=2. Then

\frac{d}{dt}M(t)M(t)=\dot{M}M+M\dot{M}

If M and \dot{M} do not commute - that is all you can have. If your A does not commute with M and its derivative, then trace will not help.

So, yes, the chain rule applies, but noncommutativity needs to be taken into account, so differentiating M^k you will have k terms (with \dot{M} at k different plces) and not just one.
 
Just write

\operatorname{Tr}(A(t)B(t))=\sum_{i=1}^n(A(t)B(t))_{ii}=\sum_{i=1}^n\sum_{j=1}^n A(t)_{ij} B(t)_{ji}

and use the usual rules on the right-hand side.
 
Last edited:
Fredrik said:
Just write

\operatorname{Tr}(A(t)B(t))=\sum_{i=1}^n a_i(t) b_i(t)

and use the usual rules on the right-hand side.

What are a_i and b_i on the RHS?
 
arkajad said:
What are a_i and b_i on the RHS?
Oops, they were supposed to be the components of the matrices A and B. Total brain fart. They obviously need two indices. I will edit my post right away.

I have edited it now. You may need to refresh the page to see it.
 
Your formula gives:

d/dt (AB)=d/dt(A)B+Ad/dt(B) - the Leibniz rule, and only under the trace. The rule is valid also without the trace.
 
There are two things I think Leo needs to understand here:

1. The derivative of a matrix-valued function defined on a subset of the real numbers is just the matrix of derivatives of the component functions.

2. Matrix multiplication and many other operations (like the trace) are defined using only addition and multiplication of real (or complex) numbers.

These two facts reduce problems of the sort described in #1 to problems that require no knowledge of matrices.
 
Fredrik said:
These two facts reduce problems of the sort described in #1 to problems that require no knowledge of matrices.

Not really. Because we have the following nice formulas like:

\frac{d}{dt}\exp (At)=A\exp(At)

or this:

\frac{d}{dt}( A(t)^{-1})=-A(t)^{-1}(\frac{d}{dt}A(t))A(t)^{-1}

I do not know how you would derive such a formula without knowing about operations with matrices. It would be rather tedious...
 
arkajad said:
Take as an example k=2. Then

\frac{d}{dt}M(t)M(t)=\dot{M}M+M\dot{M}

If M and \dot{M} do not commute - that is all you can have. If your A does not commute with M and its derivative, then trace will not help.

So, yes, the chain rule applies, but noncommutativity needs to be taken into account, so differentiating M^k you will have k terms (with \dot{M} at k different plces) and not just one.

Thanks!
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 27 ·
Replies
27
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 36 ·
2
Replies
36
Views
5K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K