Home > manopt > tools > dlogm.m

# dlogm

## PURPOSE

Fréchet derivative of the matrix logarithm.

## SYNOPSIS

function [D, fX] = dlogm(X, H)

## DESCRIPTION

``` Fréchet derivative of the matrix logarithm.

function [D, fX] = dlogm(X, H)

Computes the directional derivative (the Fréchet derivative) of logm at X
along H (square matrices).

Thus, D = lim_(t -> 0) (logm(X + tH) - logm(X)) / t.

The second output is fX = logm(X), though it may be less accurate.

Note: the adjoint of dlogm(X, .) is dlogm(X', .), which is a fact often
useful to derive gradients of matrix functions involving logm(X).
(This is wrt the inner product inner = @(A, B) real(trace(A'*B))).

## CROSS-REFERENCE INFORMATION

This function calls:
• dfunm Fréchet derivative of matrix functions.
This function is called by:

## SOURCE CODE

```0001 function [D, fX] = dlogm(X, H)
0002 % Fréchet derivative of the matrix logarithm.
0003 %
0004 % function [D, fX] = dlogm(X, H)
0005 %
0006 % Computes the directional derivative (the Fréchet derivative) of logm at X
0007 % along H (square matrices).
0008 %
0009 % Thus, D = lim_(t -> 0) (logm(X + tH) - logm(X)) / t.
0010 %
0011 % The second output is fX = logm(X), though it may be less accurate.
0012 %
0013 % Note: the adjoint of dlogm(X, .) is dlogm(X', .), which is a fact often
0014 % useful to derive gradients of matrix functions involving logm(X).
0015 % (This is wrt the inner product inner = @(A, B) real(trace(A'*B))).
0016 %