why is $frac{partial y_{mn}}{partial mathbf X}= mathbf B mathbf I_{mn}^Tmathbf A$












0














I have find some reason why $frac{partial y_{mn}}{partial mathbf X}= mathbf B mathbf I_{mn}^Tmathbf A$ when $mathbf Y=mathbf A mathbf X^T mathbf B$ in some books,but i can't still understand why,can anyone teach me how to calculate it in detail?



$mathbf A$ is $m*k$ matrix,$mathbf B$ is $i*n$ matrix,$mathbf X$ is $i*k$ matrix










share|cite|improve this question
























  • What are the orders of $A,B,X$?
    – Mostafa Ayaz
    Nov 29 '18 at 12:34










  • @MostafaAyaz i have edited the question
    – shineele
    Nov 29 '18 at 12:38










  • One more thing: how do you define $X^TB$ when $X$ is $ktimes i$ and $B$ is $itimes n$? Shouldn't it be $XB$?
    – Mostafa Ayaz
    Nov 29 '18 at 12:40












  • sry,terrible mistake
    – shineele
    Nov 29 '18 at 12:45










  • @MostafaAyaz i improved it
    – shineele
    Nov 29 '18 at 12:57
















0














I have find some reason why $frac{partial y_{mn}}{partial mathbf X}= mathbf B mathbf I_{mn}^Tmathbf A$ when $mathbf Y=mathbf A mathbf X^T mathbf B$ in some books,but i can't still understand why,can anyone teach me how to calculate it in detail?



$mathbf A$ is $m*k$ matrix,$mathbf B$ is $i*n$ matrix,$mathbf X$ is $i*k$ matrix










share|cite|improve this question
























  • What are the orders of $A,B,X$?
    – Mostafa Ayaz
    Nov 29 '18 at 12:34










  • @MostafaAyaz i have edited the question
    – shineele
    Nov 29 '18 at 12:38










  • One more thing: how do you define $X^TB$ when $X$ is $ktimes i$ and $B$ is $itimes n$? Shouldn't it be $XB$?
    – Mostafa Ayaz
    Nov 29 '18 at 12:40












  • sry,terrible mistake
    – shineele
    Nov 29 '18 at 12:45










  • @MostafaAyaz i improved it
    – shineele
    Nov 29 '18 at 12:57














0












0








0







I have find some reason why $frac{partial y_{mn}}{partial mathbf X}= mathbf B mathbf I_{mn}^Tmathbf A$ when $mathbf Y=mathbf A mathbf X^T mathbf B$ in some books,but i can't still understand why,can anyone teach me how to calculate it in detail?



$mathbf A$ is $m*k$ matrix,$mathbf B$ is $i*n$ matrix,$mathbf X$ is $i*k$ matrix










share|cite|improve this question















I have find some reason why $frac{partial y_{mn}}{partial mathbf X}= mathbf B mathbf I_{mn}^Tmathbf A$ when $mathbf Y=mathbf A mathbf X^T mathbf B$ in some books,but i can't still understand why,can anyone teach me how to calculate it in detail?



$mathbf A$ is $m*k$ matrix,$mathbf B$ is $i*n$ matrix,$mathbf X$ is $i*k$ matrix







matrices derivatives






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 29 '18 at 12:45

























asked Nov 29 '18 at 12:30









shineele

377




377












  • What are the orders of $A,B,X$?
    – Mostafa Ayaz
    Nov 29 '18 at 12:34










  • @MostafaAyaz i have edited the question
    – shineele
    Nov 29 '18 at 12:38










  • One more thing: how do you define $X^TB$ when $X$ is $ktimes i$ and $B$ is $itimes n$? Shouldn't it be $XB$?
    – Mostafa Ayaz
    Nov 29 '18 at 12:40












  • sry,terrible mistake
    – shineele
    Nov 29 '18 at 12:45










  • @MostafaAyaz i improved it
    – shineele
    Nov 29 '18 at 12:57


















  • What are the orders of $A,B,X$?
    – Mostafa Ayaz
    Nov 29 '18 at 12:34










  • @MostafaAyaz i have edited the question
    – shineele
    Nov 29 '18 at 12:38










  • One more thing: how do you define $X^TB$ when $X$ is $ktimes i$ and $B$ is $itimes n$? Shouldn't it be $XB$?
    – Mostafa Ayaz
    Nov 29 '18 at 12:40












  • sry,terrible mistake
    – shineele
    Nov 29 '18 at 12:45










  • @MostafaAyaz i improved it
    – shineele
    Nov 29 '18 at 12:57
















