Are the same expression kronecker Product and vec operator representation when differentiating a matrix by a...











up vote
0
down vote

favorite












When differentiating a matrix by a matrix it is true that dA(X)/dX is the same thing as dvec(A(X))/dvec(X) acorrording to this paper.



So, I compared kronecker product representation with vec operator representation following case.



$mathbf{Y}=(2,3)$, $mathbf{X}=(4,2)$



$$
begin{aligned}
frac{partial mathbf{Y}}{partial mathbf{X}} &= frac{partial }{partial mathbf{X}} otimes mathbf{Y} \[10pt]
&=left[begin{array}{cc}
dfrac{partial }{partial X_{11}} & dfrac{partial }{partial X_{12}} \
dfrac{partial }{partial X_{21}} & dfrac{partial }{partial X_{22}} \
dfrac{partial }{partial X_{31}} & dfrac{partial }{partial X_{32}} \
dfrac{partial }{partial X_{41}} & dfrac{partial }{partial X_{42}}
end{array}right] otimes mathbf{Y} \[10pt]
&= left[begin{array}{ccc|ccc}
dfrac{partial Y_{11}}{partial X_{11}} &
dfrac{partial Y_{12}}{partial X_{11}} &
dfrac{partial Y_{13}}{partial X_{11}} &
dfrac{partial Y_{11}}{partial X_{12}} &
dfrac{partial Y_{12}}{partial X_{12}} &
dfrac{partial Y_{13}}{partial X_{12}} \
dfrac{partial Y_{21}}{partial X_{11}} &
dfrac{partial Y_{22}}{partial X_{11}} &
dfrac{partial Y_{23}}{partial X_{11}} &
dfrac{partial Y_{21}}{partial X_{12}} &
dfrac{partial Y_{22}}{partial X_{12}} &
dfrac{partial Y_{23}}{partial X_{12}} \[10pt] hline
dfrac{partial Y_{11}}{partial X_{21}} &
dfrac{partial Y_{12}}{partial X_{21}} &
dfrac{partial Y_{13}}{partial X_{21}} &
dfrac{partial Y_{11}}{partial X_{22}} &
dfrac{partial Y_{12}}{partial X_{22}} &
dfrac{partial Y_{13}}{partial X_{22}} \
dfrac{partial Y_{21}}{partial X_{21}} &
dfrac{partial Y_{22}}{partial X_{21}} &
dfrac{partial Y_{23}}{partial X_{21}} &
dfrac{partial Y_{21}}{partial X_{22}} &
dfrac{partial Y_{22}}{partial X_{22}} &
dfrac{partial Y_{23}}{partial X_{22}} \[10pt] hline
dfrac{partial Y_{11}}{partial X_{31}} &
dfrac{partial Y_{12}}{partial X_{31}} &
dfrac{partial Y_{13}}{partial X_{31}} &
dfrac{partial Y_{11}}{partial X_{32}} &
dfrac{partial Y_{12}}{partial X_{32}} &
dfrac{partial Y_{13}}{partial X_{32}} \
dfrac{partial Y_{21}}{partial X_{31}} &
dfrac{partial Y_{22}}{partial X_{31}} &
dfrac{partial Y_{23}}{partial X_{31}} &
dfrac{partial Y_{21}}{partial X_{32}} &
dfrac{partial Y_{22}}{partial X_{32}} &
dfrac{partial Y_{23}}{partial X_{32}} \[10pt] hline
dfrac{partial Y_{11}}{partial X_{41}} &
dfrac{partial Y_{12}}{partial X_{41}} &
dfrac{partial Y_{13}}{partial X_{41}} &
dfrac{partial Y_{11}}{partial X_{42}} &
dfrac{partial Y_{12}}{partial X_{42}} &
dfrac{partial Y_{13}}{partial X_{42}} \
dfrac{partial Y_{21}}{partial X_{41}} &
dfrac{partial Y_{22}}{partial X_{41}} &
dfrac{partial Y_{23}}{partial X_{41}} &
dfrac{partial Y_{21}}{partial X_{42}} &
dfrac{partial Y_{22}}{partial X_{42}} &
dfrac{partial Y_{23}}{partial X_{42}}
end{array}
right]
end{aligned}
$$



and



$ text{vec}(mathbf{Y})= mathbf{y}= begin{bmatrix} y_{11} & y_{21} & y_{12} & y_{22} & y_{13} & y_{23} end{bmatrix}^T$



$ text{vec}(mathbf{X})= mathbf{x}= begin{bmatrix} x_{11} & x_{21} & x_{31} & x_{41} & x_{12} & x_{22} & x_{32} & x_{42} end{bmatrix}^T$



