Table Of Contents

Matrix Logarithm (G Dataflow)

Last Modified: January 9, 2017

Computes the natural logarithm of a square matrix.



A square matrix.

This input accepts a 2D array of double-precision, floating point numbers or 2D array of complex double-precision, floating point numbers.


logarithm option

Option for the logarithm that this node returns.

Name Value Description
General 0 Regards the input matrix as a complex matrix.
Real 1 Returns an exact real logarithm when the input matrix is a non-singular normal matrix and each of the negative eigenvalues occur an even number of times. When the input matrix is not normal or one of its negative eigenvalues occurs an odd number of times, this node returns the matrix logarithm as if logarithm option was General.

Default: General


error in

Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

Default: No error


matrix logarithm

The natural logarithm of the input matrix.


error out

Error information. The node produces this output according to standard error behavior.

Algorithm for Calculating the Logarithm of a Matrix

The natural logarithm is the inverse operation of the exponential. The following equation defines the natural logarithm of a matrix A:

e B = A


  • matrix B is the logarithm of matrix A.

A matrix has a logarithm if and only if its inverse matrix exists. For a real matrix A, its logarithm matrix B can be complex, and the conjugate of matrix B is also the natural logarithm of matrix A.

A real matrix A is normal if AAT = ATA.

For a non-singular normal matrix, if each negative eigenvalues of matrix A occur an even number of times, matrix A has a real logarithm. Note that this does not guarantee the uniqueness of the real logarithm.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Recently Viewed Topics