Complex scalar derivative of trace of complex matrices $frac{d}{d z} Tr[A U(z) B U^H(z)] $












1












$begingroup$


I'm trying to numerically find the maximum of
$$
f(z) = Tr[ A;U B; U^H], quad U=U(z,z^*),\
A,B,Uinmathbb{C}^{ntimes n},;;
A=A^H, quad B=B^H
$$

using gradient descent(ascent) w.r.t. $z in {C}$.
As I understand, I have to use gradient scheme
$z_{n+1} = z_n + eta;2 frac{partial f(z,z^*)}{partial z^*}$,
so I have to calculate the derivative $ frac{partial f(z,z^*)}{partial z^*}$. Here is calculation:
$$begin{align}
&dTr[ A; U B; U^H] \
&= Tr[ B; U^H A; color{red}{dU } ] + Tr[ B^T U^T A^T color{blue}{dU^*}] \
&left< X:= B; U^H A right>\
&= Tr[ X;; (U'_z;; color{red}{dz} + U'_{z^*};;color{blue}{dz^*}) ] \
&+ Tr[ X^* ({U^*}'_z color{red}{dz} + {U^*}'_{z^*} color{blue}{dz^*})] \
& left< text{using } {f^*}'_z = (f'_{z^*})^*text{ and } {f^*}'_{z^*} = (f'_z)^* right>
\
&= Tr[ X ;;; (U'_z quad color{red}{dz} + U'_{z^*}quad color{blue}{dz^*}) ] \
&+ Tr[ X^* ( (U'_{z^*})^* color{red}{dz} + (U'_z)^* color{blue}{dz^*})]
end{align}$$

Denote $U'_z = V,;; U'_{z^*} = W$. Then
$$begin{align}
dTr
&= Tr[ X ; V + X^* W^*] color{red}{dz} \
&+ Tr[ X ; W + X^* V^*] color{blue}{dz^*}
end{align}$$

Finally $ frac{partial f}{partial z^*} = Tr[ B; U^H A; W] + Tr[B; U^H A; V]^* $



Am I correct? I'm pretty unsure here, because I've never studied matrix or Wirtinger calculus.



(U(z) is squeeze operator here, if you are interested:)










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    You have changed the order of the arguments to the trace function in a non-cyclical manner. In your equation defining $f(z)$ the product order is $(AU^HBU)$, but in the differential expression the order is $(AUBU^H)$. The traces of these two products are not equal (unless $U$ is hermitian).
    $endgroup$
    – greg
    Jan 9 at 6:55












  • $begingroup$
    @greg, yes, thanks. This was a typo, my fucntion is $Tr[AUBU^H]$. Fixed. Now everything seems correct(?).
    $endgroup$
    – Mike_
    Jan 9 at 14:59






  • 1




    $begingroup$
    Okay, now everything looks right.
    $endgroup$
    – greg
    Jan 9 at 17:31










  • $begingroup$
    I have looked through you other answers and trust you. Unfortunately, I have no other sources of verification right now, so thank you with this "confidence-request" question! How do you think, should I answer to my question in order to mark it as solved somehow?
    $endgroup$
    – Mike_
    Jan 10 at 4:38








  • 1




    $begingroup$
    Your question is of a type that invites either a "yes" or "no" response, and such responses typically take the form of a comment. And that's okay. Had your solution been wrong then someone would write an answer containing the correct solution, and you could accept it.
    $endgroup$
    – greg
    Jan 11 at 2:06
















1












$begingroup$


I'm trying to numerically find the maximum of
$$
f(z) = Tr[ A;U B; U^H], quad U=U(z,z^*),\
A,B,Uinmathbb{C}^{ntimes n},;;
A=A^H, quad B=B^H
$$

