Derivative of frobenius norm
$begingroup$
I am trying to calculate the derivative of an energy function with respect to a vector xx. The energy is given by:
$$ψ(A)=∥A−I∥_F^2.$$
Where A is a square matrix with each column as x (a column vector):
$$A=[x_1 x_2 x_3 ... x_n]$$
The aim is to find $$frac{∂ψ}{∂x}$$
[Petersen 06] gives the derivative of a Frobenius norm as $$ frac{∂∥X∥_F^2}{X}=2X$$, but I am unsure how to extend it to this case (presumably using the chain rule somehow).
derivatives norm partial-derivative
$endgroup$
add a comment |
$begingroup$
I am trying to calculate the derivative of an energy function with respect to a vector xx. The energy is given by:
$$ψ(A)=∥A−I∥_F^2.$$
Where A is a square matrix with each column as x (a column vector):
$$A=[x_1 x_2 x_3 ... x_n]$$
The aim is to find $$frac{∂ψ}{∂x}$$
[Petersen 06] gives the derivative of a Frobenius norm as $$ frac{∂∥X∥_F^2}{X}=2X$$, but I am unsure how to extend it to this case (presumably using the chain rule somehow).
derivatives norm partial-derivative
$endgroup$
$begingroup$
$psi(A)$ is the sum of squares, so to calculate partial derivatives wrt $a_{ij}$ is simple. Then you can organize those in whatever way.
$endgroup$
– A.Γ.
Oct 15 '15 at 9:13
$begingroup$
Possible duplicate
$endgroup$
– A.Γ.
Oct 15 '15 at 9:14
add a comment |
$begingroup$
I am trying to calculate the derivative of an energy function with respect to a vector xx. The energy is given by:
$$ψ(A)=∥A−I∥_F^2.$$
Where A is a square matrix with each column as x (a column vector):
$$A=[x_1 x_2 x_3 ... x_n]$$
The aim is to find $$frac{∂ψ}{∂x}$$
[Petersen 06] gives the derivative of a Frobenius norm as $$ frac{∂∥X∥_F^2}{X}=2X$$, but I am unsure how to extend it to this case (presumably using the chain rule somehow).
derivatives norm partial-derivative
$endgroup$
I am trying to calculate the derivative of an energy function with respect to a vector xx. The energy is given by:
$$ψ(A)=∥A−I∥_F^2.$$
Where A is a square matrix with each column as x (a column vector):
$$A=[x_1 x_2 x_3 ... x_n]$$
The aim is to find $$frac{∂ψ}{∂x}$$
[Petersen 06] gives the derivative of a Frobenius norm as $$ frac{∂∥X∥_F^2}{X}=2X$$, but I am unsure how to extend it to this case (presumably using the chain rule somehow).
derivatives norm partial-derivative
derivatives norm partial-derivative
asked Oct 15 '15 at 9:04
SidSid
154
154
$begingroup$
$psi(A)$ is the sum of squares, so to calculate partial derivatives wrt $a_{ij}$ is simple. Then you can organize those in whatever way.
$endgroup$
– A.Γ.
Oct 15 '15 at 9:13
$begingroup$
Possible duplicate
$endgroup$
– A.Γ.
Oct 15 '15 at 9:14
add a comment |
$begingroup$
$psi(A)$ is the sum of squares, so to calculate partial derivatives wrt $a_{ij}$ is simple. Then you can organize those in whatever way.
$endgroup$
– A.Γ.
Oct 15 '15 at 9:13
$begingroup$
Possible duplicate
$endgroup$
– A.Γ.
Oct 15 '15 at 9:14
$begingroup$
$psi(A)$ is the sum of squares, so to calculate partial derivatives wrt $a_{ij}$ is simple. Then you can organize those in whatever way.
$endgroup$
– A.Γ.
Oct 15 '15 at 9:13
$begingroup$
$psi(A)$ is the sum of squares, so to calculate partial derivatives wrt $a_{ij}$ is simple. Then you can organize those in whatever way.
$endgroup$
– A.Γ.
Oct 15 '15 at 9:13
$begingroup$
Possible duplicate
$endgroup$
– A.Γ.
Oct 15 '15 at 9:14
$begingroup$
Possible duplicate
$endgroup$
– A.Γ.
Oct 15 '15 at 9:14
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Recall that the frobeniuns norm $defnorm#1{left|#1right|_F}norm{cdot} colon mathrm{Mat}_{n,m}(mathbf R) to mathbf R$ if given by
$$ norm A = deft{mathop{rm tr}}t(A^t A)^{1/2} $$
and hence the derivative of $norm{cdot }^2$ is (we used $t(A^t H) = t(H^t A)$)
$$ D(norm{cdot}^2)(A)H = 2 t(A^t H) $$
If we denote, for given $x_1, ldots, x_{i-1}, x_{i+1}, ldots, x_m in mathbf R^n$, the map $x_i mapsto [x_1, ldots, x_n] in mathrm{Mat}_{n,m}(mathbf R)$ by $A^{hat x}$, we have by the chain rule, that the derivative of $x_i mapsto psibigl(A^hat x(x_i)bigr)$, is given by
$$ Dpsi(A^{hat x}(x_i))DA^{hat x}(x_i) $$
Now $A^{hat x}$ is affine, hence $DA^{hat x}(x_i)$ is the linear part $h mapsto [0, ldots, 0, h, 0, ldots, 0] in mathrm{Mat}_{n,m}(mathbf R)$ and $Dpsi$ is given by
$$ Dpsi(A)H = 2tbigl((A-I)^t Hbigr) $$
Hence,
$$ frac{partial psi}{partial x_i}(h)
= Dpsi(A)DA^{hat x}(x_i)h = 2tbigl((A-I)^t[0,ldots, 0, h, 0,ldots, 0])bigr) $$
Now $(A - I)^t = A^t - I^t$ has the rows $x_j^t - e_j^t$, and as
$$ (A-I)^t[0,ldots, 0, h,0,ldots, 0] = [0, ldots, (A^t - I^t)h,0,ldots, 0] $$
taking the trace leaves us with
$$ frac{partial psi}{partial x_i}(h)
= 2(x_i^t - e_i^t)h $$
$endgroup$
$begingroup$
From where the $$H$$ comes in the equation. Are you supposing $$H=I$$.
$endgroup$
– Sid
Oct 16 '15 at 5:57
$begingroup$
No. The derivative of a map $psi colon {rm Mat}_{n,m}(mathbf R)to mathbf R$ at a point $A in {rm Mat}_{n,m}(mathbf R)$ is a linear map $Dpsi(A) colon {rm Mat}_{n,m}(mathbf R) to mathbf R$, which argument I call $H$.
$endgroup$
– martini
Oct 16 '15 at 6:09
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%2f1481200%2fderivative-of-frobenius-norm%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$
Recall that the frobeniuns norm $defnorm#1{left|#1right|_F}norm{cdot} colon mathrm{Mat}_{n,m}(mathbf R) to mathbf R$ if given by
$$ norm A = deft{mathop{rm tr}}t(A^t A)^{1/2} $$
and hence the derivative of $norm{cdot }^2$ is (we used $t(A^t H) = t(H^t A)$)
$$ D(norm{cdot}^2)(A)H = 2 t(A^t H) $$
If we denote, for given $x_1, ldots, x_{i-1}, x_{i+1}, ldots, x_m in mathbf R^n$, the map $x_i mapsto [x_1, ldots, x_n] in mathrm{Mat}_{n,m}(mathbf R)$ by $A^{hat x}$, we have by the chain rule, that the derivative of $x_i mapsto psibigl(A^hat x(x_i)bigr)$, is given by
$$ Dpsi(A^{hat x}(x_i))DA^{hat x}(x_i) $$
Now $A^{hat x}$ is affine, hence $DA^{hat x}(x_i)$ is the linear part $h mapsto [0, ldots, 0, h, 0, ldots, 0] in mathrm{Mat}_{n,m}(mathbf R)$ and $Dpsi$ is given by
$$ Dpsi(A)H = 2tbigl((A-I)^t Hbigr) $$
Hence,
$$ frac{partial psi}{partial x_i}(h)
= Dpsi(A)DA^{hat x}(x_i)h = 2tbigl((A-I)^t[0,ldots, 0, h, 0,ldots, 0])bigr) $$
Now $(A - I)^t = A^t - I^t$ has the rows $x_j^t - e_j^t$, and as
$$ (A-I)^t[0,ldots, 0, h,0,ldots, 0] = [0, ldots, (A^t - I^t)h,0,ldots, 0] $$
taking the trace leaves us with
$$ frac{partial psi}{partial x_i}(h)
= 2(x_i^t - e_i^t)h $$
$endgroup$
$begingroup$
From where the $$H$$ comes in the equation. Are you supposing $$H=I$$.
$endgroup$
– Sid
Oct 16 '15 at 5:57
$begingroup$
No. The derivative of a map $psi colon {rm Mat}_{n,m}(mathbf R)to mathbf R$ at a point $A in {rm Mat}_{n,m}(mathbf R)$ is a linear map $Dpsi(A) colon {rm Mat}_{n,m}(mathbf R) to mathbf R$, which argument I call $H$.
$endgroup$
– martini
Oct 16 '15 at 6:09
add a comment |
$begingroup$
Recall that the frobeniuns norm $defnorm#1{left|#1right|_F}norm{cdot} colon mathrm{Mat}_{n,m}(mathbf R) to mathbf R$ if given by
$$ norm A = deft{mathop{rm tr}}t(A^t A)^{1/2} $$
and hence the derivative of $norm{cdot }^2$ is (we used $t(A^t H) = t(H^t A)$)
$$ D(norm{cdot}^2)(A)H = 2 t(A^t H) $$
If we denote, for given $x_1, ldots, x_{i-1}, x_{i+1}, ldots, x_m in mathbf R^n$, the map $x_i mapsto [x_1, ldots, x_n] in mathrm{Mat}_{n,m}(mathbf R)$ by $A^{hat x}$, we have by the chain rule, that the derivative of $x_i mapsto psibigl(A^hat x(x_i)bigr)$, is given by
$$ Dpsi(A^{hat x}(x_i))DA^{hat x}(x_i) $$
Now $A^{hat x}$ is affine, hence $DA^{hat x}(x_i)$ is the linear part $h mapsto [0, ldots, 0, h, 0, ldots, 0] in mathrm{Mat}_{n,m}(mathbf R)$ and $Dpsi$ is given by
$$ Dpsi(A)H = 2tbigl((A-I)^t Hbigr) $$
Hence,
$$ frac{partial psi}{partial x_i}(h)
= Dpsi(A)DA^{hat x}(x_i)h = 2tbigl((A-I)^t[0,ldots, 0, h, 0,ldots, 0])bigr) $$
Now $(A - I)^t = A^t - I^t$ has the rows $x_j^t - e_j^t$, and as
$$ (A-I)^t[0,ldots, 0, h,0,ldots, 0] = [0, ldots, (A^t - I^t)h,0,ldots, 0] $$
taking the trace leaves us with
$$ frac{partial psi}{partial x_i}(h)
= 2(x_i^t - e_i^t)h $$
$endgroup$
$begingroup$
From where the $$H$$ comes in the equation. Are you supposing $$H=I$$.
$endgroup$
– Sid
Oct 16 '15 at 5:57
$begingroup$
No. The derivative of a map $psi colon {rm Mat}_{n,m}(mathbf R)to mathbf R$ at a point $A in {rm Mat}_{n,m}(mathbf R)$ is a linear map $Dpsi(A) colon {rm Mat}_{n,m}(mathbf R) to mathbf R$, which argument I call $H$.
$endgroup$
– martini
Oct 16 '15 at 6:09
add a comment |
$begingroup$
Recall that the frobeniuns norm $defnorm#1{left|#1right|_F}norm{cdot} colon mathrm{Mat}_{n,m}(mathbf R) to mathbf R$ if given by
$$ norm A = deft{mathop{rm tr}}t(A^t A)^{1/2} $$
and hence the derivative of $norm{cdot }^2$ is (we used $t(A^t H) = t(H^t A)$)
$$ D(norm{cdot}^2)(A)H = 2 t(A^t H) $$
If we denote, for given $x_1, ldots, x_{i-1}, x_{i+1}, ldots, x_m in mathbf R^n$, the map $x_i mapsto [x_1, ldots, x_n] in mathrm{Mat}_{n,m}(mathbf R)$ by $A^{hat x}$, we have by the chain rule, that the derivative of $x_i mapsto psibigl(A^hat x(x_i)bigr)$, is given by
$$ Dpsi(A^{hat x}(x_i))DA^{hat x}(x_i) $$
Now $A^{hat x}$ is affine, hence $DA^{hat x}(x_i)$ is the linear part $h mapsto [0, ldots, 0, h, 0, ldots, 0] in mathrm{Mat}_{n,m}(mathbf R)$ and $Dpsi$ is given by
$$ Dpsi(A)H = 2tbigl((A-I)^t Hbigr) $$
Hence,
$$ frac{partial psi}{partial x_i}(h)
= Dpsi(A)DA^{hat x}(x_i)h = 2tbigl((A-I)^t[0,ldots, 0, h, 0,ldots, 0])bigr) $$
Now $(A - I)^t = A^t - I^t$ has the rows $x_j^t - e_j^t$, and as
$$ (A-I)^t[0,ldots, 0, h,0,ldots, 0] = [0, ldots, (A^t - I^t)h,0,ldots, 0] $$
taking the trace leaves us with
$$ frac{partial psi}{partial x_i}(h)
= 2(x_i^t - e_i^t)h $$
$endgroup$
Recall that the frobeniuns norm $defnorm#1{left|#1right|_F}norm{cdot} colon mathrm{Mat}_{n,m}(mathbf R) to mathbf R$ if given by
$$ norm A = deft{mathop{rm tr}}t(A^t A)^{1/2} $$
and hence the derivative of $norm{cdot }^2$ is (we used $t(A^t H) = t(H^t A)$)
$$ D(norm{cdot}^2)(A)H = 2 t(A^t H) $$
If we denote, for given $x_1, ldots, x_{i-1}, x_{i+1}, ldots, x_m in mathbf R^n$, the map $x_i mapsto [x_1, ldots, x_n] in mathrm{Mat}_{n,m}(mathbf R)$ by $A^{hat x}$, we have by the chain rule, that the derivative of $x_i mapsto psibigl(A^hat x(x_i)bigr)$, is given by
$$ Dpsi(A^{hat x}(x_i))DA^{hat x}(x_i) $$
Now $A^{hat x}$ is affine, hence $DA^{hat x}(x_i)$ is the linear part $h mapsto [0, ldots, 0, h, 0, ldots, 0] in mathrm{Mat}_{n,m}(mathbf R)$ and $Dpsi$ is given by
$$ Dpsi(A)H = 2tbigl((A-I)^t Hbigr) $$
Hence,
$$ frac{partial psi}{partial x_i}(h)
= Dpsi(A)DA^{hat x}(x_i)h = 2tbigl((A-I)^t[0,ldots, 0, h, 0,ldots, 0])bigr) $$
Now $(A - I)^t = A^t - I^t$ has the rows $x_j^t - e_j^t$, and as
$$ (A-I)^t[0,ldots, 0, h,0,ldots, 0] = [0, ldots, (A^t - I^t)h,0,ldots, 0] $$
taking the trace leaves us with
$$ frac{partial psi}{partial x_i}(h)
= 2(x_i^t - e_i^t)h $$
answered Oct 15 '15 at 9:29
martinimartini
70.4k45991
70.4k45991
$begingroup$
From where the $$H$$ comes in the equation. Are you supposing $$H=I$$.
$endgroup$
– Sid
Oct 16 '15 at 5:57
$begingroup$
No. The derivative of a map $psi colon {rm Mat}_{n,m}(mathbf R)to mathbf R$ at a point $A in {rm Mat}_{n,m}(mathbf R)$ is a linear map $Dpsi(A) colon {rm Mat}_{n,m}(mathbf R) to mathbf R$, which argument I call $H$.
$endgroup$
– martini
Oct 16 '15 at 6:09
add a comment |
$begingroup$
From where the $$H$$ comes in the equation. Are you supposing $$H=I$$.
$endgroup$
– Sid
Oct 16 '15 at 5:57
$begingroup$
No. The derivative of a map $psi colon {rm Mat}_{n,m}(mathbf R)to mathbf R$ at a point $A in {rm Mat}_{n,m}(mathbf R)$ is a linear map $Dpsi(A) colon {rm Mat}_{n,m}(mathbf R) to mathbf R$, which argument I call $H$.
$endgroup$
– martini
Oct 16 '15 at 6:09
$begingroup$
From where the $$H$$ comes in the equation. Are you supposing $$H=I$$.
$endgroup$
– Sid
Oct 16 '15 at 5:57
$begingroup$
From where the $$H$$ comes in the equation. Are you supposing $$H=I$$.
$endgroup$
– Sid
Oct 16 '15 at 5:57
$begingroup$
No. The derivative of a map $psi colon {rm Mat}_{n,m}(mathbf R)to mathbf R$ at a point $A in {rm Mat}_{n,m}(mathbf R)$ is a linear map $Dpsi(A) colon {rm Mat}_{n,m}(mathbf R) to mathbf R$, which argument I call $H$.
$endgroup$
– martini
Oct 16 '15 at 6:09
$begingroup$
No. The derivative of a map $psi colon {rm Mat}_{n,m}(mathbf R)to mathbf R$ at a point $A in {rm Mat}_{n,m}(mathbf R)$ is a linear map $Dpsi(A) colon {rm Mat}_{n,m}(mathbf R) to mathbf R$, which argument I call $H$.
$endgroup$
– martini
Oct 16 '15 at 6:09
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%2f1481200%2fderivative-of-frobenius-norm%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$
$psi(A)$ is the sum of squares, so to calculate partial derivatives wrt $a_{ij}$ is simple. Then you can organize those in whatever way.
$endgroup$
– A.Γ.
Oct 15 '15 at 9:13
$begingroup$
Possible duplicate
$endgroup$
– A.Γ.
Oct 15 '15 at 9:14