f08fa computes all the eigenvalues and, optionally, all the eigenvectors of a real n by n symmetric matrix A.

Syntax

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

Parameters

jobz
Type: System..::..String
On entry: indicates whether eigenvectors are computed.
jobz="N"
Only eigenvalues are computed.
jobz="V"
Eigenvalues and eigenvectors are computed.
Constraint: jobz="N" or "V".
uplo
Type: System..::..String
On entry: if uplo="U", the upper triangular part of A is stored.
If 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 max1,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 jobz="V", then a contains the orthonormal eigenvectors of the matrix A.
If jobz="N", then on exit the lower triangle (if uplo="L") or the upper triangle (if uplo="U") of a, including the diagonal, is overwritten.
w
Type: array<System..::..Double>[]()[][]
An array of size [n]
On exit: the eigenvalues in ascending order.
info
Type: System..::..Int32%
On exit: info=0 unless the method detects an error (see [Error Indicators and Warnings]).

Description

The symmetric matrix A is first reduced to tridiagonal form, using orthogonal similarity transformations, and then the QR algorithm is applied to the tridiagonal matrix to compute the eigenvalues and (optionally) the eigenvectors.

References

Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999) LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia http://www.netlib.org/lapack/lug
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore

Error Indicators and Warnings

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.
info<0
If info=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.
info>0
If info=i, the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.
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
ifail=-6000
Invalid Parameters value

Accuracy

The computed eigenvalues and eigenvectors are exact for a nearby matrix A+E, where
E2=OεA2,
and ε is the machine precision. See Section 4.7 of Anderson et al. (1999) for further details.

Parallelism and Performance

None.

Further Comments

The total number of floating-point operations is proportional to n3.
The complex analogue of this method is (F08FNF not in this release).

Example

This example finds all the eigenvalues and eigenvectors of the symmetric matrix
A=1234223433344444,
together with approximate error bounds for the computed eigenvalues and eigenvectors.

Example program (C#): f08fae.cs

Example program data: f08fae.d

Example program results: f08fae.r

See Also