Chain rule for partial matrix dervative.
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Let $f: mathbbR^a rightarrow mathbbR$ and $z: mathbbR^b rightarrow mathbbR^a$ functions of vectors.
I know that computing the partial derivate $fracpartial fpartial x$ is computed using the chain rule
$$fracpartial fpartial x = sum_i fracpartial fpartial z_ifracpartial z_ipartial x$$
Does this generalize to matrices? That means, do I need to sum over all entries in the matrix
$$fracpartial fpartial x = sum_i,j fracpartial fpartial z_i,jfracpartial z_i,jpartial x$$
assuming $z$ and $x$ are defined on some real matrix space?
calculus matrices chain-rule
add a comment |Â
up vote
0
down vote
favorite
Let $f: mathbbR^a rightarrow mathbbR$ and $z: mathbbR^b rightarrow mathbbR^a$ functions of vectors.
I know that computing the partial derivate $fracpartial fpartial x$ is computed using the chain rule
$$fracpartial fpartial x = sum_i fracpartial fpartial z_ifracpartial z_ipartial x$$
Does this generalize to matrices? That means, do I need to sum over all entries in the matrix
$$fracpartial fpartial x = sum_i,j fracpartial fpartial z_i,jfracpartial z_i,jpartial x$$
assuming $z$ and $x$ are defined on some real matrix space?
calculus matrices chain-rule
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Let $f: mathbbR^a rightarrow mathbbR$ and $z: mathbbR^b rightarrow mathbbR^a$ functions of vectors.
I know that computing the partial derivate $fracpartial fpartial x$ is computed using the chain rule
$$fracpartial fpartial x = sum_i fracpartial fpartial z_ifracpartial z_ipartial x$$
Does this generalize to matrices? That means, do I need to sum over all entries in the matrix
$$fracpartial fpartial x = sum_i,j fracpartial fpartial z_i,jfracpartial z_i,jpartial x$$
assuming $z$ and $x$ are defined on some real matrix space?
calculus matrices chain-rule
Let $f: mathbbR^a rightarrow mathbbR$ and $z: mathbbR^b rightarrow mathbbR^a$ functions of vectors.
I know that computing the partial derivate $fracpartial fpartial x$ is computed using the chain rule
$$fracpartial fpartial x = sum_i fracpartial fpartial z_ifracpartial z_ipartial x$$
Does this generalize to matrices? That means, do I need to sum over all entries in the matrix
$$fracpartial fpartial x = sum_i,j fracpartial fpartial z_i,jfracpartial z_i,jpartial x$$
assuming $z$ and $x$ are defined on some real matrix space?
calculus matrices chain-rule
asked Jul 16 at 14:39
backboltz37
31
31
add a comment |Â
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
2
down vote
accepted
There's something a little wonky with your formula. I think it should be $$fracpartial (fcirc z)partial x_k =sum_i fracpartial fpartial z_i fracpartial z_ipartial x_k$$
To answer your question though, yes it should be the same because when we take matrix derivatives we are implicitly identifying $textMat_ntimes m(mathbbR)$ with $mathbbR^nm$ and taking the derivative in the euclidean space.
add a comment |Â
up vote
0
down vote
Do you mean that the space $mathbb R^a$ is replaced by something like $M_n, m(mathbb R)$, the space of $n times m$ matrices with real entries? Then yes -- as far as calculus is concerned, $M_n, m(mathbb R) = mathbb R^n times m$, and you just iterate over the components of $mathbb R^n times m$, which correspond to the matrix entries of the matrices in $M_n, m(mathbb R)$.
add a comment |Â
up vote
0
down vote
As the other answers mention, yes everything works as intended, and the reason is that in some sense you are still working within the realm of multivariate calculus. Even though everything has technically been expressed in terms of matrices, if you dive into the calculus being done then effectively the matrices just represent a fancy indexing scheme for your variables.
Using a notation slightly more suggestive of the operations you are doing, you could even say $$fracpartial fpartial x=fracpartial fpartial zfracpartial zpartial x.$$ The product of the matrix $fracpartial fpartial z$ with the tensor $fracpartial zpartial x$ will have the intended behavior.
If these are the kinds of questions you find yourself asking lately, I would highly recommend the Matrix Cookbook. You can buy a physical copy, or you can reference the *.pdf the authors host. They cover more kinds of vector and matrix derivatives than you can shake a stick at.
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
There's something a little wonky with your formula. I think it should be $$fracpartial (fcirc z)partial x_k =sum_i fracpartial fpartial z_i fracpartial z_ipartial x_k$$
To answer your question though, yes it should be the same because when we take matrix derivatives we are implicitly identifying $textMat_ntimes m(mathbbR)$ with $mathbbR^nm$ and taking the derivative in the euclidean space.
add a comment |Â
up vote
2
down vote
accepted
There's something a little wonky with your formula. I think it should be $$fracpartial (fcirc z)partial x_k =sum_i fracpartial fpartial z_i fracpartial z_ipartial x_k$$
To answer your question though, yes it should be the same because when we take matrix derivatives we are implicitly identifying $textMat_ntimes m(mathbbR)$ with $mathbbR^nm$ and taking the derivative in the euclidean space.
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
There's something a little wonky with your formula. I think it should be $$fracpartial (fcirc z)partial x_k =sum_i fracpartial fpartial z_i fracpartial z_ipartial x_k$$
To answer your question though, yes it should be the same because when we take matrix derivatives we are implicitly identifying $textMat_ntimes m(mathbbR)$ with $mathbbR^nm$ and taking the derivative in the euclidean space.
There's something a little wonky with your formula. I think it should be $$fracpartial (fcirc z)partial x_k =sum_i fracpartial fpartial z_i fracpartial z_ipartial x_k$$
To answer your question though, yes it should be the same because when we take matrix derivatives we are implicitly identifying $textMat_ntimes m(mathbbR)$ with $mathbbR^nm$ and taking the derivative in the euclidean space.
answered Jul 16 at 14:50
itinerantleopard
1136
1136
add a comment |Â
add a comment |Â
up vote
0
down vote
Do you mean that the space $mathbb R^a$ is replaced by something like $M_n, m(mathbb R)$, the space of $n times m$ matrices with real entries? Then yes -- as far as calculus is concerned, $M_n, m(mathbb R) = mathbb R^n times m$, and you just iterate over the components of $mathbb R^n times m$, which correspond to the matrix entries of the matrices in $M_n, m(mathbb R)$.
add a comment |Â
up vote
0
down vote
Do you mean that the space $mathbb R^a$ is replaced by something like $M_n, m(mathbb R)$, the space of $n times m$ matrices with real entries? Then yes -- as far as calculus is concerned, $M_n, m(mathbb R) = mathbb R^n times m$, and you just iterate over the components of $mathbb R^n times m$, which correspond to the matrix entries of the matrices in $M_n, m(mathbb R)$.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Do you mean that the space $mathbb R^a$ is replaced by something like $M_n, m(mathbb R)$, the space of $n times m$ matrices with real entries? Then yes -- as far as calculus is concerned, $M_n, m(mathbb R) = mathbb R^n times m$, and you just iterate over the components of $mathbb R^n times m$, which correspond to the matrix entries of the matrices in $M_n, m(mathbb R)$.
Do you mean that the space $mathbb R^a$ is replaced by something like $M_n, m(mathbb R)$, the space of $n times m$ matrices with real entries? Then yes -- as far as calculus is concerned, $M_n, m(mathbb R) = mathbb R^n times m$, and you just iterate over the components of $mathbb R^n times m$, which correspond to the matrix entries of the matrices in $M_n, m(mathbb R)$.
answered Jul 16 at 14:48
Mees de Vries
13.7k12345
13.7k12345
add a comment |Â
add a comment |Â
up vote
0
down vote
As the other answers mention, yes everything works as intended, and the reason is that in some sense you are still working within the realm of multivariate calculus. Even though everything has technically been expressed in terms of matrices, if you dive into the calculus being done then effectively the matrices just represent a fancy indexing scheme for your variables.
Using a notation slightly more suggestive of the operations you are doing, you could even say $$fracpartial fpartial x=fracpartial fpartial zfracpartial zpartial x.$$ The product of the matrix $fracpartial fpartial z$ with the tensor $fracpartial zpartial x$ will have the intended behavior.
If these are the kinds of questions you find yourself asking lately, I would highly recommend the Matrix Cookbook. You can buy a physical copy, or you can reference the *.pdf the authors host. They cover more kinds of vector and matrix derivatives than you can shake a stick at.
add a comment |Â
up vote
0
down vote
As the other answers mention, yes everything works as intended, and the reason is that in some sense you are still working within the realm of multivariate calculus. Even though everything has technically been expressed in terms of matrices, if you dive into the calculus being done then effectively the matrices just represent a fancy indexing scheme for your variables.
Using a notation slightly more suggestive of the operations you are doing, you could even say $$fracpartial fpartial x=fracpartial fpartial zfracpartial zpartial x.$$ The product of the matrix $fracpartial fpartial z$ with the tensor $fracpartial zpartial x$ will have the intended behavior.
If these are the kinds of questions you find yourself asking lately, I would highly recommend the Matrix Cookbook. You can buy a physical copy, or you can reference the *.pdf the authors host. They cover more kinds of vector and matrix derivatives than you can shake a stick at.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
As the other answers mention, yes everything works as intended, and the reason is that in some sense you are still working within the realm of multivariate calculus. Even though everything has technically been expressed in terms of matrices, if you dive into the calculus being done then effectively the matrices just represent a fancy indexing scheme for your variables.
Using a notation slightly more suggestive of the operations you are doing, you could even say $$fracpartial fpartial x=fracpartial fpartial zfracpartial zpartial x.$$ The product of the matrix $fracpartial fpartial z$ with the tensor $fracpartial zpartial x$ will have the intended behavior.
If these are the kinds of questions you find yourself asking lately, I would highly recommend the Matrix Cookbook. You can buy a physical copy, or you can reference the *.pdf the authors host. They cover more kinds of vector and matrix derivatives than you can shake a stick at.
As the other answers mention, yes everything works as intended, and the reason is that in some sense you are still working within the realm of multivariate calculus. Even though everything has technically been expressed in terms of matrices, if you dive into the calculus being done then effectively the matrices just represent a fancy indexing scheme for your variables.
Using a notation slightly more suggestive of the operations you are doing, you could even say $$fracpartial fpartial x=fracpartial fpartial zfracpartial zpartial x.$$ The product of the matrix $fracpartial fpartial z$ with the tensor $fracpartial zpartial x$ will have the intended behavior.
If these are the kinds of questions you find yourself asking lately, I would highly recommend the Matrix Cookbook. You can buy a physical copy, or you can reference the *.pdf the authors host. They cover more kinds of vector and matrix derivatives than you can shake a stick at.
answered Jul 16 at 14:57
Hans Musgrave
1,393111
1,393111
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2853471%2fchain-rule-for-partial-matrix-dervative%23new-answer', 'question_page');
);
Post as a guest
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
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
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