What are the orders of $A,B,X$?
– Mostafa Ayaz
Nov 29 '18 at 12:34




What are the orders of $A,B,X$?
– Mostafa Ayaz
Nov 29 '18 at 12:34












@MostafaAyaz i have edited the question
– shineele
Nov 29 '18 at 12:38




@MostafaAyaz i have edited the question
– shineele
Nov 29 '18 at 12:38












One more thing: how do you define $X^TB$ when $X$ is $ktimes i$ and $B$ is $itimes n$? Shouldn't it be $XB$?
– Mostafa Ayaz
Nov 29 '18 at 12:40






One more thing: how do you define $X^TB$ when $X$ is $ktimes i$ and $B$ is $itimes n$? Shouldn't it be $XB$?
– Mostafa Ayaz
Nov 29 '18 at 12:40














sry,terrible mistake
– shineele
Nov 29 '18 at 12:45




sry,terrible mistake
– shineele
Nov 29 '18 at 12:45












@MostafaAyaz i improved it
– shineele
Nov 29 '18 at 12:57




@MostafaAyaz i improved it
– shineele
Nov 29 '18 at 12:57










1 Answer
1






active

oldest

votes


















1














Starting with
$$eqalign{
Y &= AX^TB cr
}$$

Take the Frobenius product with the single-entry matrix to isolate the $(m,n)$ element.
$$eqalign{
y_{mn} &= E_{mn}:Y cr
&= E_{mn}:AX^TB cr
&= E_{mn}^T:B^TXA^T cr
&= BE_{mn}^TA:X cr
}$$

Now find the differential and gradient of this element wrt $X$
$$eqalign{
dy_{mn} &= BE_{mn}^TA:dX cr
frac{partial y_{mn}}{partial X} &= BE^T_{mn}A cr
}$$

There is no standard notation for the single-entry matrix. I use the letter ${mathbf E}$ others use ${mathbf J}$, but ${mathbf I}$ is a confusing choice since it usually denotes the identity matrix.



NB:  The Frobenius product is just a convenient way to write the trace function
$$A:B = {rm Tr}(A^TB)$$






share|cite|improve this answer





















  • so in this calculation,$BB^T=I$?
    – shineele
    Nov 29 '18 at 15:09












  • Why would you think that? This calculation is agnostic about the properties of the $(A,B,X)$ matrices other than they must have compatible dimensions to allow the product $AX^TB$.
    – greg
    Nov 29 '18 at 15:19










  • because here $E_{mn}^T:B^TXA^T = BE_{mn}^TA:X $
    – shineele
    Nov 30 '18 at 1:18












  • You can prove this using the properties of the trace $$eqalign{ E^T:B^TXA^T &={rm Tr}(EB^TXA^T)cr &={rm Tr}(A^TEB^TX)cr &={rm Tr}big((BE^TA)^TXbig)cr &=BE^TA:X }$$
    – greg
    Nov 30 '18 at 4:16













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%2f3018565%2fwhy-is-frac-partial-y-mn-partial-mathbf-x-mathbf-b-mathbf-i-mnt-m%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









1














Starting with
$$eqalign{
Y &= AX^TB cr
}$$

Take the Frobenius product with the single-entry matrix to isolate the $(m,n)$ element.
$$eqalign{
y_{mn} &= E_{mn}:Y cr
&= E_{mn}:AX^TB cr
&= E_{mn}^T:B^TXA^T cr
&= BE_{mn}^TA:X cr
}$$

Now find the differential and gradient of this element wrt $X$
$$eqalign{
dy_{mn} &= BE_{mn}^TA:dX cr
frac{partial y_{mn}}{partial X} &= BE^T_{mn}A cr
}$$