using gradient descent(ascent) w.r.t. $z in {C}$.
As I understand, I have to use gradient scheme
$z_{n+1} = z_n + eta;2 frac{partial f(z,z^*)}{partial z^*}$,
so I have to calculate the derivative $ frac{partial f(z,z^*)}{partial z^*}$. Here is calculation:
$$begin{align}
&dTr[ A; U B; U^H] \
&= Tr[ B; U^H A; color{red}{dU } ] + Tr[ B^T U^T A^T color{blue}{dU^*}] \
&left< X:= B; U^H A right>\
&= Tr[ X;; (U'_z;; color{red}{dz} + U'_{z^*};;color{blue}{dz^*}) ] \
&+ Tr[ X^* ({U^*}'_z color{red}{dz} + {U^*}'_{z^*} color{blue}{dz^*})] \
& left< text{using } {f^*}'_z = (f'_{z^*})^*text{ and } {f^*}'_{z^*} = (f'_z)^* right>
\
&= Tr[ X ;;; (U'_z quad color{red}{dz} + U'_{z^*}quad color{blue}{dz^*}) ] \
&+ Tr[ X^* ( (U'_{z^*})^* color{red}{dz} + (U'_z)^* color{blue}{dz^*})]
end{align}$$

Denote $U'_z = V,;; U'_{z^*} = W$. Then
$$begin{align}
dTr
&= Tr[ X ; V + X^* W^*] color{red}{dz} \
&+ Tr[ X ; W + X^* V^*] color{blue}{dz^*}
end{align}$$

Finally $ frac{partial f}{partial z^*} = Tr[ B; U^H A; W] + Tr[B; U^H A; V]^* $



Am I correct? I'm pretty unsure here, because I've never studied matrix or Wirtinger calculus.



(U(z) is squeeze operator here, if you are interested:)










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    You have changed the order of the arguments to the trace function in a non-cyclical manner. In your equation defining $f(z)$ the product order is $(AU^HBU)$, but in the differential expression the order is $(AUBU^H)$. The traces of these two products are not equal (unless $U$ is hermitian).
    $endgroup$
    – greg
    Jan 9 at 6:55












  • $begingroup$
    @greg, yes, thanks. This was a typo, my fucntion is $Tr[AUBU^H]$. Fixed. Now everything seems correct(?).
    $endgroup$
    – Mike_
    Jan 9 at 14:59






  • 1




    $begingroup$
    Okay, now everything looks right.
    $endgroup$
    – greg
    Jan 9 at 17:31










  • $begingroup$
    I have looked through you other answers and trust you. Unfortunately, I have no other sources of verification right now, so thank you with this "confidence-request" question! How do you think, should I answer to my question in order to mark it as solved somehow?
    $endgroup$
    – Mike_
    Jan 10 at 4:38








  • 1




    $begingroup$
    Your question is of a type that invites either a "yes" or "no" response, and such responses typically take the form of a comment. And that's okay. Had your solution been wrong then someone would write an answer containing the correct solution, and you could accept it.
    $endgroup$
    – greg
    Jan 11 at 2:06














1












1








1





$begingroup$


I'm trying to numerically find the maximum of
$$
f(z) = Tr[ A;U B; U^H], quad U=U(z,z^*),\
A,B,Uinmathbb{C}^{ntimes n},;;
A=A^H, quad B=B^H
$$

using gradient descent(ascent) w.r.t. $z in {C}$.
As I understand, I have to use gradient scheme
$z_{n+1} = z_n + eta;2 frac{partial f(z,z^*)}{partial z^*}$,
so I have to calculate the derivative $ frac{partial f(z,z^*)}{partial z^*}$. Here is calculation:
$$begin{align}
&dTr[ A; U B; U^H] \
&= Tr[ B; U^H A; color{red}{dU } ] + Tr[ B^T U^T A^T color{blue}{dU^*}] \
&left< X:= B; U^H A right>\
&= Tr[ X;; (U'_z;; color{red}{dz} + U'_{z^*};;color{blue}{dz^*}) ] \
&+ Tr[ X^* ({U^*}'_z color{red}{dz} + {U^*}'_{z^*} color{blue}{dz^*})] \
& left< text{using } {f^*}'_z = (f'_{z^*})^*text{ and } {f^*}'_{z^*} = (f'_z)^* right>
\
&= Tr[ X ;;; (U'_z quad color{red}{dz} + U'_{z^*}quad color{blue}{dz^*}) ] \
&+ Tr[ X^* ( (U'_{z^*})^* color{red}{dz} + (U'_z)^* color{blue}{dz^*})]
end{align}$$

