# Thread: Derivative of matrix element

1. ## Derivative of matrix element

The derivative of a matrix element with respect to the matrix:

$\displaystyle \frac{d\ x_{ij}}{dX}$

Is there any equation or formula for it?

I could not find it on the Web. If you know any book treating it, I would appreciate the title.

Thanks!

2. Originally Posted by paolopiace
The derivative of a matrix element with respect to the matrix:

$\displaystyle \frac{d\ x_{ij}}{dX}$

Is there any equation or formula for it?

I could not find it on the Web. If you know any book treating it, I would appreciate the title.

Thanks!
Derivatives only make sense for functions so this matrix and matrix element must have one or more variables. Let's say that each element, and so the matrix, if a function of t. Then $\displaystyle \frac{dx_{ij}}{dt}$ is the derivative of the function $\displaystyle x_{ij}(t)$ and $\displaystyle \frac{dX}{dt}$ is the matrix having those derivatives as elements.

By the chain rule, $\displaystyle \frac{dx_{ij}}{dX}= \frac{dx_{ij}}{dt}\frac{dt}{dX}= \frac{dx_{ij}}{dt}\left(\frac{dX}{dt}\right)^{-1}$.

If that inverse does not exist, the derivative does not exist.

3. Originally Posted by HallsofIvy
Derivatives only make sense for functions so this matrix and matrix element must have one or more variables. Let's say that each element, and so the matrix, if a function of t. Then $\displaystyle \frac{dx_{ij}}{dt}$ is the derivative of the function $\displaystyle x_{ij}(t)$ and $\displaystyle \frac{dX}{dt}$ is the matrix having those derivatives as elements.

By the chain rule, $\displaystyle \frac{dx_{ij}}{dX}= \frac{dx_{ij}}{dt}\frac{dt}{dX}= \frac{dx_{ij}}{dt}\left(\frac{dX}{dt}\right)^{-1}$.

If that inverse does not exist, the derivative does not exist.
HallsofIvy,
There is no function. In $\displaystyle \frac{d x_{ij}}{d X}$ the matrix X is the variable in a quadratic form. To me, it seems like doing $\displaystyle \frac{d}{d x} x = 1$ in one dimension.
Anyway, I really reach the point where I have $\displaystyle \frac{d x_{ij}}{d X}$.

Does $\displaystyle \frac{d x_{ij}}{d X}$ = 1 make sense? Should I post the whole equation?

Thanks and Regards.

4. I agree with HallsofIvy. It is not orthodox mathematics to differentiate with respect to a matrix. Nevertheless, some people have tried to formulate such a concept, and you may find this Wikipedia page informative.

According to that page, if f(X) is a scalar-valued function of an n×m matrix X then the derivative $\displaystyle \frac{df}{dX}$ is defined to be the m×n matrix whose (i,j)-element is $\displaystyle \frac{\partial f}{\partial x_{ji}}$. In particular, if $\displaystyle f(X) = x_{ij}$ then $\displaystyle \frac{dx_{ij}}{dX}$ would be a matrix with a 1 in the (j,i)-position and zeros elsewhere.

But notice that much of the material on that Wikipedia page is disputed. I have no idea how reliable or useful this whole concept is.

5. Oplag, Thanks.

I see it's better if I post a shorter version of the whole function.

I need to obtain the analytic formula of following derivative:

$\displaystyle \frac{d}{d\Sigma}\left[ b^T \Sigma^{-1} b \right]$

where the dxd matrix Sigma is positive definite and decomposed as $\displaystyle \Sigma = AA^T$

$\displaystyle b = \frac{1}{2}\Sigma_{ii}$ is the n-dimensional vector composed of the diagonal of the matrix Sigma.

Although not much relevant, $\displaystyle \Sigma_{ii}= a_i^T a_i$ where ai is the i-th row of A.

Thanks for any help.

P.S. Actually, like $\displaystyle \frac{d}{dx}x = 1$ it could be that $\displaystyle \frac{d}{dX}X = I$. Thus, $\displaystyle \frac{d}{dX}x_{ij} = 1$ when i=j. Zero when i<>j.