Derivative of a function with matrices

Leo321
Messages
38
Reaction score
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
And another question:
If I have xTA*x, and x is a non-zero vector, it means that det(A)=0, right?
 
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
\begin{gather*}<br /> x = \begin{pmatrix}1\\0\end{pmatrix},<br /> \quad A= \begin{pmatrix}0&amp;1\\1&amp;0\end{pmatrix} \\<br /> \implies <br /> x^{\rm T}Ax = \begin{pmatrix}1&amp;0\end{pmatrix}\begin{pmatrix}0\\1\end{pmatrix} = 0<br /> \quad \text{but}\quad \det A = -1<br /> \end{gather*}

What is true, is that if there exists a non-zero x s.t. A*x = 0, then det(A)=0.
 
Last edited:
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:
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:
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.
 
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:
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.
 
It is correct. Since (I assume) x, A and B are t-independent you get
\begin{align*}<br /> f(t) &amp;:= x^{\rm T} \exp(t A) B x \\<br /> f&#039;(t) &amp;= x^{\rm T} \Big(\frac{\rm d}{{\rm d}t} \exp(t A)\Big) B x <br /> = x^{\rm T} \Big(A \exp(t A)\Big) B x <br /> \end{align*}
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
<br /> f&#039;(t) = x^{\rm T} A \exp(t A) B x = x^{\rm T} \exp(t A) A B x .<br />
 
  • #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\leqmax|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.
 

Similar threads

Replies
3
Views
2K
Replies
4
Views
2K
Replies
9
Views
2K
Replies
8
Views
2K
Replies
5
Views
2K
Replies
8
Views
7K
Back
Top