Denote $U'_z = V,;; U'_{z^*} = W$. Then
$$begin{align}
dTr
&= Tr[ X ; V + X^* W^*] color{red}{dz} \
&+ Tr[ X ; W + X^* V^*] color{blue}{dz^*}
end{align}$$

Finally $ frac{partial f}{partial z^*} = Tr[ B; U^H A; W] + Tr[B; U^H A; V]^* $



Am I correct? I'm pretty unsure here, because I've never studied matrix or Wirtinger calculus.



(U(z) is squeeze operator here, if you are interested:)










share|cite|improve this question











$endgroup$




I'm trying to numerically find the maximum of
$$
f(z) = Tr[ A;U B; U^H], quad U=U(z,z^*),\
A,B,Uinmathbb{C}^{ntimes n},;;
A=A^H, quad B=B^H
$$

using gradient descent(ascent) w.r.t. $z in {C}$.
As I understand, I have to use gradient scheme
$z_{n+1} = z_n + eta;2 frac{partial f(z,z^*)}{partial z^*}$,
so I have to calculate the derivative $ frac{partial f(z,z^*)}{partial z^*}$. Here is calculation:
$$begin{align}
&dTr[ A; U B; U^H] \
&= Tr[ B; U^H A; color{red}{dU } ] + Tr[ B^T U^T A^T color{blue}{dU^*}] \
&left< X:= B; U^H A right>\
&= Tr[ X;; (U'_z;; color{red}{dz} + U'_{z^*};;color{blue}{dz^*}) ] \
&+ Tr[ X^* ({U^*}'_z color{red}{dz} + {U^*}'_{z^*} color{blue}{dz^*})] \
& left< text{using } {f^*}'_z = (f'_{z^*})^*text{ and } {f^*}'_{z^*} = (f'_z)^* right>
\
&= Tr[ X ;;; (U'_z quad color{red}{dz} + U'_{z^*}quad color{blue}{dz^*}) ] \
&+ Tr[ X^* ( (U'_{z^*})^* color{red}{dz} + (U'_z)^* color{blue}{dz^*})]
end{align}$$

Denote $U'_z = V,;; U'_{z^*} = W$. Then
$$begin{align}
dTr
&= Tr[ X ; V + X^* W^*] color{red}{dz} \
&+ Tr[ X ; W + X^* V^*] color{blue}{dz^*}
end{align}$$

Finally $ frac{partial f}{partial z^*} = Tr[ B; U^H A; W] + Tr[B; U^H A; V]^* $



Am I correct? I'm pretty unsure here, because I've never studied matrix or Wirtinger calculus.



(U(z) is squeeze operator here, if you are interested:)







complex-analysis matrix-calculus gradient-descent






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 9 at 15:35







Mike_

















asked Jan 8 at 23:19









Mike_Mike_

616




616








  • 1




    $begingroup$
    You have changed the order of the arguments to the trace function in a non-cyclical manner. In your equation defining $f(z)$ the product order is $(AU^HBU)$, but in the differential expression the order is $(AUBU^H)$. The traces of these two products are not equal (unless $U$ is hermitian).
    $endgroup$
    – greg
    Jan 9 at 6:55












  • $begingroup$
    @greg, yes, thanks. This was a typo, my fucntion is $Tr[AUBU^H]$. Fixed. Now everything seems correct(?).
    $endgroup$
    – Mike_
    Jan 9 at 14:59






  • 1




    $begingroup$
    Okay, now everything looks right.
    $endgroup$
    – greg
    Jan 9 at 17:31










  • $begingroup$
    I have looked through you other answers and trust you. Unfortunately, I have no other sources of verification right now, so thank you with this "confidence-request" question! How do you think, should I answer to my question in order to mark it as solved somehow?
    $endgroup$
    – Mike_
    Jan 10 at 4:38








  • 1




    $begingroup$
    Your question is of a type that invites either a "yes" or "no" response, and such responses typically take the form of a comment. And that's okay. Had your solution been wrong then someone would write an answer containing the correct solution, and you could accept it.
    $endgroup$
    – greg
    Jan 11 at 2:06














  • 1




    $begingroup$
    You have changed the order of the arguments to the trace function in a non-cyclical manner. In your equation defining $f(z)$ the product order is $(AU^HBU)$, but in the differential expression the order is $(AUBU^H)$. The traces of these two products are not equal (unless $U$ is hermitian).
    $endgroup$
    – greg
    Jan 9 at 6:55












  • $begingroup$
    @greg, yes, thanks. This was a typo, my fucntion is $Tr[AUBU^H]$. Fixed. Now everything seems correct(?).
    $endgroup$
    – Mike_
    Jan 9 at 14:59






  • 1




    $begingroup$
    Okay, now everything looks right.
    $endgroup$
    – greg
    Jan 9 at 17:31










  • $begingroup$
    I have looked through you other answers and trust you. Unfortunately, I have no other sources of verification right now, so thank you with this "confidence-request" question! How do you think, should I answer to my question in order to mark it as solved somehow?
    $endgroup$
    – Mike_
    Jan 10 at 4:38








  • 1




    $begingroup$
    Your question is of a type that invites either a "yes" or "no" response, and such responses typically take the form of a comment. And that's okay. Had your solution been wrong then someone would write an answer containing the correct solution, and you could accept it.
    $endgroup$
    – greg
    Jan 11 at 2:06








1




1




$begingroup$
You have changed the order of the arguments to the trace function in a non-cyclical manner. In your equation defining $f(z)$ the product order is $(AU^HBU)$, but in the differential expression the order is $(AUBU^H)$. The traces of these two products are not equal (unless $U$ is hermitian).
$endgroup$
– greg
Jan 9 at 6:55






$begingroup$
You have changed the order of the arguments to the trace function in a non-cyclical manner. In your equation defining $f(z)$ the product order is $(AU^HBU)$, but in the differential expression the order is $(AUBU^H)$. The traces of these two products are not equal (unless $U$ is hermitian).
$endgroup$
– greg
Jan 9 at 6:55














$begingroup$
@greg, yes, thanks. This was a typo, my fucntion is $Tr[AUBU^H]$. Fixed. Now everything seems correct(?).
$endgroup$
– Mike_
Jan 9 at 14:59




$begingroup$
@greg, yes, thanks. This was a typo, my fucntion is $Tr[AUBU^H]$. Fixed. Now everything seems correct(?).
$endgroup$
– Mike_
Jan 9 at 14:59




1




1




$begingroup$
Okay, now everything looks right.
$endgroup$
– greg
Jan 9 at 17:31




$begingroup$
Okay, now everything looks right.
$endgroup$
– greg
Jan 9 at 17:31












$begingroup$
I have looked through you other answers and trust you. Unfortunately, I have no other sources of verification right now, so thank you with this "confidence-request" question! How do you think, should I answer to my question in order to mark it as solved somehow?
$endgroup$
– Mike_
Jan 10 at 4:38






$begingroup$
I have looked through you other answers and trust you. Unfortunately, I have no other sources of verification right now, so thank you with this "confidence-request" question! How do you think, should I answer to my question in order to mark it as solved somehow?
$endgroup$
– Mike_
Jan 10 at 4:38






1




1




$begingroup$
Your question is of a type that invites either a "yes" or "no" response, and such responses typically take the form of a comment. And that's okay. Had your solution been wrong then someone would write an answer containing the correct solution, and you could accept it.
$endgroup$
– greg
Jan 11 at 2:06




$begingroup$
Your question is of a type that invites either a "yes" or "no" response, and such responses typically take the form of a comment. And that's okay. Had your solution been wrong then someone would write an answer containing the correct solution, and you could accept it.
$endgroup$
– greg
Jan 11 at 2:06










0






active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3066854%2fcomplex-scalar-derivative-of-trace-of-complex-matrices-fracdd-z-tra-uz%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3066854%2fcomplex-scalar-derivative-of-trace-of-complex-matrices-fracdd-z-tra-uz%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

張江高科駅