f01ed computes the matrix exponential, eA, of a real symmetric n by n matrix A.

Syntax

C#
public static void f01ed(
	string uplo,
	int n,
	double[,] a,
	out int ifail
)
Visual Basic
Public Shared Sub f01ed ( _
	uplo As String, _
	n As Integer, _
	a As Double(,), _
	<OutAttribute> ByRef ifail As Integer _
)
Visual C++
public:
static void f01ed(
	String^ uplo, 
	int n, 
	array<double,2>^ a, 
	[OutAttribute] int% ifail
)
F#
static member f01ed : 
        uplo : string * 
        n : int * 
        a : float[,] * 
        ifail : int byref -> unit 

Parameters

uplo
Type: System..::..String
On entry: indicates whether the upper or lower triangular part of A is stored.
uplo="U"
The upper triangular part of A is stored.
uplo="L"
The lower triangular part of A is stored.
Constraint: uplo="U" or "L".
n
Type: System..::..Int32
On entry: n, the order of the matrix A.
Constraint: n0.
a
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, dim2]
Note: dim1 must satisfy the constraint: dim1max1,n
Note: the second dimension of the array a must be at least n.
On entry: the n by n symmetric matrix A.
  • If uplo="U", the upper triangular part of A must be stored and the elements of the array below the diagonal are not referenced.
  • If uplo="L", the lower triangular part of A must be stored and the elements of the array above the diagonal are not referenced.
On exit: if ifail=0, the upper or lower triangular part of the n by n matrix exponential, eA.
ifail
Type: System..::..Int32%
On exit: ifail=0 unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).

Description

eA is computed using a spectral factorization of A 
A=QDQT,
where D is the diagonal matrix whose diagonal elements, di, are the eigenvalues of A, and Q is an orthogonal matrix whose columns are the eigenvectors of A. eA is then given by
eA=QeDQT,
where eD is the diagonal matrix whose ith diagonal element is edi. See for example Section 4.5 of Higham (2008).

References

Higham N J (2008) Functions of Matrices: Theory and Computation SIAM, Philadelphia, PA, USA
Moler C B and Van Loan C F (2003) Nineteen dubious ways to compute the exponential of a matrix, twenty-five years later SIAM Rev. 45 3–49

Error Indicators and Warnings

Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface (LDA) In these cases, an error in another parameter has usually caused an incorrect value to be inferred.
ifail=-1
On entry, uplo"L" or "U".
ifail=-2
On entry, n<0.
ifail=-3
An unexpected internal error occurred when computing the spectral factorization. Please contact NAG.
ifail=-4
On entry, lda<n.
ifail=-999
Allocation of memory failed. The integer allocatable memory required is n, and the real allocatable memory required is approximately n+nb+4×n, where nb is the block size required by f08fa.
ifail=iandifail>0
The algorithm to compute the spectral factorization failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero (see f08fa).
Note:  this failure is unlikely to occur.
ifail=-9000
An error occured, see message report.
ifail=-6000
Invalid Parameters value
ifail=-4000
Invalid dimension for array value
ifail=-8000
Negative dimension for array value
ifail=-6000
Invalid Parameters value

Accuracy

For a symmetric matrix A, the matrix eA, has the relative condition number
κA=A2,
which is the minimum possible for the matrix exponential and so the computed matrix exponential is guaranteed to be close to the exact matrix. See Section 10.2 of Higham (2008) for details and further discussion.

Parallelism and Performance

None.

Further Comments

The cost of the algorithm is On3.
As well as the excellent book cited above, the classic reference for the computation of the matrix exponential is Moler and Van Loan (2003).

Example

This example finds the matrix exponential of the symmetric matrix
A=1234212332124321

Example program (C#): f01ede.cs

Example program data: f01ede.d

Example program results: f01ede.r

See Also