Derivatives of functions with matrices

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!
 
Back
Top