Derivative of frobenius norm












0












$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).










share|cite|improve this question









$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
















0












$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).










share|cite|improve this question









$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














0












0








0





$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).










share|cite|improve this question









$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






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










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


















  • $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










1 Answer
1






active

oldest

votes


















0












$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 $$






share|cite|improve this answer









$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











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%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









0












$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 $$






share|cite|improve this answer









$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
















0












$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 $$






share|cite|improve this answer









$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














0












0








0





$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 $$






share|cite|improve this answer









$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 $$







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










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


















  • $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


















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%2f1481200%2fderivative-of-frobenius-norm%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

Berounka

Sphinx de Gizeh

Different font size/position of beamer's navigation symbols template's content depending on regular/plain...