Differential of the product of two matrices

55 Views Asked by At

From Muirhead, Aspects of Multivariate Statistical Theory, pages 56-57.

For any matrix $X$, $\text{d}X$ denotes the matrix of differential ($\text{d}x_{ij}$). It's easy to check that if $X$ is a $n\times m$ and $Y$ is $m\times p$ then \begin{equation}\text{d}(XY)=X.\text{d}Y+\text{d}X.Y\end{equation}

I'm trying to figure out what kind of product is involved in the previous expression. In order to do that, I've tried to see what happen in the simple case $n\triangleq m\triangleq p\triangleq 2$.

example

If $n\triangleq m\triangleq p\triangleq 2$ then \begin{equation}X=\begin{bmatrix} x_{11} & x_{12} \\ x_{21} & x_{22} \\ \end{bmatrix} \qquad \text{d}X=\begin{bmatrix} \text{d}x_{11} & \text{d}x_{12} \\ \text{d}x_{21} & \text{d}x_{22} \\ \end{bmatrix}\quad Y=\begin{bmatrix} y_{11} & y_{12} \\ y_{21} & y_{22} \\ \end{bmatrix} \qquad \text{d}Y=\begin{bmatrix} \text{d}y_{11} & \text{d}y_{12} \\ \text{d}y_{21} & \text{d}y_{22} \\ \end{bmatrix}\end{equation} I start from \begin{equation} XY=\begin{bmatrix} x_{11}y_{11}+x_{12}y_{21} & x_{11}y_{12}+x_{12}y_{22} \\ x_{21}y_{11}+x_{22}y_{21} & x_{21}y_{12}+x_{22}y_{22} \end{bmatrix}\end{equation} then, I compute the differential of $XY$ element-wise. By recalling that for a scalar function $f(x)$ with $x=[x_1, \dots, x_n]'$, its differential in $x$ is defined as \begin{equation}\text{d}f(x)\triangleq \sum_{k=1}^n \frac{\partial\,f(x)}{\partial\, x_k}\text{d}x_k\end{equation} follows that for the first term of $\text{d}(XY)$ (element in position $i,j=1,1$) holds \begin{equation}\begin{aligned} \text{d}(x_{11}y_{11}+x_{12}y_{21})&=\text{d}(x_{11}y_{11})+\text{d}(x_{12}y_{21})\\ &=(y_{11}\text{d}x_{11}+x_{11}\text{d}y_{11}) +(y_{21}\text{d}x_{12}+x_{12}\text{d}y_{21})\\ &=y_{11}\text{d}x_{11}+x_{11}\text{d}y_{11} +y_{21}\text{d}x_{12}+x_{12}\text{d}y_{21} \end{aligned}\end{equation} so, with the same reasoning applied to the others 3 elements, follows \begin{equation} \text{d}(XY)=\begin{bmatrix} y_{11}\text{d}x_{11}+x_{11}\text{d}y_{11} +y_{21}\text{d}x_{12}+x_{12}\text{d}y_{21} & y_{12}\text{d}x_{11}+x_{11}\text{d}y_{12} +y_{22}\text{d}x_{12}+x_{12}\text{d}y_{22}\\ y_{11}\text{d}x_{21}+x_{21}\text{d}y_{11} +y_{21}\text{d}x_{22}+x_{22}\text{d}y_{21} & y_{12}\text{d}x_{21}+x_{21}\text{d}y_{12} +y_{22}\text{d}x_{22}+x_{22}\text{d}y_{22} \end{bmatrix}\end{equation} which can be written, by separating the differentials, as \begin{equation}\text{d}(XY)= \begin{bmatrix} y_{11}\text{d}x_{11}+y_{21}\text{d}x_{12} & y_{12}\text{d}x_{11}+y_{22}\text{d}x_{12} \\ y_{11}\text{d}x_{21}+y_{21}\text{d}x_{22} & y_{12}\text{d}x_{21}+y_{22}\text{d}x_{22} \end{bmatrix}+ \begin{bmatrix} x_{11}\text{d}y_{11}+x_{12}\text{d}y_{12} & x_{11}\text{d}y_{12}+x_{12}\text{d}y_{22} \\ x_{21}\text{d}y_{11}+x_{22}\text{d}y_{21} & x_{21}\text{d}y_{12}+x_{22}\text{d}y_{22} \end{bmatrix}\end{equation} In conclusion, it seems to me that \begin{equation}\text{d}X.Y=\begin{bmatrix} y_{11}\text{d}x_{11}+y_{21}\text{d}x_{12} & y_{12}\text{d}x_{11}+y_{22}\text{d}x_{12} \\ y_{11}\text{d}x_{21}+y_{21}\text{d}x_{22} & y_{12}\text{d}x_{21}+y_{22}\text{d}x_{22} \end{bmatrix}\end{equation} \begin{equation} \text{d}Y.X=\begin{bmatrix} x_{11}\text{d}y_{11}+x_{12}\text{d}y_{12} & x_{11}\text{d}y_{12}+x_{12}\text{d}y_{22} \\ x_{21}\text{d}y_{11}+x_{22}\text{d}y_{21} & x_{21}\text{d}y_{12}+x_{22}\text{d}y_{22} \end{bmatrix} \end{equation} In theese two expressions I don't recognise any type of matricial product between $\text{d}X$, $Y$ or between $\text{d}Y$, $X$ (not the usual product "rows times columns", nor the Hadamard or Kronecker products).

1

There are 1 best solutions below

2
On BEST ANSWER

Well, the condition is $$\mathrm{d}(\bf{A} \bf{B}) = \mathrm{d}\bf{A} .\bf{B}+\bf{A}.\mathrm{d}\bf{B} $$

So, \begin{align} \text{LHS}_{ij} &=\mathrm{d} \sum_k A_{ik}B_{kj} \\ &= \sum_k \mathrm{d} (A_{ik}B_{kj} + A_{ik}B_{kj}) \\ &= \sum_k (\mathrm{d}A_{ik}B_{kj} + A_{ik}\mathrm{d}B_{kj}) \\ &= \sum_k \mathrm{d} A_{ik}B_{kj} + \sum_k A_{ik}\mathrm{d}B_{kj} \\ &= \text{RHS}_{ij} \end{align}