# naginterfaces.library.lapackeig.dpteqr¶

naginterfaces.library.lapackeig.dpteqr(compz, d, e, z)[source]

dpteqr computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric positive definite tridiagonal matrix, or of a real symmetric positive definite matrix which has been reduced to tridiagonal form.

For full information please refer to the NAG Library document for f08jg

https://www.nag.com/numeric/nl/nagdoc_28.6/flhtml/f08/f08jgf.html

Parameters
compzstr, length 1

Indicates whether the eigenvectors are to be computed.

Only the eigenvalues are computed (and the array is not referenced).

The eigenvalues and eigenvectors of are computed (and the array must contain the matrix on entry).

The eigenvalues and eigenvectors of are computed (and the array is initialized by the function).

dfloat, array-like, shape

The diagonal elements of the tridiagonal matrix .

efloat, array-like, shape

The off-diagonal elements of the tridiagonal matrix .

zfloat, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; if : ; otherwise: .

If , must contain the orthogonal matrix from the reduction to tridiagonal form.

If , need not be set.

Returns
dfloat, ndarray, shape

The eigenvalues in descending order, unless > 0, in which case is overwritten.

efloat, ndarray, shape

is overwritten.

zfloat, ndarray, shape

If or , the required orthonormal eigenvectors stored as columns of ; the th column corresponds to the th eigenvalue, where , unless > 0.

If , is not referenced.

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: , or .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

The leading minor of order is not positive definite and the Cholesky factorization of could not be completed. Hence itself is not positive definite.

(errno )

The algorithm to compute the singular values of the Cholesky factor failed to converge; off-diagonal elements did not converge to zero.

Notes

dpteqr computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric positive definite tridiagonal matrix . In other words, it can compute the spectral factorization of as

where is a diagonal matrix whose diagonal elements are the eigenvalues , and is the orthogonal matrix whose columns are the eigenvectors . Thus

The function may also be used to compute all the eigenvalues and eigenvectors of a real symmetric positive definite matrix which has been reduced to tridiagonal form :

In this case, the matrix must be formed explicitly and passed to dpteqr, which must be called with . The functions which must be called to perform the reduction to tridiagonal form and form are:

 full matrix full matrix, packed storage band matrix dsbtrd() with vect='V'.

dpteqr first factorizes as where is unit lower bidiagonal and is diagonal. It forms the bidiagonal matrix , and then calls dbdsqr() to compute the singular values of which are the same as the eigenvalues of . The method used by the function allows high relative accuracy to be achieved in the small eigenvalues of . The eigenvectors are normalized so that , but are determined only to within a factor .

References

Barlow, J and Demmel, J W, 1990, Computing accurate eigensystems of scaled diagonally dominant matrices, SIAM J. Numer. Anal. (27), 762–791