# Second derivative of a complex matrix

• A
idmena
Hi all

I am trying to reproduce some results from a paper, but I'm not sure how to proceed. I have the following: ##\phi## is a complex matrix and can be decomposed into real and imaginary parts:
$$\phi=\frac{\phi_R +i\phi_I}{\sqrt{2}}$$
so that
$$\phi^\dagger\phi=\frac{\phi_R^2 +\phi_I^2}{2}$$
Using this matrix I can construct invariants like:
$$Tr(\phi^\dagger\phi)\\ Tr\left(\phi^\dagger\phi\phi^\dagger\phi\right)\\ Tr(\phi^\dagger\phi)Tr(\phi^\dagger\phi)$$
and so on. I am interested in the second derivative of this invariants for a specific configuration, where ##\phi## is diagonal and real. I am having trouble with the second one, I hope you can help me.

First I have the derivative with respect to the real part:
$$\frac{\delta}{\delta\phi_{Rcd}} Tr\left(\phi^\dagger\phi\phi^\dagger\phi\right) = Tr\left(2\phi_{Rcd}\,\phi^\dagger\phi\right)$$
For the case that ##\phi## is real, ##\phi_I = 0## and ##\phi_R \to \sqrt{2}\phi##. Now, writing down the indices I have been omitting, we have:
$$= 2\sqrt{2}Tr\left(\phi_{cd}\phi_{xy}\phi_{xy}\right)\\ = 2\sqrt{2}\delta_y^c\delta_d^x\delta_x^y\phi_{cd}\phi_{xy}\phi_{xy}\\ = 2\sqrt{2}\delta_d^c\,\phi_{cd}^3$$
where in the second line I used the trace operator to contract the indices. This result matches the paper I am reproducing.

Now, for the second derivative I have:
$$\frac{\delta}{\delta\phi_{Rab}\delta\phi_{Rcd}} Tr\left(\phi^\dagger\phi\phi^\dagger\phi\right) = \frac{\delta}{\delta\phi_{Rcd}}Tr\left(2\phi_{Rcd}\,\phi^\dagger\phi\right) = 2\,Tr\left(\delta_c^a\delta_d^b\,\phi^\dagger\phi +\phi_{Rcd}\,\phi_{Rab}\right)$$
I am unsure on how to treat the first term here. Writing down the indices explicitly like I did before, I have:
$$Tr\left(\delta_c^a\delta_d^b\,\phi^\dagger\phi\right) = Tr\left(\delta_c^a\delta_d^b\,\phi_{xy}\phi_{xy}\right)$$
I know the trace contracts the outer indices, but how do I treat the deltas? Which indices are contracting with which in this case?
Simplifying the second term yields:
$$=2\,Tr\left(\delta_c^a\delta_d^b\,\phi^\dagger\phi\right) +2\delta_d^a \delta_c^b \,\phi_{Rba}\,\phi_{Rab}\\ =2\,Tr\left(\delta_c^a\delta_d^b\,\phi^\dagger\phi\right) +4\delta_d^a \delta_c^b \,\phi_{ba}\,\phi_{ab}$$
where in the second line I assumed that ##\phi## is real and swapped ##\phi_R \to \sqrt{2}\phi##
I was supposed to get:
$$=2\delta_c^a\delta_d^b \left(\phi_a^2 +\phi_b^2\right) +2\delta_d^a\delta_c^b \phi_a \phi_b$$

Where do the two ##\phi_a^2 +\phi_b^2## come from? And how come I got a factor of 2 extra in the second term?
Can anyone help me on how to fill the gap?

Thank you all very much!

Homework Helper
Gold Member
Where did you get the following equation?
$$\phi^\dagger\phi=\frac{\phi_R^2 +\phi_I^2}{2}$$
I am not aware of any such identity, and when I choose an arbitrary matrix ##\phi## and calculate the two sides of the equality, they do not match:

Code:
Code:
Phi_real <- matrix(1:4, ncol=2) / sqrt(2)
Phi_Im <- matrix(8:5, ncol=2) / sqrt(2)
Phi <- Phi_real + (0+1i) * Phi_Im
# calculate left side of equation
Conj(t(Phi)) %*% Phi
# calculate right side of equation
(Phi_real %*% Phi_real + Phi_Im %*% Phi_Im) / 2
Results:
Code:
> # calculate left side of equation
> Conj(t(Phi)) %*% Phi
[,1]   [,2]
[1,] 59+ 0i 47-18i
[2,] 47+18i 43+ 0i
> # calculate right side of equation
> (Phi_real %*% Phi_real + Phi_Im %*% Phi_Im) / 2
[,1]  [,2]
[1,] 28.25 23.25
[2,] 25.25 22.25

Also, your use of Einstein Summation Notation is unfamiliar to me. As I was taught it, one only implicitly sums matching indices when one index is up and one index is down, not when both are at the same level. Further, even if one drops the 'different levels' requirement, the expression ##\delta^c_d\, \phi_{cd}^3## does not appear to validly imply a summation as it has a total of four c's and four d's. I suspect some of the later problems may relate to invalid use of implicit summation, but I cannot be sure without better understanding your intention. When in doubt, it's best to write out summation explicitly, to avoid invalid steps.

• FactChecker
idmena

You are right, I should've written the summation explicitly, I now realize I was making mistakes due to being confused by my own notation.

I am not aware of any such identity, and when I choose an arbitrary matrix ##\phi## and calculate the two sides of the equality, they do not match:

Sorry about that, since I am always taking the trace of the invariants, the identity I mean to write was:
$$Tr\left(\phi^\dagger\phi\right) = \left(\phi^\dagger\phi\right)_{ii} = \frac{\left(\phi_{Rij}\right)^\dagger\phi_{Rji} + \left(\phi_{Iij}\right)^\dagger\phi_{Iji}}{2} = \frac{\phi_{Rji}^2 +\phi_{Iji}^2}{2}$$

Also, your use of Einstein Summation Notation is unfamiliar to me. As I was taught it, one only implicitly sums matching indices when one index is up and one index is down, not when both are at the same level. Further, even if one drops the 'different levels' requirement, the expression ##\delta^c_d\, \phi_{cd}^3## does not appear to validly imply a summation as it has a total of four c's and four d's. I suspect some of the later problems may relate to invalid use of implicit summation, but I cannot be sure without better understanding your intention. When in doubt, it's best to write out summation explicitly, to avoid invalid steps.

Sure, the correct way is to match up and down indices, I agree. In this case I was just using the indices to refer to elements of the matrix, in which case I'm used to writing everything downstairs (e.g. ##\left(AB\right)_{ij} = A_{ik}B_{kj}##). For the case of ##\phi_{cd}^3## I was referring to the third power of the (c,d) element of ##\phi## (where the entries of ##\phi## are scalars).

I have written down all indices explicitly and realized where my mistakes were, I got the right results now.