naginterfaces.library.matop.real_​trapez_​rq

naginterfaces.library.matop.real_trapez_rq(m, a)[source]

real_trapez_rq reduces the () real upper trapezoidal matrix to upper triangular form by means of orthogonal transformations.

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

https://www.nag.com/numeric/nl/nagdoc_28.4/flhtml/f01/f01qgf.html

Parameters
mint

, the number of rows of the matrix .

When then an immediate return is effected.

afloat, array-like, shape

The leading upper trapezoidal part of the array must contain the matrix to be factorized.

Returns
afloat, ndarray, shape

The upper triangular part of will contain the upper triangular matrix , and the upper trapezoidal part of will contain details of the factorization as described in Notes.

zetafloat, ndarray, shape

contains the scalar for the th transformation. If then , otherwise contains as described in Notes and is always in the range .

Raises
NagValueError
(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

The () real upper trapezoidal matrix given by

where is an upper triangular matrix, is factorized as

where is an orthogonal matrix and is an upper triangular matrix.

is given as a sequence of Householder transformation matrices

the th transformation matrix, , being used to introduce zeros into the th row of . has the form

where

is a scalar and is an () element vector. and are chosen to annihilate the elements of the th row of .

The vector is returned in the th element of the array and in the th row of , such that is in and the elements of are in . The elements of are returned in the upper triangular part of .

For further information on this factorization and its use see Section 6.5 of Golub and Van Loan (1996).

References

Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore

Wilkinson, J H, 1965, The Algebraic Eigenvalue Problem, Oxford University Press, Oxford