Derivative of scalar functions of matrix with respect to trace
$begingroup$
Perhaps this is easy, but I am confused about how do I systematically go about computing the following two derivatives:
$displaystylefrac{partialtext{tr}(PQ^{-1})}{partialtext{trace}(P)}$, and $displaystylefrac{partiallogtext{det}(P)}{partialtext{trace}(P)}$.
Both $P$ and $Q$ are $ntimes n$ real symmetric positive definite matrices. Clearly, being derivative of a scalar w.r.t. a scalar, the answers are scalars. For the second, I know $logtext{det}(P) = text{trace}(log(P))$, but not sure how to utilize it.
linear-algebra matrices matrix-calculus
$endgroup$
add a comment |
$begingroup$
Perhaps this is easy, but I am confused about how do I systematically go about computing the following two derivatives:
$displaystylefrac{partialtext{tr}(PQ^{-1})}{partialtext{trace}(P)}$, and $displaystylefrac{partiallogtext{det}(P)}{partialtext{trace}(P)}$.
Both $P$ and $Q$ are $ntimes n$ real symmetric positive definite matrices. Clearly, being derivative of a scalar w.r.t. a scalar, the answers are scalars. For the second, I know $logtext{det}(P) = text{trace}(log(P))$, but not sure how to utilize it.
linear-algebra matrices matrix-calculus
$endgroup$
$begingroup$
The problem is these are true partial derivatives. That means they are not defined strictly by the function on the bottom, but rather by an entire coordinate system. Different choices for the other coordinates will give different values for these partial derivatives. But all we have been given here is that one coordinate is $operatorname{tr}(P)$. We are not told what the other coordinates should be. Presumably we can treat $Q$ as a constant, but $P$ depends on $n choose 2$ independent variables, so which ones should we pick as the other ${n choose 2}-1$? Was there more information given?
$endgroup$
– Paul Sinclair
Mar 1 '17 at 0:30
$begingroup$
Unfortunately, I do not have more information. You are right though that $Q$ can be treated as constant.
$endgroup$
– Abhishek Halder
Mar 1 '17 at 3:10
$begingroup$
Then unfortunately, your question admits of no answer. The partial derivatives are not fully defined, so you cannot calculate them. If someone provides you with a calculation for them, they will either explicitly or implicitly have made an assumption about what the other coordinates are.
$endgroup$
– Paul Sinclair
Mar 1 '17 at 3:40
add a comment |
$begingroup$
Perhaps this is easy, but I am confused about how do I systematically go about computing the following two derivatives:
$displaystylefrac{partialtext{tr}(PQ^{-1})}{partialtext{trace}(P)}$, and $displaystylefrac{partiallogtext{det}(P)}{partialtext{trace}(P)}$.
Both $P$ and $Q$ are $ntimes n$ real symmetric positive definite matrices. Clearly, being derivative of a scalar w.r.t. a scalar, the answers are scalars. For the second, I know $logtext{det}(P) = text{trace}(log(P))$, but not sure how to utilize it.
linear-algebra matrices matrix-calculus
$endgroup$
Perhaps this is easy, but I am confused about how do I systematically go about computing the following two derivatives:
$displaystylefrac{partialtext{tr}(PQ^{-1})}{partialtext{trace}(P)}$, and $displaystylefrac{partiallogtext{det}(P)}{partialtext{trace}(P)}$.
Both $P$ and $Q$ are $ntimes n$ real symmetric positive definite matrices. Clearly, being derivative of a scalar w.r.t. a scalar, the answers are scalars. For the second, I know $logtext{det}(P) = text{trace}(log(P))$, but not sure how to utilize it.
linear-algebra matrices matrix-calculus
linear-algebra matrices matrix-calculus
asked Feb 28 '17 at 22:02
Abhishek HalderAbhishek Halder
465412
465412
$begingroup$
The problem is these are true partial derivatives. That means they are not defined strictly by the function on the bottom, but rather by an entire coordinate system. Different choices for the other coordinates will give different values for these partial derivatives. But all we have been given here is that one coordinate is $operatorname{tr}(P)$. We are not told what the other coordinates should be. Presumably we can treat $Q$ as a constant, but $P$ depends on $n choose 2$ independent variables, so which ones should we pick as the other ${n choose 2}-1$? Was there more information given?
$endgroup$
– Paul Sinclair
Mar 1 '17 at 0:30
$begingroup$
Unfortunately, I do not have more information. You are right though that $Q$ can be treated as constant.
$endgroup$
– Abhishek Halder
Mar 1 '17 at 3:10
$begingroup$
Then unfortunately, your question admits of no answer. The partial derivatives are not fully defined, so you cannot calculate them. If someone provides you with a calculation for them, they will either explicitly or implicitly have made an assumption about what the other coordinates are.
$endgroup$
– Paul Sinclair
Mar 1 '17 at 3:40
add a comment |
$begingroup$
The problem is these are true partial derivatives. That means they are not defined strictly by the function on the bottom, but rather by an entire coordinate system. Different choices for the other coordinates will give different values for these partial derivatives. But all we have been given here is that one coordinate is $operatorname{tr}(P)$. We are not told what the other coordinates should be. Presumably we can treat $Q$ as a constant, but $P$ depends on $n choose 2$ independent variables, so which ones should we pick as the other ${n choose 2}-1$? Was there more information given?
$endgroup$
– Paul Sinclair
Mar 1 '17 at 0:30
$begingroup$
Unfortunately, I do not have more information. You are right though that $Q$ can be treated as constant.
$endgroup$
– Abhishek Halder
Mar 1 '17 at 3:10
$begingroup$
Then unfortunately, your question admits of no answer. The partial derivatives are not fully defined, so you cannot calculate them. If someone provides you with a calculation for them, they will either explicitly or implicitly have made an assumption about what the other coordinates are.
$endgroup$
– Paul Sinclair
Mar 1 '17 at 3:40
$begingroup$
The problem is these are true partial derivatives. That means they are not defined strictly by the function on the bottom, but rather by an entire coordinate system. Different choices for the other coordinates will give different values for these partial derivatives. But all we have been given here is that one coordinate is $operatorname{tr}(P)$. We are not told what the other coordinates should be. Presumably we can treat $Q$ as a constant, but $P$ depends on $n choose 2$ independent variables, so which ones should we pick as the other ${n choose 2}-1$? Was there more information given?
$endgroup$
– Paul Sinclair
Mar 1 '17 at 0:30
$begingroup$
The problem is these are true partial derivatives. That means they are not defined strictly by the function on the bottom, but rather by an entire coordinate system. Different choices for the other coordinates will give different values for these partial derivatives. But all we have been given here is that one coordinate is $operatorname{tr}(P)$. We are not told what the other coordinates should be. Presumably we can treat $Q$ as a constant, but $P$ depends on $n choose 2$ independent variables, so which ones should we pick as the other ${n choose 2}-1$? Was there more information given?
$endgroup$
– Paul Sinclair
Mar 1 '17 at 0:30
$begingroup$
Unfortunately, I do not have more information. You are right though that $Q$ can be treated as constant.
$endgroup$
– Abhishek Halder
Mar 1 '17 at 3:10
$begingroup$
Unfortunately, I do not have more information. You are right though that $Q$ can be treated as constant.
$endgroup$
– Abhishek Halder
Mar 1 '17 at 3:10
$begingroup$
Then unfortunately, your question admits of no answer. The partial derivatives are not fully defined, so you cannot calculate them. If someone provides you with a calculation for them, they will either explicitly or implicitly have made an assumption about what the other coordinates are.
$endgroup$
– Paul Sinclair
Mar 1 '17 at 3:40
$begingroup$
Then unfortunately, your question admits of no answer. The partial derivatives are not fully defined, so you cannot calculate them. If someone provides you with a calculation for them, they will either explicitly or implicitly have made an assumption about what the other coordinates are.
$endgroup$
– Paul Sinclair
Mar 1 '17 at 3:40
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
The problem could be approached as follows.
Consider two scalar functions of the $P$ matrix.
$$eqalign{
phi &= {rm tr}(PQ^{-1}) &implies
dphi = {rm tr}(Q^{-1},dP) cr
tau &= {rm tr}(P) &implies
dtau = {rm tr}(dP) cr
}$$
Writing $dP$ in factored form, with direction $QX$ and length $dlambda$
(NB: $Q$ is constant so the direction is controlled by $X$ alone)
$$ dP = QX,dlambda $$
one obtains
$$eqalign{
dphi &= {rm tr}(X),dlambda cr
dtau &= {rm tr}(QX),dlambda cr
}$$
whose ratio is
$$eqalign{
frac{dphi}{dtau} &= frac{{rm tr}(X)}{{rm tr}(QX)} cr
}$$
$$eqalign{
}$$
The problem is this ratio cannot be a derivative because it does not approach a fixed limit.
Although the value of the ratio is immune to changes of scale (i.e. setting $Xtobeta X$), changing the "direction" of $X$ will change the value of the ratio (assuming $Q$ has at least two distinct eigenvalues).
$endgroup$
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2166027%2fderivative-of-scalar-functions-of-matrix-with-respect-to-trace%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The problem could be approached as follows.
Consider two scalar functions of the $P$ matrix.
$$eqalign{
phi &= {rm tr}(PQ^{-1}) &implies
dphi = {rm tr}(Q^{-1},dP) cr
tau &= {rm tr}(P) &implies
dtau = {rm tr}(dP) cr
}$$
Writing $dP$ in factored form, with direction $QX$ and length $dlambda$
(NB: $Q$ is constant so the direction is controlled by $X$ alone)
$$ dP = QX,dlambda $$
one obtains
$$eqalign{
dphi &= {rm tr}(X),dlambda cr
dtau &= {rm tr}(QX),dlambda cr
}$$
whose ratio is
$$eqalign{
frac{dphi}{dtau} &= frac{{rm tr}(X)}{{rm tr}(QX)} cr
}$$
$$eqalign{
}$$
The problem is this ratio cannot be a derivative because it does not approach a fixed limit.
Although the value of the ratio is immune to changes of scale (i.e. setting $Xtobeta X$), changing the "direction" of $X$ will change the value of the ratio (assuming $Q$ has at least two distinct eigenvalues).
$endgroup$
add a comment |
$begingroup$
The problem could be approached as follows.
Consider two scalar functions of the $P$ matrix.
$$eqalign{
phi &= {rm tr}(PQ^{-1}) &implies
dphi = {rm tr}(Q^{-1},dP) cr
tau &= {rm tr}(P) &implies
dtau = {rm tr}(dP) cr
}$$
Writing $dP$ in factored form, with direction $QX$ and length $dlambda$
(NB: $Q$ is constant so the direction is controlled by $X$ alone)
$$ dP = QX,dlambda $$
one obtains
$$eqalign{
dphi &= {rm tr}(X),dlambda cr
dtau &= {rm tr}(QX),dlambda cr
}$$
whose ratio is
$$eqalign{
frac{dphi}{dtau} &= frac{{rm tr}(X)}{{rm tr}(QX)} cr
}$$
$$eqalign{
}$$
The problem is this ratio cannot be a derivative because it does not approach a fixed limit.
Although the value of the ratio is immune to changes of scale (i.e. setting $Xtobeta X$), changing the "direction" of $X$ will change the value of the ratio (assuming $Q$ has at least two distinct eigenvalues).
$endgroup$
add a comment |
$begingroup$
The problem could be approached as follows.
Consider two scalar functions of the $P$ matrix.
$$eqalign{
phi &= {rm tr}(PQ^{-1}) &implies
dphi = {rm tr}(Q^{-1},dP) cr
tau &= {rm tr}(P) &implies
dtau = {rm tr}(dP) cr
}$$
Writing $dP$ in factored form, with direction $QX$ and length $dlambda$
(NB: $Q$ is constant so the direction is controlled by $X$ alone)
$$ dP = QX,dlambda $$
one obtains
$$eqalign{
dphi &= {rm tr}(X),dlambda cr
dtau &= {rm tr}(QX),dlambda cr
}$$
whose ratio is
$$eqalign{
frac{dphi}{dtau} &= frac{{rm tr}(X)}{{rm tr}(QX)} cr
}$$
$$eqalign{
}$$
The problem is this ratio cannot be a derivative because it does not approach a fixed limit.
Although the value of the ratio is immune to changes of scale (i.e. setting $Xtobeta X$), changing the "direction" of $X$ will change the value of the ratio (assuming $Q$ has at least two distinct eigenvalues).
$endgroup$
The problem could be approached as follows.
Consider two scalar functions of the $P$ matrix.
$$eqalign{
phi &= {rm tr}(PQ^{-1}) &implies
dphi = {rm tr}(Q^{-1},dP) cr
tau &= {rm tr}(P) &implies
dtau = {rm tr}(dP) cr
}$$
Writing $dP$ in factored form, with direction $QX$ and length $dlambda$
(NB: $Q$ is constant so the direction is controlled by $X$ alone)
$$ dP = QX,dlambda $$
one obtains
$$eqalign{
dphi &= {rm tr}(X),dlambda cr
dtau &= {rm tr}(QX),dlambda cr
}$$
whose ratio is
$$eqalign{
frac{dphi}{dtau} &= frac{{rm tr}(X)}{{rm tr}(QX)} cr
}$$
$$eqalign{
}$$
The problem is this ratio cannot be a derivative because it does not approach a fixed limit.
Although the value of the ratio is immune to changes of scale (i.e. setting $Xtobeta X$), changing the "direction" of $X$ will change the value of the ratio (assuming $Q$ has at least two distinct eigenvalues).
edited Jan 27 at 16:01
answered Jan 27 at 2:12
greggreg
8,9551824
8,9551824
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2166027%2fderivative-of-scalar-functions-of-matrix-with-respect-to-trace%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
$begingroup$
The problem is these are true partial derivatives. That means they are not defined strictly by the function on the bottom, but rather by an entire coordinate system. Different choices for the other coordinates will give different values for these partial derivatives. But all we have been given here is that one coordinate is $operatorname{tr}(P)$. We are not told what the other coordinates should be. Presumably we can treat $Q$ as a constant, but $P$ depends on $n choose 2$ independent variables, so which ones should we pick as the other ${n choose 2}-1$? Was there more information given?
$endgroup$
– Paul Sinclair
Mar 1 '17 at 0:30
$begingroup$
Unfortunately, I do not have more information. You are right though that $Q$ can be treated as constant.
$endgroup$
– Abhishek Halder
Mar 1 '17 at 3:10
$begingroup$
Then unfortunately, your question admits of no answer. The partial derivatives are not fully defined, so you cannot calculate them. If someone provides you with a calculation for them, they will either explicitly or implicitly have made an assumption about what the other coordinates are.
$endgroup$
– Paul Sinclair
Mar 1 '17 at 3:40