nag_hermitian_eigenvalues (f02awc) (PDF version)
f02 Chapter Contents
f02 Chapter Introduction
NAG Library Manual

NAG Library Function Document

nag_hermitian_eigenvalues (f02awc)

 Contents

    1  Purpose
    7  Accuracy

1  Purpose

nag_hermitian_eigenvalues (f02awc) calculates all the eigenvalues of a complex Hermitian matrix.

2  Specification

#include <nag.h>
#include <nagf02.h>
void  nag_hermitian_eigenvalues (Integer n, Complex a[], Integer tda, double r[], NagError *fail)

3  Description

The complex Hermitian matrix A  is first reduced to a real tridiagonal matrix by n-2  unitary transformations, and a subsequent diagonal transformation. The eigenvalues are then derived using the QL  algorithm, an adaptation of the QR  algorithm.

4  References

Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag

5  Arguments

1:     n IntegerInput
On entry: n , the order of the matrix A .
Constraint: n1 .
2:     a[n×tda] ComplexInput/Output
Note: the i,jth element of the matrix A is stored in a[i-1×tda+j-1].
On entry: the elements of the lower triangle of the n  by n  complex Hermitian matrix A . Elements of the array above the diagonal need not be set.
On exit: a is overwritten.
3:     tda IntegerInput
On entry: the stride separating matrix column elements in the array a.
Constraint: tdan .
4:     r[n] doubleOutput
On exit: the eigenvalues in ascending order.
5:     fail NagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).

6  Error Indicators and Warnings

NE_2_INT_ARG_LT
On entry, tda=value  while n=value . These arguments must satisfy tdan .
NE_ALLOC_FAIL
Dynamic memory allocation failed.
NE_INT_ARG_LT
On entry, n=value.
Constraint: n1.
NE_TOO_MANY_ITERATIONS
More than value iterations are required to isolate all the eigenvalues.

7  Accuracy

For a detailed error analysis see page 235 of Wilkinson and Reinsch (1971).

8  Parallelism and Performance

Not applicable.

9  Further Comments

The time taken by nag_hermitian_eigenvalues (f02awc) is approximately proportional to n 3 .

10  Example

To calculate all the eigenvalues of the complex Hermitian matrix:
0.50 -1.38 i - 0.00 +0.84 i 1.84 + 1.38 i - 2.08 - 1.56 i 0.00 -1.38 i - 0.50 +0.84 i - 1.12 + 0.84 i -0.56 + 0.42 i 1.84 - 1.38 i - 1.12 - 0.84 i 0.50 +0.84 i - 0.00 +0.84 i 2.08 + 1.56 i -0.56 - 0.42 i 0.00 +0.84 i - 0.50 +0.84 i .  

10.1  Program Text

Program Text (f02awce.c)

10.2  Program Data

Program Data (f02awce.d)

10.3  Program Results

Program Results (f02awce.r)


nag_hermitian_eigenvalues (f02awc) (PDF version)
f02 Chapter Contents
f02 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2015