# Computing the Frechet Derivative of the Matrix Logarithm and Estimating the Condition Number

Al-Mohy, Awad H. and Higham, Nicholas J. and Relton, Samuel D. (2012) Computing the Frechet Derivative of the Matrix Logarithm and Estimating the Condition Number. [MIMS Preprint]

The most popular method for computing the matrix logarithm is the inverse scaling and squaring method, which is the basis of the recent algorithm of [A. H. Al-Mohy and N. J. Higham, \emph{Improved inverse scaling and squaring algorithms for the matrix logarithm}, SIAM J. Sci.\ Comput., 34 (2012), pp.~C152--C169]. We show that by differentiating the latter algorithm a backward stable algorithm for computing the Fr\'echet derivative of the matrix logarithm is obtained. This algorithm requires complex arithmetic, but we also develop a version that uses only real arithmetic when $A$ is real; as a special case we obtain a new algorithm for computing the logarithm of a real matrix in real arithmetic. We show experimentally that our two algorithms are more accurate and efficient than existing algorithms for computing the Fr\'echet derivative. We also show how the algorithms can be used to produce reliable estimates of the condition number of the matrix logarithm.