There is no standard notation for the single-entry matrix. I use the letter ${mathbf E}$ others use ${mathbf J}$, but ${mathbf I}$ is a confusing choice since it usually denotes the identity matrix.



NB:  The Frobenius product is just a convenient way to write the trace function
$$A:B = {rm Tr}(A^TB)$$






share|cite|improve this answer





















  • so in this calculation,$BB^T=I$?
    – shineele
    Nov 29 '18 at 15:09












  • Why would you think that? This calculation is agnostic about the properties of the $(A,B,X)$ matrices other than they must have compatible dimensions to allow the product $AX^TB$.
    – greg
    Nov 29 '18 at 15:19










  • because here $E_{mn}^T:B^TXA^T = BE_{mn}^TA:X $
    – shineele
    Nov 30 '18 at 1:18












  • You can prove this using the properties of the trace $$eqalign{ E^T:B^TXA^T &={rm Tr}(EB^TXA^T)cr &={rm Tr}(A^TEB^TX)cr &={rm Tr}big((BE^TA)^TXbig)cr &=BE^TA:X }$$
    – greg
    Nov 30 '18 at 4:16


















1














Starting with
$$eqalign{
Y &= AX^TB cr
}$$

Take the Frobenius product with the single-entry matrix to isolate the $(m,n)$ element.
$$eqalign{
y_{mn} &= E_{mn}:Y cr
&= E_{mn}:AX^TB cr
&= E_{mn}^T:B^TXA^T cr
&= BE_{mn}^TA:X cr
}$$

Now find the differential and gradient of this element wrt $X$
$$eqalign{
dy_{mn} &= BE_{mn}^TA:dX cr
frac{partial y_{mn}}{partial X} &= BE^T_{mn}A cr
}$$

There is no standard notation for the single-entry matrix. I use the letter ${mathbf E}$ others use ${mathbf J}$, but ${mathbf I}$ is a confusing choice since it usually denotes the identity matrix.



NB:  The Frobenius product is just a convenient way to write the trace function
$$A:B = {rm Tr}(A^TB)$$






share|cite|improve this answer





















  • so in this calculation,$BB^T=I$?
    – shineele
    Nov 29 '18 at 15:09












  • Why would you think that? This calculation is agnostic about the properties of the $(A,B,X)$ matrices other than they must have compatible dimensions to allow the product $AX^TB$.
    – greg
    Nov 29 '18 at 15:19










  • because here $E_{mn}^T:B^TXA^T = BE_{mn}^TA:X $
    – shineele
    Nov 30 '18 at 1:18












  • You can prove this using the properties of the trace $$eqalign{ E^T:B^TXA^T &={rm Tr}(EB^TXA^T)cr &={rm Tr}(A^TEB^TX)cr &={rm Tr}big((BE^TA)^TXbig)cr &=BE^TA:X }$$
    – greg
    Nov 30 '18 at 4:16
















1












1








1






Starting with
$$eqalign{
Y &= AX^TB cr
}$$

Take the Frobenius product with the single-entry matrix to isolate the $(m,n)$ element.
$$eqalign{
y_{mn} &= E_{mn}:Y cr
&= E_{mn}:AX^TB cr
&= E_{mn}^T:B^TXA^T cr
&= BE_{mn}^TA:X cr
}$$

Now find the differential and gradient of this element wrt $X$
$$eqalign{
dy_{mn} &= BE_{mn}^TA:dX cr
frac{partial y_{mn}}{partial X} &= BE^T_{mn}A cr
}$$

There is no standard notation for the single-entry matrix. I use the letter ${mathbf E}$ others use ${mathbf J}$, but ${mathbf I}$ is a confusing choice since it usually denotes the identity matrix.



NB:  The Frobenius product is just a convenient way to write the trace function
$$A:B = {rm Tr}(A^TB)$$






share|cite|improve this answer












Starting with
$$eqalign{
Y &= AX^TB cr
}$$

Take the Frobenius product with the single-entry matrix to isolate the $(m,n)$ element.
$$eqalign{
y_{mn} &= E_{mn}:Y cr
&= E_{mn}:AX^TB cr
&= E_{mn}^T:B^TXA^T cr
&= BE_{mn}^TA:X cr
}$$

