Transpose the answer matrix to the right dimension after partial differentiation the product of matrices

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I would like to understand about transposing matrix after partial differentiation for the right dimension of answer



For a function of the product of matrices $W$ and $H$ with dimension $i*k$ and $k*j$, respectively:



$$eqalign
Omega = sum_kW_ikK_kj
$$



A colon represents Frobenius product. $1$ is matrix of ones in $i*j$ dimension. So,
$$eqalign
Omega &= 1:WH cr
$$



Differentiation function $Omega$ wrt $H$:



$$eqalign
partial Omega &= 1:Wpartial H cr
fracpartial Omegapartial H &= 1:Wcr
fracpartial Omegapartial H &= W^T1cr
$$



I wonder how to resolve the last two lines? I know the answer should be in $k*j$ dimension and $W^T 1$ is in the right dimension for the answer. But is there the reference/rule to do this? Or is it from the observation that the answer must be $kj$ and we just make a product between $1$ and $W$ to be $kj$?







share|cite|improve this question




















  • I believe you meant to define $Omega$ as the scalar quantity $$Omega = sum_isum_jsum_k W_ikH_kj$$ The cyclic property of the trace allows you to rearrange the terms in a Frobenius product. For example $$eqalignA:BC&=rm tr(A(BC)^T)cr&=rm tr(AC^TB^T)cr&=rm tr(B^TAC^T) =B^TA:Ccr$$
    – greg
    Aug 24 at 4:40















up vote
0
down vote

favorite












I would like to understand about transposing matrix after partial differentiation for the right dimension of answer



For a function of the product of matrices $W$ and $H$ with dimension $i*k$ and $k*j$, respectively:



$$eqalign
Omega = sum_kW_ikK_kj
$$



A colon represents Frobenius product. $1$ is matrix of ones in $i*j$ dimension. So,
$$eqalign
Omega &= 1:WH cr
$$



Differentiation function $Omega$ wrt $H$:



$$eqalign
partial Omega &= 1:Wpartial H cr
fracpartial Omegapartial H &= 1:Wcr
fracpartial Omegapartial H &= W^T1cr
$$



I wonder how to resolve the last two lines? I know the answer should be in $k*j$ dimension and $W^T 1$ is in the right dimension for the answer. But is there the reference/rule to do this? Or is it from the observation that the answer must be $kj$ and we just make a product between $1$ and $W$ to be $kj$?







share|cite|improve this question




















  • I believe you meant to define $Omega$ as the scalar quantity $$Omega = sum_isum_jsum_k W_ikH_kj$$ The cyclic property of the trace allows you to rearrange the terms in a Frobenius product. For example $$eqalignA:BC&=rm tr(A(BC)^T)cr&=rm tr(AC^TB^T)cr&=rm tr(B^TAC^T) =B^TA:Ccr$$
    – greg
    Aug 24 at 4:40













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I would like to understand about transposing matrix after partial differentiation for the right dimension of answer



For a function of the product of matrices $W$ and $H$ with dimension $i*k$ and $k*j$, respectively:



$$eqalign
Omega = sum_kW_ikK_kj
$$



A colon represents Frobenius product. $1$ is matrix of ones in $i*j$ dimension. So,
$$eqalign
Omega &= 1:WH cr
$$



Differentiation function $Omega$ wrt $H$:



$$eqalign
partial Omega &= 1:Wpartial H cr
fracpartial Omegapartial H &= 1:Wcr
fracpartial Omegapartial H &= W^T1cr
$$



I wonder how to resolve the last two lines? I know the answer should be in $k*j$ dimension and $W^T 1$ is in the right dimension for the answer. But is there the reference/rule to do this? Or is it from the observation that the answer must be $kj$ and we just make a product between $1$ and $W$ to be $kj$?







share|cite|improve this question












I would like to understand about transposing matrix after partial differentiation for the right dimension of answer



For a function of the product of matrices $W$ and $H$ with dimension $i*k$ and $k*j$, respectively:



$$eqalign
Omega = sum_kW_ikK_kj
$$



A colon represents Frobenius product. $1$ is matrix of ones in $i*j$ dimension. So,
$$eqalign
Omega &= 1:WH cr
$$



Differentiation function $Omega$ wrt $H$:



$$eqalign
partial Omega &= 1:Wpartial H cr
fracpartial Omegapartial H &= 1:Wcr
fracpartial Omegapartial H &= W^T1cr
$$



I wonder how to resolve the last two lines? I know the answer should be in $k*j$ dimension and $W^T 1$ is in the right dimension for the answer. But is there the reference/rule to do this? Or is it from the observation that the answer must be $kj$ and we just make a product between $1$ and $W$ to be $kj$?









share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Aug 16 at 7:08









Jan

1677




1677











  • I believe you meant to define $Omega$ as the scalar quantity $$Omega = sum_isum_jsum_k W_ikH_kj$$ The cyclic property of the trace allows you to rearrange the terms in a Frobenius product. For example $$eqalignA:BC&=rm tr(A(BC)^T)cr&=rm tr(AC^TB^T)cr&=rm tr(B^TAC^T) =B^TA:Ccr$$
    – greg
    Aug 24 at 4:40

















  • I believe you meant to define $Omega$ as the scalar quantity $$Omega = sum_isum_jsum_k W_ikH_kj$$ The cyclic property of the trace allows you to rearrange the terms in a Frobenius product. For example $$eqalignA:BC&=rm tr(A(BC)^T)cr&=rm tr(AC^TB^T)cr&=rm tr(B^TAC^T) =B^TA:Ccr$$
    – greg
    Aug 24 at 4:40
















I believe you meant to define $Omega$ as the scalar quantity $$Omega = sum_isum_jsum_k W_ikH_kj$$ The cyclic property of the trace allows you to rearrange the terms in a Frobenius product. For example $$eqalignA:BC&=rm tr(A(BC)^T)cr&=rm tr(AC^TB^T)cr&=rm tr(B^TAC^T) =B^TA:Ccr$$
– greg
Aug 24 at 4:40





I believe you meant to define $Omega$ as the scalar quantity $$Omega = sum_isum_jsum_k W_ikH_kj$$ The cyclic property of the trace allows you to rearrange the terms in a Frobenius product. For example $$eqalignA:BC&=rm tr(A(BC)^T)cr&=rm tr(AC^TB^T)cr&=rm tr(B^TAC^T) =B^TA:Ccr$$
– greg
Aug 24 at 4:40
















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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
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%2f2884487%2ftranspose-the-answer-matrix-to-the-right-dimension-after-partial-differentiation%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2884487%2ftranspose-the-answer-matrix-to-the-right-dimension-after-partial-differentiation%23new-answer', 'question_page');

);

Post as a guest













































































這個網誌中的熱門文章

How to combine Bézier curves to a surface?

Mutual Information Always Non-negative

Why am i infinitely getting the same tweet with the Twitter Search API?