$$
begin{aligned}
frac{partial text{vec}(mathbf{Y})}{partial text{vec}(mathbf{X})} &= frac{partial mathbf{y}}{partial mathbf{x}} \
&= left[begin{array}{cccccc}
dfrac{partial Y_{11}}{partial X_{11}} &
dfrac{partial Y_{21}}{partial X_{11}} &
dfrac{partial Y_{12}}{partial X_{11}} &
dfrac{partial Y_{22}}{partial X_{11}} &
dfrac{partial Y_{13}}{partial X_{11}} &
dfrac{partial Y_{23}}{partial X_{11}} \[5pt]
dfrac{partial Y_{11}}{partial X_{21}} &
dfrac{partial Y_{21}}{partial X_{21}} &
dfrac{partial Y_{12}}{partial X_{21}} &
dfrac{partial Y_{22}}{partial X_{21}} &
dfrac{partial Y_{13}}{partial X_{21}} &
dfrac{partial Y_{23}}{partial X_{21}} \[5pt]
dfrac{partial Y_{11}}{partial X_{31}} &
dfrac{partial Y_{21}}{partial X_{31}} &
dfrac{partial Y_{12}}{partial X_{31}} &
dfrac{partial Y_{22}}{partial X_{31}} &
dfrac{partial Y_{13}}{partial X_{31}} &
dfrac{partial Y_{23}}{partial X_{31}} \[5pt]
dfrac{partial Y_{11}}{partial X_{41}} &
dfrac{partial Y_{21}}{partial X_{41}} &
dfrac{partial Y_{12}}{partial X_{41}} &
dfrac{partial Y_{22}}{partial X_{41}} &
dfrac{partial Y_{13}}{partial X_{41}} &
dfrac{partial Y_{23}}{partial X_{41}} \[5pt]
dfrac{partial Y_{11}}{partial X_{12}} &
dfrac{partial Y_{21}}{partial X_{12}} &
dfrac{partial Y_{12}}{partial X_{12}} &
dfrac{partial Y_{22}}{partial X_{12}} &
dfrac{partial Y_{13}}{partial X_{12}} &
dfrac{partial Y_{23}}{partial X_{12}} \[5pt]
dfrac{partial Y_{11}}{partial X_{22}} &
dfrac{partial Y_{21}}{partial X_{22}} &
dfrac{partial Y_{12}}{partial X_{22}} &
dfrac{partial Y_{22}}{partial X_{22}} &
dfrac{partial Y_{13}}{partial X_{22}} &
dfrac{partial Y_{23}}{partial X_{22}} \[5pt]
dfrac{partial Y_{11}}{partial X_{32}} &
dfrac{partial Y_{21}}{partial X_{32}} &
dfrac{partial Y_{12}}{partial X_{32}} &
dfrac{partial Y_{22}}{partial X_{32}} &
dfrac{partial Y_{13}}{partial X_{32}} &
dfrac{partial Y_{23}}{partial X_{32}} \[5pt]
dfrac{partial Y_{11}}{partial X_{42}} &
dfrac{partial Y_{21}}{partial X_{42}} &
dfrac{partial Y_{12}}{partial X_{42}} &
dfrac{partial Y_{22}}{partial X_{42}} &
dfrac{partial Y_{13}}{partial X_{42}} &
dfrac{partial Y_{23}}{partial X_{42}}
end{array}
right]
end{aligned}
$$



If these results are the same, how do I transpose $frac{partial }{partial mathbf{X}} otimes mathbf{Y}$ to make it equal to $frac{partial text{vec}(mathbf{Y})}{partial text{vec}(mathbf{X})}$?










