I have a very complex trace function F ( X ) = Tr &#x2061;<!-- ⁡ --> ( A

Petrovcic2x

Petrovcic2x

Answered question

2022-06-16

I have a very complex trace function F ( X ) = Tr ( A X ( X T X ) 1 X T ). I would like to find the derivative X F ( X ). I do not know how to do it. I checked the matrix cookbook there is nothing similar to this. Please help!

Answer & Explanation

boomzwamhc

boomzwamhc

Beginner2022-06-17Added 17 answers

For typing convenience, define the matrix variable
M = ( X T X ) 1 d M = M ( d X T X + X T d X ) M
and use a colon to denote the Frobenius product, which is a concise notation for the trace
A : B = i = 1 m j = 1 n A i j B i j = Tr ( A T B ) A : A = A F 2
The properties of the underlying trace function allow the terms in a Frobenius product to be rearranged in many different ways, e.g.
A : B = B : A A : B = A T : B T C : ( A B ) = ( C B T ) : A = ( A T C ) : B
Write the cost function using the above notation, and calculate its differential and gradient.
F = A : X M X T d F = A : ( d X M X T + X d M X T + X M d X T ) = A X M : d X + X T A X : d M + A T X M : d X = ( A + A T ) X M : d X X T A X : ( M ( d X T X + X T d X ) M ) = ( A + A T ) X M : d X X M X T ( A + A T ) X M : d X = ( I X M X T ) ( A + A T ) X M : d X F X = ( I X M X T ) ( A + A T ) X M

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Multivariable calculus

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?