Now find the differential and gradient of this element wrt $X$
$$eqalign{
dy_{mn} &= BE_{mn}^TA:dX cr
frac{partial y_{mn}}{partial X} &= BE^T_{mn}A cr
}$$

There is no standard notation for the single-entry matrix. I use the letter ${mathbf E}$ others use ${mathbf J}$, but ${mathbf I}$ is a confusing choice since it usually denotes the identity matrix.



NB:  The Frobenius product is just a convenient way to write the trace function
$$A:B = {rm Tr}(A^TB)$$







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Nov 29 '18 at 14:42









greg

7,5451821




7,5451821












  • so in this calculation,$BB^T=I$?
    – shineele
    Nov 29 '18 at 15:09












  • Why would you think that? This calculation is agnostic about the properties of the $(A,B,X)$ matrices other than they must have compatible dimensions to allow the product $AX^TB$.
    – greg
    Nov 29 '18 at 15:19










  • because here $E_{mn}^T:B^TXA^T = BE_{mn}^TA:X $
    – shineele
    Nov 30 '18 at 1:18












  • You can prove this using the properties of the trace $$eqalign{ E^T:B^TXA^T &={rm Tr}(EB^TXA^T)cr &={rm Tr}(A^TEB^TX)cr &={rm Tr}big((BE^TA)^TXbig)cr &=BE^TA:X }$$
    – greg
    Nov 30 '18 at 4:16




















  • so in this calculation,$BB^T=I$?
    – shineele
    Nov 29 '18 at 15:09












  • Why would you think that? This calculation is agnostic about the properties of the $(A,B,X)$ matrices other than they must have compatible dimensions to allow the product $AX^TB$.
    – greg
    Nov 29 '18 at 15:19










  • because here $E_{mn}^T:B^TXA^T = BE_{mn}^TA:X $
    – shineele
    Nov 30 '18 at 1:18












  • You can prove this using the properties of the trace $$eqalign{ E^T:B^TXA^T &={rm Tr}(EB^TXA^T)cr &={rm Tr}(A^TEB^TX)cr &={rm Tr}big((BE^TA)^TXbig)cr &=BE^TA:X }$$
    – greg
    Nov 30 '18 at 4:16


















so in this calculation,$BB^T=I$?
– shineele
Nov 29 '18 at 15:09






so in this calculation,$BB^T=I$?
– shineele
Nov 29 '18 at 15:09














Why would you think that? This calculation is agnostic about the properties of the $(A,B,X)$ matrices other than they must have compatible dimensions to allow the product $AX^TB$.
– greg
Nov 29 '18 at 15:19




Why would you think that? This calculation is agnostic about the properties of the $(A,B,X)$ matrices other than they must have compatible dimensions to allow the product $AX^TB$.
– greg
Nov 29 '18 at 15:19












because here $E_{mn}^T:B^TXA^T = BE_{mn}^TA:X $
– shineele
Nov 30 '18 at 1:18






because here $E_{mn}^T:B^TXA^T = BE_{mn}^TA:X $
– shineele
Nov 30 '18 at 1:18














You can prove this using the properties of the trace $$eqalign{ E^T:B^TXA^T &={rm Tr}(EB^TXA^T)cr &={rm Tr}(A^TEB^TX)cr &={rm Tr}big((BE^TA)^TXbig)cr &=BE^TA:X }$$
– greg
Nov 30 '18 at 4:16






You can prove this using the properties of the trace $$eqalign{ E^T:B^TXA^T &={rm Tr}(EB^TXA^T)cr &={rm Tr}(A^TEB^TX)cr &={rm Tr}big((BE^TA)^TXbig)cr &=BE^TA:X }$$
– greg
Nov 30 '18 at 4:16




















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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


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


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%2f3018565%2fwhy-is-frac-partial-y-mn-partial-mathbf-x-mathbf-b-mathbf-i-mnt-m%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

Probability when a professor distributes a quiz and homework assignment to a class of n students.

Aardman Animations

Are they similar matrix