Gradient of $\log_2\operatorname{Tr}(AX)$

65 Views Asked by At

Consider complex-valued matrices $\mathbf{A}$ and $\mathbf{X}$ with proper size, such that the matrix product $\mathbf{AX}$ is defined. (In case it is needed in this question, $\mathbf{X}$ is a positive semi-definite (PSD) Hermitian matrix defined as $\mathbf{X}=\mathbf{x}\mathbf{x}^{T}$; this info might, however, not be useful in this particular question - this is not a homework assignment or anything like that.)

I am interested in calculating: $$ \nabla_{\mathbf{X}} \log_{2}\left(\operatorname{Tr}\left(\mathbf{AX}\right)\right)$$ I (think that I) know the following: $$\nabla_{\mathbf{X}} \operatorname{Tr}\left(\mathbf{AX}\right) = \mathbf{A}^{T}$$ I also know that if $x$ is a scalar, then $$\log_{2}(x)=\frac{\ln(x)}{\ln(2)}$$ which might be useful in case I have to utilize the natural logarithm instead of the base-2 one.

But I don't know how to compute the gradient in question. Any description of the steps taken/the procedure required for such a computation would be highly appreciated!

1

There are 1 best solutions below

0
On

If $A$ is hermitian, then $A^H=A\:$ and $\:A^T=A^*$

If $X$ is likewise hermitian, then the indicated trace function is $\sf Real$ and can be differentiated (in the Wirtinger sense) as follows $$\eqalign{ \def\f{{\large\tau}} \def\p{\partial} \f\; &= {\rm Tr}(AX) \:=\: A^T:X \\ d\f\, &= A^T:dX \\ \frac{\p\f}{\p X} &= A^T = A^* \\ }$$ where a colon has been used to denote the Frobenius product $$\eqalign{ B:C &= \sum_j\sum_k B_{jk}C_{jk} \;=\; {\rm Tr}\!\left(B^TC\right) \\ }$$ The last task is logarithmic differentiation $$\eqalign{ \def\e{\log_2(e)} \def\l{\lambda} \l &= \log_2(\f) \:=\: \e\cdot\log(\f) \\ \frac{\p\l}{\p X} &= \frac{\e}{\f}\left(\frac{\p\f}{\p X}\right) \:=\: \frac{A^T\e}{{\rm Tr}(AX)} \\ }$$