share|cite|improve this question


























    up vote
    0
    down vote

    favorite












    When differentiating a matrix by a matrix it is true that dA(X)/dX is the same thing as dvec(A(X))/dvec(X) acorrording to this paper.



    So, I compared kronecker product representation with vec operator representation following case.



    $mathbf{Y}=(2,3)$, $mathbf{X}=(4,2)$



    $$
    begin{aligned}
    frac{partial mathbf{Y}}{partial mathbf{X}} &= frac{partial }{partial mathbf{X}} otimes mathbf{Y} \[10pt]
    &=left[begin{array}{cc}
    dfrac{partial }{partial X_{11}} & dfrac{partial }{partial X_{12}} \
    dfrac{partial }{partial X_{21}} & dfrac{partial }{partial X_{22}} \
    dfrac{partial }{partial X_{31}} & dfrac{partial }{partial X_{32}} \
    dfrac{partial }{partial X_{41}} & dfrac{partial }{partial X_{42}}
    end{array}right] otimes mathbf{Y} \[10pt]
    &= left[begin{array}{ccc|ccc}
    dfrac{partial Y_{11}}{partial X_{11}} &
    dfrac{partial Y_{12}}{partial X_{11}} &
    dfrac{partial Y_{13}}{partial X_{11}} &
    dfrac{partial Y_{11}}{partial X_{12}} &
    dfrac{partial Y_{12}}{partial X_{12}} &
    dfrac{partial Y_{13}}{partial X_{12}} \
    dfrac{partial Y_{21}}{partial X_{11}} &
    dfrac{partial Y_{22}}{partial X_{11}} &
    dfrac{partial Y_{23}}{partial X_{11}} &
    dfrac{partial Y_{21}}{partial X_{12}} &
    dfrac{partial Y_{22}}{partial X_{12}} &
    dfrac{partial Y_{23}}{partial X_{12}} \[10pt] hline
    dfrac{partial Y_{11}}{partial X_{21}} &
    dfrac{partial Y_{12}}{partial X_{21}} &
    dfrac{partial Y_{13}}{partial X_{21}} &
    dfrac{partial Y_{11}}{partial X_{22}} &
    dfrac{partial Y_{12}}{partial X_{22}} &
    dfrac{partial Y_{13}}{partial X_{22}} \
    dfrac{partial Y_{21}}{partial X_{21}} &
    dfrac{partial Y_{22}}{partial X_{21}} &
    dfrac{partial Y_{23}}{partial X_{21}} &
    dfrac{partial Y_{21}}{partial X_{22}} &
    dfrac{partial Y_{22}}{partial X_{22}} &
    dfrac{partial Y_{23}}{partial X_{22}} \[10pt] hline
    dfrac{partial Y_{11}}{partial X_{31}} &
    dfrac{partial Y_{12}}{partial X_{31}} &
    dfrac{partial Y_{13}}{partial X_{31}} &
    dfrac{partial Y_{11}}{partial X_{32}} &
    dfrac{partial Y_{12}}{partial X_{32}} &
    dfrac{partial Y_{13}}{partial X_{32}} \
    dfrac{partial Y_{21}}{partial X_{31}} &
    dfrac{partial Y_{22}}{partial X_{31}} &
    dfrac{partial Y_{23}}{partial X_{31}} &
    dfrac{partial Y_{21}}{partial X_{32}} &
    dfrac{partial Y_{22}}{partial X_{32}} &
    dfrac{partial Y_{23}}{partial X_{32}} \[10pt] hline
    dfrac{partial Y_{11}}{partial X_{41}} &
    dfrac{partial Y_{12}}{partial X_{41}} &
    dfrac{partial Y_{13}}{partial X_{41}} &
    dfrac{partial Y_{11}}{partial X_{42}} &
    dfrac{partial Y_{12}}{partial X_{42}} &
    dfrac{partial Y_{13}}{partial X_{42}} \
    dfrac{partial Y_{21}}{partial X_{41}} &
    dfrac{partial Y_{22}}{partial X_{41}} &
    dfrac{partial Y_{23}}{partial X_{41}} &
    dfrac{partial Y_{21}}{partial X_{42}} &
    dfrac{partial Y_{22}}{partial X_{42}} &
    dfrac{partial Y_{23}}{partial X_{42}}
    end{array}
    right]
    end{aligned}
    $$



    and



    $ text{vec}(mathbf{Y})= mathbf{y}= begin{bmatrix} y_{11} & y_{21} & y_{12} & y_{22} & y_{13} & y_{23} end{bmatrix}^T$



    $ text{vec}(mathbf{X})= mathbf{x}= begin{bmatrix} x_{11} & x_{21} & x_{31} & x_{41} & x_{12} & x_{22} & x_{32} & x_{42} end{bmatrix}^T$



    $$
    begin{aligned}
    frac{partial text{vec}(mathbf{Y})}{partial text{vec}(mathbf{X})} &= frac{partial mathbf{y}}{partial mathbf{x}} \
    &= left[begin{array}{cccccc}
    dfrac{partial Y_{11}}{partial X_{11}} &
    dfrac{partial Y_{21}}{partial X_{11}} &
    dfrac{partial Y_{12}}{partial X_{11}} &
    dfrac{partial Y_{22}}{partial X_{11}} &
    dfrac{partial Y_{13}}{partial X_{11}} &
    dfrac{partial Y_{23}}{partial X_{11}} \[5pt]
    dfrac{partial Y_{11}}{partial X_{21}} &
    dfrac{partial Y_{21}}{partial X_{21}} &
    dfrac{partial Y_{12}}{partial X_{21}} &
    dfrac{partial Y_{22}}{partial X_{21}} &
    dfrac{partial Y_{13}}{partial X_{21}} &
    dfrac{partial Y_{23}}{partial X_{21}} \[5pt]
    dfrac{partial Y_{11}}{partial X_{31}} &
    dfrac{partial Y_{21}}{partial X_{31}} &
    dfrac{partial Y_{12}}{partial X_{31}} &
    dfrac{partial Y_{22}}{partial X_{31}} &
    dfrac{partial Y_{13}}{partial X_{31}} &
    dfrac{partial Y_{23}}{partial X_{31}} \[5pt]
    dfrac{partial Y_{11}}{partial X_{41}} &
    dfrac{partial Y_{21}}{partial X_{41}} &
    dfrac{partial Y_{12}}{partial X_{41}} &
    dfrac{partial Y_{22}}{partial X_{41}} &
    dfrac{partial Y_{13}}{partial X_{41}} &
    dfrac{partial Y_{23}}{partial X_{41}} \[5pt]
    dfrac{partial Y_{11}}{partial X_{12}} &
    dfrac{partial Y_{21}}{partial X_{12}} &
    dfrac{partial Y_{12}}{partial X_{12}} &
    dfrac{partial Y_{22}}{partial X_{12}} &
    dfrac{partial Y_{13}}{partial X_{12}} &
    dfrac{partial Y_{23}}{partial X_{12}} \[5pt]
    dfrac{partial Y_{11}}{partial X_{22}} &
    dfrac{partial Y_{21}}{partial X_{22}} &
    dfrac{partial Y_{12}}{partial X_{22}} &
    dfrac{partial Y_{22}}{partial X_{22}} &
    dfrac{partial Y_{13}}{partial X_{22}} &
    dfrac{partial Y_{23}}{partial X_{22}} \[5pt]
    dfrac{partial Y_{11}}{partial X_{32}} &
    dfrac{partial Y_{21}}{partial X_{32}} &
    dfrac{partial Y_{12}}{partial X_{32}} &
    dfrac{partial Y_{22}}{partial X_{32}} &
    dfrac{partial Y_{13}}{partial X_{32}} &
    dfrac{partial Y_{23}}{partial X_{32}} \[5pt]
    dfrac{partial Y_{11}}{partial X_{42}} &
    dfrac{partial Y_{21}}{partial X_{42}} &
    dfrac{partial Y_{12}}{partial X_{42}} &
    dfrac{partial Y_{22}}{partial X_{42}} &
    dfrac{partial Y_{13}}{partial X_{42}} &
    dfrac{partial Y_{23}}{partial X_{42}}
    end{array}
    right]
    end{aligned}
    $$



    If these results are the same, how do I transpose $frac{partial }{partial mathbf{X}} otimes mathbf{Y}$ to make it equal to $frac{partial text{vec}(mathbf{Y})}{partial text{vec}(mathbf{X})}$?










    share|cite|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      When differentiating a matrix by a matrix it is true that dA(X)/dX is the same thing as dvec(A(X))/dvec(X) acorrording to this paper.



      So, I compared kronecker product representation with vec operator representation following case.



      $mathbf{Y}=(2,3)$, $mathbf{X}=(4,2)$



      $$
      begin{aligned}
      frac{partial mathbf{Y}}{partial mathbf{X}} &= frac{partial }{partial mathbf{X}} otimes mathbf{Y} \[10pt]
      &=left[begin{array}{cc}
      dfrac{partial }{partial X_{11}} & dfrac{partial }{partial X_{12}} \
      dfrac{partial }{partial X_{21}} & dfrac{partial }{partial X_{22}} \
      dfrac{partial }{partial X_{31}} & dfrac{partial }{partial X_{32}} \
      dfrac{partial }{partial X_{41}} & dfrac{partial }{partial X_{42}}
      end{array}right] otimes mathbf{Y} \[10pt]
      &= left[begin{array}{ccc|ccc}
      dfrac{partial Y_{11}}{partial X_{11}} &
      dfrac{partial Y_{12}}{partial X_{11}} &
      dfrac{partial Y_{13}}{partial X_{11}} &
      dfrac{partial Y_{11}}{partial X_{12}} &
      dfrac{partial Y_{12}}{partial X_{12}} &
      dfrac{partial Y_{13}}{partial X_{12}} \
      dfrac{partial Y_{21}}{partial X_{11}} &
      dfrac{partial Y_{22}}{partial X_{11}} &
      dfrac{partial Y_{23}}{partial X_{11}} &
      dfrac{partial Y_{21}}{partial X_{12}} &
      dfrac{partial Y_{22}}{partial X_{12}} &
      dfrac{partial Y_{23}}{partial X_{12}} \[10pt] hline
      dfrac{partial Y_{11}}{partial X_{21}} &
      dfrac{partial Y_{12}}{partial X_{21}} &
      dfrac{partial Y_{13}}{partial X_{21}} &
      dfrac{partial Y_{11}}{partial X_{22}} &
      dfrac{partial Y_{12}}{partial X_{22}} &
      dfrac{partial Y_{13}}{partial X_{22}} \
      dfrac{partial Y_{21}}{partial X_{21}} &
      dfrac{partial Y_{22}}{partial X_{21}} &
      dfrac{partial Y_{23}}{partial X_{21}} &
      dfrac{partial Y_{21}}{partial X_{22}} &
      dfrac{partial Y_{22}}{partial X_{22}} &
      dfrac{partial Y_{23}}{partial X_{22}} \[10pt] hline
      dfrac{partial Y_{11}}{partial X_{31}} &
      dfrac{partial Y_{12}}{partial X_{31}} &
      dfrac{partial Y_{13}}{partial X_{31}} &
      dfrac{partial Y_{11}}{partial X_{32}} &
      dfrac{partial Y_{12}}{partial X_{32}} &
      dfrac{partial Y_{13}}{partial X_{32}} \
      dfrac{partial Y_{21}}{partial X_{31}} &
      dfrac{partial Y_{22}}{partial X_{31}} &
      dfrac{partial Y_{23}}{partial X_{31}} &
      dfrac{partial Y_{21}}{partial X_{32}} &
      dfrac{partial Y_{22}}{partial X_{32}} &
      dfrac{partial Y_{23}}{partial X_{32}} \[10pt] hline
      dfrac{partial Y_{11}}{partial X_{41}} &
      dfrac{partial Y_{12}}{partial X_{41}} &
      dfrac{partial Y_{13}}{partial X_{41}} &
      dfrac{partial Y_{11}}{partial X_{42}} &
      dfrac{partial Y_{12}}{partial X_{42}} &
      dfrac{partial Y_{13}}{partial X_{42}} \
      dfrac{partial Y_{21}}{partial X_{41}} &
      dfrac{partial Y_{22}}{partial X_{41}} &
      dfrac{partial Y_{23}}{partial X_{41}} &
      dfrac{partial Y_{21}}{partial X_{42}} &
      dfrac{partial Y_{22}}{partial X_{42}} &
      dfrac{partial Y_{23}}{partial X_{42}}
      end{array}
      right]
      end{aligned}
      $$



      and



      $ text{vec}(mathbf{Y})= mathbf{y}= begin{bmatrix} y_{11} & y_{21} & y_{12} & y_{22} & y_{13} & y_{23} end{bmatrix}^T$



      $ text{vec}(mathbf{X})= mathbf{x}= begin{bmatrix} x_{11} & x_{21} & x_{31} & x_{41} & x_{12} & x_{22} & x_{32} & x_{42} end{bmatrix}^T$



      $$
      begin{aligned}
      frac{partial text{vec}(mathbf{Y})}{partial text{vec}(mathbf{X})} &= frac{partial mathbf{y}}{partial mathbf{x}} \
      &= left[begin{array}{cccccc}
      dfrac{partial Y_{11}}{partial X_{11}} &
      dfrac{partial Y_{21}}{partial X_{11}} &
      dfrac{partial Y_{12}}{partial X_{11}} &
      dfrac{partial Y_{22}}{partial X_{11}} &
      dfrac{partial Y_{13}}{partial X_{11}} &
      dfrac{partial Y_{23}}{partial X_{11}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{21}} &
      dfrac{partial Y_{21}}{partial X_{21}} &
      dfrac{partial Y_{12}}{partial X_{21}} &
      dfrac{partial Y_{22}}{partial X_{21}} &
      dfrac{partial Y_{13}}{partial X_{21}} &
      dfrac{partial Y_{23}}{partial X_{21}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{31}} &
      dfrac{partial Y_{21}}{partial X_{31}} &
      dfrac{partial Y_{12}}{partial X_{31}} &
      dfrac{partial Y_{22}}{partial X_{31}} &
      dfrac{partial Y_{13}}{partial X_{31}} &
      dfrac{partial Y_{23}}{partial X_{31}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{41}} &
      dfrac{partial Y_{21}}{partial X_{41}} &
      dfrac{partial Y_{12}}{partial X_{41}} &
      dfrac{partial Y_{22}}{partial X_{41}} &
      dfrac{partial Y_{13}}{partial X_{41}} &
      dfrac{partial Y_{23}}{partial X_{41}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{12}} &
      dfrac{partial Y_{21}}{partial X_{12}} &
      dfrac{partial Y_{12}}{partial X_{12}} &
      dfrac{partial Y_{22}}{partial X_{12}} &
      dfrac{partial Y_{13}}{partial X_{12}} &
      dfrac{partial Y_{23}}{partial X_{12}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{22}} &
      dfrac{partial Y_{21}}{partial X_{22}} &
      dfrac{partial Y_{12}}{partial X_{22}} &
      dfrac{partial Y_{22}}{partial X_{22}} &
      dfrac{partial Y_{13}}{partial X_{22}} &
      dfrac{partial Y_{23}}{partial X_{22}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{32}} &
      dfrac{partial Y_{21}}{partial X_{32}} &
      dfrac{partial Y_{12}}{partial X_{32}} &
      dfrac{partial Y_{22}}{partial X_{32}} &
      dfrac{partial Y_{13}}{partial X_{32}} &
      dfrac{partial Y_{23}}{partial X_{32}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{42}} &
      dfrac{partial Y_{21}}{partial X_{42}} &
      dfrac{partial Y_{12}}{partial X_{42}} &
      dfrac{partial Y_{22}}{partial X_{42}} &
      dfrac{partial Y_{13}}{partial X_{42}} &
      dfrac{partial Y_{23}}{partial X_{42}}
      end{array}
      right]
      end{aligned}
      $$



      If these results are the same, how do I transpose $frac{partial }{partial mathbf{X}} otimes mathbf{Y}$ to make it equal to $frac{partial text{vec}(mathbf{Y})}{partial text{vec}(mathbf{X})}$?










      share|cite|improve this question













      When differentiating a matrix by a matrix it is true that dA(X)/dX is the same thing as dvec(A(X))/dvec(X) acorrording to this paper.



      So, I compared kronecker product representation with vec operator representation following case.



      $mathbf{Y}=(2,3)$, $mathbf{X}=(4,2)$



      $$
      begin{aligned}
      frac{partial mathbf{Y}}{partial mathbf{X}} &= frac{partial }{partial mathbf{X}} otimes mathbf{Y} \[10pt]
      &=left[begin{array}{cc}
      dfrac{partial }{partial X_{11}} & dfrac{partial }{partial X_{12}} \
      dfrac{partial }{partial X_{21}} & dfrac{partial }{partial X_{22}} \
      dfrac{partial }{partial X_{31}} & dfrac{partial }{partial X_{32}} \
      dfrac{partial }{partial X_{41}} & dfrac{partial }{partial X_{42}}
      end{array}right] otimes mathbf{Y} \[10pt]
      &= left[begin{array}{ccc|ccc}
      dfrac{partial Y_{11}}{partial X_{11}} &
      dfrac{partial Y_{12}}{partial X_{11}} &
      dfrac{partial Y_{13}}{partial X_{11}} &
      dfrac{partial Y_{11}}{partial X_{12}} &
      dfrac{partial Y_{12}}{partial X_{12}} &
      dfrac{partial Y_{13}}{partial X_{12}} \
      dfrac{partial Y_{21}}{partial X_{11}} &
      dfrac{partial Y_{22}}{partial X_{11}} &
      dfrac{partial Y_{23}}{partial X_{11}} &
      dfrac{partial Y_{21}}{partial X_{12}} &
      dfrac{partial Y_{22}}{partial X_{12}} &
      dfrac{partial Y_{23}}{partial X_{12}} \[10pt] hline
      dfrac{partial Y_{11}}{partial X_{21}} &
      dfrac{partial Y_{12}}{partial X_{21}} &
      dfrac{partial Y_{13}}{partial X_{21}} &
      dfrac{partial Y_{11}}{partial X_{22}} &
      dfrac{partial Y_{12}}{partial X_{22}} &
      dfrac{partial Y_{13}}{partial X_{22}} \
      dfrac{partial Y_{21}}{partial X_{21}} &
      dfrac{partial Y_{22}}{partial X_{21}} &
      dfrac{partial Y_{23}}{partial X_{21}} &
      dfrac{partial Y_{21}}{partial X_{22}} &
      dfrac{partial Y_{22}}{partial X_{22}} &
      dfrac{partial Y_{23}}{partial X_{22}} \[10pt] hline
      dfrac{partial Y_{11}}{partial X_{31}} &
      dfrac{partial Y_{12}}{partial X_{31}} &
      dfrac{partial Y_{13}}{partial X_{31}} &
      dfrac{partial Y_{11}}{partial X_{32}} &
      dfrac{partial Y_{12}}{partial X_{32}} &
      dfrac{partial Y_{13}}{partial X_{32}} \
      dfrac{partial Y_{21}}{partial X_{31}} &
      dfrac{partial Y_{22}}{partial X_{31}} &
      dfrac{partial Y_{23}}{partial X_{31}} &
      dfrac{partial Y_{21}}{partial X_{32}} &
      dfrac{partial Y_{22}}{partial X_{32}} &
      dfrac{partial Y_{23}}{partial X_{32}} \[10pt] hline
      dfrac{partial Y_{11}}{partial X_{41}} &
      dfrac{partial Y_{12}}{partial X_{41}} &
      dfrac{partial Y_{13}}{partial X_{41}} &
      dfrac{partial Y_{11}}{partial X_{42}} &
      dfrac{partial Y_{12}}{partial X_{42}} &
      dfrac{partial Y_{13}}{partial X_{42}} \
      dfrac{partial Y_{21}}{partial X_{41}} &
      dfrac{partial Y_{22}}{partial X_{41}} &
      dfrac{partial Y_{23}}{partial X_{41}} &
      dfrac{partial Y_{21}}{partial X_{42}} &
      dfrac{partial Y_{22}}{partial X_{42}} &
      dfrac{partial Y_{23}}{partial X_{42}}
      end{array}
      right]
      end{aligned}
      $$



      and



      $ text{vec}(mathbf{Y})= mathbf{y}= begin{bmatrix} y_{11} & y_{21} & y_{12} & y_{22} & y_{13} & y_{23} end{bmatrix}^T$



      $ text{vec}(mathbf{X})= mathbf{x}= begin{bmatrix} x_{11} & x_{21} & x_{31} & x_{41} & x_{12} & x_{22} & x_{32} & x_{42} end{bmatrix}^T$



      $$
      begin{aligned}
      frac{partial text{vec}(mathbf{Y})}{partial text{vec}(mathbf{X})} &= frac{partial mathbf{y}}{partial mathbf{x}} \
      &= left[begin{array}{cccccc}
      dfrac{partial Y_{11}}{partial X_{11}} &
      dfrac{partial Y_{21}}{partial X_{11}} &
      dfrac{partial Y_{12}}{partial X_{11}} &
      dfrac{partial Y_{22}}{partial X_{11}} &
      dfrac{partial Y_{13}}{partial X_{11}} &
      dfrac{partial Y_{23}}{partial X_{11}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{21}} &
      dfrac{partial Y_{21}}{partial X_{21}} &
      dfrac{partial Y_{12}}{partial X_{21}} &
      dfrac{partial Y_{22}}{partial X_{21}} &
      dfrac{partial Y_{13}}{partial X_{21}} &
      dfrac{partial Y_{23}}{partial X_{21}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{31}} &
      dfrac{partial Y_{21}}{partial X_{31}} &
      dfrac{partial Y_{12}}{partial X_{31}} &
      dfrac{partial Y_{22}}{partial X_{31}} &
      dfrac{partial Y_{13}}{partial X_{31}} &
      dfrac{partial Y_{23}}{partial X_{31}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{41}} &
      dfrac{partial Y_{21}}{partial X_{41}} &
      dfrac{partial Y_{12}}{partial X_{41}} &
      dfrac{partial Y_{22}}{partial X_{41}} &
      dfrac{partial Y_{13}}{partial X_{41}} &
      dfrac{partial Y_{23}}{partial X_{41}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{12}} &
      dfrac{partial Y_{21}}{partial X_{12}} &
      dfrac{partial Y_{12}}{partial X_{12}} &
      dfrac{partial Y_{22}}{partial X_{12}} &
      dfrac{partial Y_{13}}{partial X_{12}} &
      dfrac{partial Y_{23}}{partial X_{12}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{22}} &
      dfrac{partial Y_{21}}{partial X_{22}} &
      dfrac{partial Y_{12}}{partial X_{22}} &
      dfrac{partial Y_{22}}{partial X_{22}} &
      dfrac{partial Y_{13}}{partial X_{22}} &
      dfrac{partial Y_{23}}{partial X_{22}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{32}} &
      dfrac{partial Y_{21}}{partial X_{32}} &
      dfrac{partial Y_{12}}{partial X_{32}} &
      dfrac{partial Y_{22}}{partial X_{32}} &
      dfrac{partial Y_{13}}{partial X_{32}} &
      dfrac{partial Y_{23}}{partial X_{32}} \[5pt]
      dfrac{partial Y_{11}}{partial X_{42}} &
      dfrac{partial Y_{21}}{partial X_{42}} &
      dfrac{partial Y_{12}}{partial X_{42}} &
      dfrac{partial Y_{22}}{partial X_{42}} &
      dfrac{partial Y_{13}}{partial X_{42}} &
      dfrac{partial Y_{23}}{partial X_{42}}
      end{array}
      right]
      end{aligned}
      $$



      If these results are the same, how do I transpose $frac{partial }{partial mathbf{X}} otimes mathbf{Y}$ to make it equal to $frac{partial text{vec}(mathbf{Y})}{partial text{vec}(mathbf{X})}$?







      matrix-calculus kronecker-product






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Nov 12 at 6:47









      metamath

      235




      235






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          The derivative operation is a distraction, so let's omit it.



          Given the matrices
          $$eqalign{
          X &in {mathbb R}^{mtimes n} cr
          Y &in {mathbb R}^{ptimes q} cr
          }$$

          and their Kronecker products
          $$eqalign{
          A &= Xotimes Y &in {mathbb R}^{mptimes nq} cr
          B &= {rm vec}(X)otimes {rm vec}(Y)^T &in {mathbb R}^{mntimes pq}cr
          }$$

          you want to know how to transform $A implies B$



          The elements in these matrices are identical. The only difference is in the matrix dimensions and in the ordering of the elements.



          Vectorizing the matrices yields two vectors related by a permutation.
          $$eqalign{
          P,{rm vec}(A) &= {rm vec}(B) cr
          Pa &= b cr
          P_{ij},a_j &= b_i cr
          }$$

          The elements of the permuation are easy to find:

             $P_{ij}$ equals one if the $j^{th}$ element of $a$ maps to the $i^{th}$ element of $b$.



          The single-entry matrix $E_{mn}$ has all elements equal to zero, except for the $(m,n)$ element which is equal to one. Replacing $(X,Y)$ by single-entry matrices leads to $(A,B)$ becoming single-entry matrices and $(a,b)$ becoming single-entry vectors.



          The non-zero elements of $P$ can be found by iterating through every possible single-entry matrix for the input matrices $X ,{rm and}, Y$. Then setting $,P_{ij}=1$, where the non-zero elements of the output vectors $(b,a)$ are observed at $(b_i,a_j)$.



          The permutation depends only on the dimensions of the starting matrices. For your derivative expressions the dimensions are $(m,n,p,q)=(4,2,2,3)$ and the transformation is
          $${rm vec}Bigg(frac{partial{rm vec}(Y)}{partial{rm vec}(X)}Bigg) = P,,{rm vec}Bigg(frac{partial}{partial X}otimes YBigg) $$






          share|cite|improve this answer























            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: 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%2f2994955%2fare-the-same-expression-kronecker-product-and-vec-operator-representation-when-d%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








            up vote
            0
            down vote













            The derivative operation is a distraction, so let's omit it.



            Given the matrices
            $$eqalign{
            X &in {mathbb R}^{mtimes n} cr
            Y &in {mathbb R}^{ptimes q} cr
            }$$

            and their Kronecker products
            $$eqalign{
            A &= Xotimes Y &in {mathbb R}^{mptimes nq} cr
            B &= {rm vec}(X)otimes {rm vec}(Y)^T &in {mathbb R}^{mntimes pq}cr
            }$$

            you want to know how to transform $A implies B$



            The elements in these matrices are identical. The only difference is in the matrix dimensions and in the ordering of the elements.



            Vectorizing the matrices yields two vectors related by a permutation.
            $$eqalign{
            P,{rm vec}(A) &= {rm vec}(B) cr
            Pa &= b cr
            P_{ij},a_j &= b_i cr
            }$$

            The elements of the permuation are easy to find:

               $P_{ij}$ equals one if the $j^{th}$ element of $a$ maps to the $i^{th}$ element of $b$.



            The single-entry matrix $E_{mn}$ has all elements equal to zero, except for the $(m,n)$ element which is equal to one. Replacing $(X,Y)$ by single-entry matrices leads to $(A,B)$ becoming single-entry matrices and $(a,b)$ becoming single-entry vectors.



            The non-zero elements of $P$ can be found by iterating through every possible single-entry matrix for the input matrices $X ,{rm and}, Y$. Then setting $,P_{ij}=1$, where the non-zero elements of the output vectors $(b,a)$ are observed at $(b_i,a_j)$.



            The permutation depends only on the dimensions of the starting matrices. For your derivative expressions the dimensions are $(m,n,p,q)=(4,2,2,3)$ and the transformation is
            $${rm vec}Bigg(frac{partial{rm vec}(Y)}{partial{rm vec}(X)}Bigg) = P,,{rm vec}Bigg(frac{partial}{partial X}otimes YBigg) $$






            share|cite|improve this answer



























              up vote
              0
              down vote













              The derivative operation is a distraction, so let's omit it.



              Given the matrices
              $$eqalign{
              X &in {mathbb R}^{mtimes n} cr
              Y &in {mathbb R}^{ptimes q} cr
              }$$

              and their Kronecker products
              $$eqalign{
              A &= Xotimes Y &in {mathbb R}^{mptimes nq} cr
              B &= {rm vec}(X)otimes {rm vec}(Y)^T &in {mathbb R}^{mntimes pq}cr
              }$$

              you want to know how to transform $A implies B$



              The elements in these matrices are identical. The only difference is in the matrix dimensions and in the ordering of the elements.



              Vectorizing the matrices yields two vectors related by a permutation.
              $$eqalign{
              P,{rm vec}(A) &= {rm vec}(B) cr
              Pa &= b cr
              P_{ij},a_j &= b_i cr
              }$$

              The elements of the permuation are easy to find:

                 $P_{ij}$ equals one if the $j^{th}$ element of $a$ maps to the $i^{th}$ element of $b$.



              The single-entry matrix $E_{mn}$ has all elements equal to zero, except for the $(m,n)$ element which is equal to one. Replacing $(X,Y)$ by single-entry matrices leads to $(A,B)$ becoming single-entry matrices and $(a,b)$ becoming single-entry vectors.



              The non-zero elements of $P$ can be found by iterating through every possible single-entry matrix for the input matrices $X ,{rm and}, Y$. Then setting $,P_{ij}=1$, where the non-zero elements of the output vectors $(b,a)$ are observed at $(b_i,a_j)$.



              The permutation depends only on the dimensions of the starting matrices. For your derivative expressions the dimensions are $(m,n,p,q)=(4,2,2,3)$ and the transformation is
              $${rm vec}Bigg(frac{partial{rm vec}(Y)}{partial{rm vec}(X)}Bigg) = P,,{rm vec}Bigg(frac{partial}{partial X}otimes YBigg) $$






              share|cite|improve this answer

























                up vote
                0
                down vote










                up vote
                0
                down vote









                The derivative operation is a distraction, so let's omit it.



                Given the matrices
                $$eqalign{
                X &in {mathbb R}^{mtimes n} cr
                Y &in {mathbb R}^{ptimes q} cr
                }$$

                and their Kronecker products
                $$eqalign{
                A &= Xotimes Y &in {mathbb R}^{mptimes nq} cr
                B &= {rm vec}(X)otimes {rm vec}(Y)^T &in {mathbb R}^{mntimes pq}cr
                }$$

                you want to know how to transform $A implies B$



                The elements in these matrices are identical. The only difference is in the matrix dimensions and in the ordering of the elements.



                Vectorizing the matrices yields two vectors related by a permutation.
                $$eqalign{
                P,{rm vec}(A) &= {rm vec}(B) cr
                Pa &= b cr
                P_{ij},a_j &= b_i cr
                }$$

                The elements of the permuation are easy to find:

                   $P_{ij}$ equals one if the $j^{th}$ element of $a$ maps to the $i^{th}$ element of $b$.



                The single-entry matrix $E_{mn}$ has all elements equal to zero, except for the $(m,n)$ element which is equal to one. Replacing $(X,Y)$ by single-entry matrices leads to $(A,B)$ becoming single-entry matrices and $(a,b)$ becoming single-entry vectors.



                The non-zero elements of $P$ can be found by iterating through every possible single-entry matrix for the input matrices $X ,{rm and}, Y$. Then setting $,P_{ij}=1$, where the non-zero elements of the output vectors $(b,a)$ are observed at $(b_i,a_j)$.



                The permutation depends only on the dimensions of the starting matrices. For your derivative expressions the dimensions are $(m,n,p,q)=(4,2,2,3)$ and the transformation is
                $${rm vec}Bigg(frac{partial{rm vec}(Y)}{partial{rm vec}(X)}Bigg) = P,,{rm vec}Bigg(frac{partial}{partial X}otimes YBigg) $$






                share|cite|improve this answer














                The derivative operation is a distraction, so let's omit it.



                Given the matrices
                $$eqalign{
                X &in {mathbb R}^{mtimes n} cr
                Y &in {mathbb R}^{ptimes q} cr
                }$$

                and their Kronecker products
                $$eqalign{
                A &= Xotimes Y &in {mathbb R}^{mptimes nq} cr
                B &= {rm vec}(X)otimes {rm vec}(Y)^T &in {mathbb R}^{mntimes pq}cr
                }$$

                you want to know how to transform $A implies B$



                The elements in these matrices are identical. The only difference is in the matrix dimensions and in the ordering of the elements.



                Vectorizing the matrices yields two vectors related by a permutation.
                $$eqalign{
                P,{rm vec}(A) &= {rm vec}(B) cr
                Pa &= b cr
                P_{ij},a_j &= b_i cr
                }$$

                The elements of the permuation are easy to find:

                   $P_{ij}$ equals one if the $j^{th}$ element of $a$ maps to the $i^{th}$ element of $b$.



                The single-entry matrix $E_{mn}$ has all elements equal to zero, except for the $(m,n)$ element which is equal to one. Replacing $(X,Y)$ by single-entry matrices leads to $(A,B)$ becoming single-entry matrices and $(a,b)$ becoming single-entry vectors.



                The non-zero elements of $P$ can be found by iterating through every possible single-entry matrix for the input matrices $X ,{rm and}, Y$. Then setting $,P_{ij}=1$, where the non-zero elements of the output vectors $(b,a)$ are observed at $(b_i,a_j)$.



                The permutation depends only on the dimensions of the starting matrices. For your derivative expressions the dimensions are $(m,n,p,q)=(4,2,2,3)$ and the transformation is
                $${rm vec}Bigg(frac{partial{rm vec}(Y)}{partial{rm vec}(X)}Bigg) = P,,{rm vec}Bigg(frac{partial}{partial X}otimes YBigg) $$







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited yesterday

























                answered Nov 16 at 13:35









                greg

                7,0701719




                7,0701719






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2994955%2fare-the-same-expression-kronecker-product-and-vec-operator-representation-when-d%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

                    'app-layout' is not a known element: how to share Component with different Modules

                    android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

                    WPF add header to Image with URL pettitions [duplicate]