Derivative of a function with matrices

In summary, it is correct to say that if A is a positive definite matrix, then xTAx is positive for all non-zero x.
  • #1
Leo321
38
0
I try to understand if I am calculating the derivatives correctly or if I do something wrong.
Here is an example:
f(t)=xT*eAt*B*x
t is a scalar, x is a vector, A,B are square matrices.
df/dt=xT*A*eAt*B*x
Is this correct?
 
Physics news on Phys.org
  • #2
And another question:
If I have xTA*x, and x is a non-zero vector, it means that det(A)=0, right?
 
  • #3
The first one,
df/dt=xT*A*eAt*B*x=xT*eAt*A*B*x
is correct.

The second statement, I think you meant
xT*A*x=0 and x nonzero => det(A)=0
and it is NOT correct.

A counter example is
[tex]\begin{gather*}
x = \begin{pmatrix}1\\0\end{pmatrix},
\quad A= \begin{pmatrix}0&1\\1&0\end{pmatrix} \\
\implies
x^{\rm T}Ax = \begin{pmatrix}1&0\end{pmatrix}\begin{pmatrix}0\\1\end{pmatrix} = 0
\quad \text{but}\quad \det A = -1
\end{gather*}[/tex]

What is true, is that if there exists a non-zero x s.t. A*x = 0, then det(A)=0.
 
Last edited:
  • #4
Thanks.
So what does xT*A*x=0 say about A? We can assume that all elements of x are real and non-negative and all elements of A are real.
 
Last edited:
  • #5
I guess that it says that x and Ax are orthogonal...

The rest is for the 2x2 case (which for some reason, I thought you were asking about):

It could be that A is a rotation by 90 or 270 degrees - in which case xTAx is zero for all x. Or A is a reflection about a line 45 degrees from x, which is the case in the example I gave above.

I'm not sure what it says about A if there is a nonzero x such that xTAx=0.
In the case of complex numbers, then I think there always exists an x st xTAx=0. In the real case, I'm not quite sure what it tells you.

Anyway, assume (without loss of generality) that \vec{x} = (x, 1) then http://www.wolframalpha.com/input/?i=Reduce[ForAll[x,+{x,+1}.{{a,+b},+{c,+d}}.{x,+1}!=+0
 
Last edited by a moderator:
  • #6
Leo321 said:
So what does xT*A*x=0 say about A?
In general, other than that x is orthogonal to Ax, not all that much.

On the other hand, if A is a positive definite matrix (all eigenvalues of A are real and positive) then xTAx is positive for all non-zero x.
 
  • #7
Which raises the question about positive definite matrices. Positive definiteness is defined according to Wikipedia for symmetric matrices. I am interested however in the general case, where A is not symmetric. x however contains only non-negative elements, and if we really need, we can assume that all elements of x are positive.
For a symmetric matrix we have relations between the signs of the eigenvalues and the matrix being positive/negative definite. What about this case?
 
Last edited:
  • #8
Simon_Tyler said:
The first one,
df/dt=xT*A*eAt*B*x=xT*eAt*A*B*x
is correct.

Are you absolutely sure this is correct? It seems right to me, but I am getting results, which don't make sense and I can't figure out what do I do wrong.
 
  • #9
It is correct. Since (I assume) x, A and B are t-independent you get
[tex]\begin{align*}
f(t) &:= x^{\rm T} \exp(t A) B x \\
f'(t) &= x^{\rm T} \Big(\frac{\rm d}{{\rm d}t} \exp(t A)\Big) B x
= x^{\rm T} \Big(A \exp(t A)\Big) B x
\end{align*}[/tex]
where the last equality is basically the definition of the matrix exponential.
Then use associativity of matrix multiplication to remove the brackets and you're done.
Also, using the fact that A and exp(t A) commute, you can write
[tex]
f'(t) = x^{\rm T} A \exp(t A) B x = x^{\rm T} \exp(t A) A B x .
[/tex]
 
  • #10
Thanks. There is something else I assumed. Could the problem be there?
Given a matrix A and a vector x, with xTx=1
xTAx[tex]\leq[/tex]max|eigenvalues(A)|
Is this correct?
If it adds anything, we also know that x and A contain only non-negative elements and the eigenvalue with the highest absolute value is real and positive.
 
  • #11
Well, I figured out that my last assumption was wrong. So this is where my error was.
 

Related to Derivative of a function with matrices

What is a derivative of a function with matrices?

A derivative of a function with matrices is a mathematical concept that represents the rate of change of that function with respect to its independent variables, which in this case are matrices. It is a fundamental tool in calculus that allows us to analyze how a function changes over a range of input values.

What is the process for finding the derivative of a function with matrices?

The process for finding the derivative of a function with matrices is similar to finding the derivative of a function with regular variables. We use the rules of matrix calculus, such as the product rule and chain rule, to differentiate each element of the matrix function with respect to its independent variables. The resulting matrix is the derivative of the original function.

Why is the derivative of a function with matrices important?

The derivative of a function with matrices is important because it allows us to analyze the behavior of the function at a specific point and determine its critical points, such as maxima, minima, and inflection points. It also helps in solving optimization problems and understanding the behavior of complex systems.

What are some real-world applications of the derivative of a function with matrices?

The derivative of a function with matrices has numerous applications in fields such as engineering, physics, economics, and computer science. It is used to analyze the stability of control systems, optimize production processes, model financial markets, and develop machine learning algorithms, among others.

Can the derivative of a function with matrices be calculated for any type of matrix?

Yes, the derivative of a function with matrices can be calculated for any type of matrix, including square matrices, rectangular matrices, and even complex matrices. However, the rules of matrix calculus may vary depending on the type of matrix, and some special cases may require additional techniques to find the derivative.

Similar threads

  • Linear and Abstract Algebra
Replies
3
Views
1K
Replies
7
Views
949
  • Linear and Abstract Algebra
Replies
3
Views
2K
  • Linear and Abstract Algebra
Replies
8
Views
1K
  • Linear and Abstract Algebra
Replies
9
Views
2K
  • Linear and Abstract Algebra
Replies
5
Views
1K
  • Special and General Relativity
Replies
6
Views
910
  • Special and General Relativity
Replies
10
Views
1K
  • Linear and Abstract Algebra
Replies
16
Views
1K
  • Calculus and Beyond Homework Help
Replies
23
Views
1K
Back
Top