Derivatives of functions with matrices

In summary, the conversation discusses how to calculate derivatives of functions containing matrices. It is mentioned that the ordinary chain rule and product rule can be used, but noncommutativity must be taken into account. Formulas for finding the derivative of matrix-valued functions are also mentioned. However, it is noted that problems can be reduced to those that require no knowledge of matrices.
  • #1
Leo321
38
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 [tex]\frac{dx}{dt}[/tex]. 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 [tex]\frac{d}{dt}Tr(M^kA)[/tex]? Assume M is a function of t and A is constant. Would it be [tex]kTr(M^{k-1}\frac{dM}{dt}A)[/tex], like it would have been for a scalar?
 
Physics news on Phys.org
  • #2
Take as an example k=2. Then

[tex]\frac{d}{dt}M(t)M(t)=\dot{M}M+M\dot{M}[/tex]

If [tex]M[/tex] and [tex]\dot{M}[/tex] 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 [tex]\dot{M}[/tex] at k different plces) and not just one.
 
  • #3
Just write

[tex]\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}[/tex]

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

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

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

What are [tex]a_i[/tex] and [tex]b_i[/tex] on the RHS?
 
  • #5
arkajad said:
What are [tex]a_i[/tex] and [tex]b_i[/tex] 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.
 
  • #6
Your formula gives:

[tex]d/dt (AB)=d/dt(A)B+Ad/dt(B)[/tex] - the Leibniz rule, and only under the trace. The rule is valid also without the trace.
 
  • #7
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.
 
  • #8
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:

[tex]\frac{d}{dt}\exp (At)=A\exp(At)[/tex]

or this:

[tex]\frac{d}{dt}( A(t)^{-1})=-A(t)^{-1}(\frac{d}{dt}A(t))A(t)^{-1}[/tex]

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

[tex]\frac{d}{dt}M(t)M(t)=\dot{M}M+M\dot{M}[/tex]

If [tex]M[/tex] and [tex]\dot{M}[/tex] 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 [tex]\dot{M}[/tex] at k different plces) and not just one.

Thanks!
 

Related to Derivatives of functions with matrices

1. What are derivatives of functions with matrices?

Derivatives of functions with matrices refer to the rate of change of a function that involves matrices as variables. Just like derivatives of functions with scalar variables, derivatives of functions with matrices help us understand how the function changes as its input variables change.

2. How are derivatives of functions with matrices calculated?

Derivatives of functions with matrices are calculated using the same rules of differentiation as scalar functions. However, in the case of matrices, the derivative is a matrix itself, and the rules of matrix algebra must be applied. This process is known as matrix calculus.

3. What is the importance of derivatives of functions with matrices?

Derivatives of functions with matrices are important in many fields of science, such as physics, economics, and engineering. They help us understand how a system changes over time and can be used to optimize functions and make predictions.

4. Can derivatives of functions with matrices be used in real-life applications?

Yes, derivatives of functions with matrices have numerous real-life applications. For example, in economics, they can be used to analyze the relationship between supply and demand, and in physics, they can be used to model the motion of objects in a system.

5. Are there any limitations to using derivatives of functions with matrices?

One limitation of using derivatives of functions with matrices is that they can only be applied to differentiable functions. Additionally, the process of matrix calculus can be more complex and time-consuming compared to calculating derivatives of scalar functions.

Similar threads

Replies
7
Views
921
  • Linear and Abstract Algebra
Replies
8
Views
1K
  • Differential Geometry
Replies
2
Views
685
  • Differential Equations
Replies
5
Views
2K
  • Linear and Abstract Algebra
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
Replies
4
Views
503
Replies
4
Views
1K
Replies
2
Views
284
Replies
19
Views
2K
Back
Top