Let $A,B$ be Hermitian matrices ($A$ has positive or zero eigenvalues and $Tr A=Tr[A+\lambda B]=1$), and $\lambda$ is infinitesimal constant. How to expand \begin{equation} \ln(A+\lambda B) \end{equation} and \begin{equation} Tr[(A+\lambda B)\ln(A+\lambda B)] \end{equation} into powers of $\lambda$ as usually do in Taylor expansion of functions?

  • $\begingroup$ Use the Taylor series of logarithm. $\endgroup$ Commented Jan 12, 2017 at 4:54
  • $\begingroup$ That was a typo. Pls refresh your page and check the corrected version. $\endgroup$ Commented Jan 12, 2017 at 4:58
  • $\begingroup$ I refreshed my page. Do you mean if I want to compute the first coefficient in power of $\lambda$, I should compute $d(\ln(A+\lambda B))/d\lambda$? $\endgroup$ Commented Jan 12, 2017 at 5:06
  • 1
    $\begingroup$ But How to compute the derivative of matrix function like this? $\endgroup$ Commented Jan 12, 2017 at 5:07
  • $\begingroup$ Well google it .. you will find procedures of differentiating matrices.. $\endgroup$ Commented Jan 12, 2017 at 5:11

2 Answers 2


First note the derivative of the scalar function $$\eqalign{ f(x)&=x\log x\cr f^\prime=\frac{df}{dx}&=1+\log x }$$ Next, define a new matrix variable $$\eqalign{ M(\lambda) &= A+B\lambda \cr dM &= B\,d\lambda\cr }$$ Then use this result for the differential of the trace of a matrix function $$\eqalign{ d\operatorname{tr}f(M) &= f^\prime(M^T):dM }$$where colon denotes the Frobenius product, i.e. $\,\,A:B=\operatorname{tr}(A^TB)$

Now to adress your second question, let $$T(\lambda)=\operatorname{tr}(M\log M)=\operatorname{tr}(f(M))$$ and use the preceeding to find its gradient $g(\lambda)$ $$\eqalign{ dT &= f^\prime(M^T):dM \cr &=(I+\log M)^T:B\,d\lambda \cr &= \operatorname{tr}(B(I+\log M))\,d\lambda \cr\cr g(\lambda) &= \frac{\partial T}{\partial\lambda} = \operatorname{tr}(B+B\log M) \cr\cr }$$ At $\lambda=0$, we can evaluate each of these quantities $$\eqalign{ M(0) &= A \cr T(0) &= \operatorname{tr}(A\log A) \cr g(0) &= \operatorname{tr}(B+B\log A) \cr\cr }$$ Finally, we can expand $T(\lambda)$ about $\lambda=0$ $$\eqalign{ T(\lambda) &= T(0) + \lambda g(0) \cr &\approx \operatorname{tr}(A\log A) + \lambda\operatorname{tr}(B+B\log A) \cr\cr\cr }$$

As for your first question, you could apply the block-triangular method of Kenney and Laub $$\eqalign{ L = \log\Bigg(\begin{bmatrix}A&B\\0&A\end{bmatrix}\Bigg) = \begin{bmatrix}\log A&\frac{d\log M}{d\lambda}|_{\lambda=0}\\0&\log A\end{bmatrix} \cr\cr }$$ and then $$\eqalign{ \log(M) &= \log(A+\lambda B) \cr &\approx \log(A) + \,\lambda\,\,\begin{bmatrix}I&0\end{bmatrix}L\begin{bmatrix}0\\I\end{bmatrix} \cr }$$


Stephen L Adler wrote a nice set of notes, entitled Taylor Expansion and Derivative Formulas for Matrix Logarithms.

He shows (at a physicist level of rigor) that

$$\ln (A + t B) = \ln(A) + t \int_0^\infty \frac{1}{A+z}B\frac{1}{A+z}dz+\mathcal O(t^2).$$

The starting point is the matrix expansion:


which can be verified by multiplying both sides by $A+tB$ and expanding.

A second important identity is

$$\int_0^u \frac{1}{X+z}dz=\ln(X+u)-\ln(X).$$

For us, matrix $X$ could be either $A$ or $A+tB$. Expanding these inverse matrices under the integral, then manipulating the resulting logarithms, then finally taking the limit $u \rightarrow \infty$, gives the desired result for $\ln (A+tB)$ to all orders in $t$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .