QZ

Advanced Analysis Library Only

AnalysisLibErrType QZ (void *inputMatrixA, void *inputMatrixB, int matrixSize, int order, void *matrixAA, void *matrixBB, void *matrixQ, void *matrixZ, NIComplexNumber alpha[], double beta[], void *leftEigenvectors, void *rightEigenvectors);

Purpose

Performs the QZ decomposition of a pair of real matrices (A,B). QZ decomposition decomposes a matrix pair (A,B) as follows:

[AA, BB, Q, Z, alpha, beta, leftVec, rightVec] = QZ(A,B)

whereQHAZ = AA and QHBZ = BB
AA is a quasi-triangular matrix
BB is an upper triangular matrix
Q and Z are orthogonal matrices
A * [rightVec] * diag(beta) = B * [rightVec] * diag(alpha)
diag(beta) * [leftVec]H * A = diag(alpha) * [leftVec]H * B
H denotes transpose

Parameters

Input
Name Type Description
inputMatrixA numeric array The input matrix A.
inputMatrixB numeric array The input matrix B.
matrixSize integer The order of matrices inputMatrixA and inputMatrixB.
order integer Specifies how to reorder the computed eigenvalues and corresponding Schur vectors.
order must be one of the following values:
  • None: The computed eigenvalues are not reordered.
  • REAL_ASCENDING: Reorders the eigenvalues and corresponding Schur vectors in real part ascending order.
  • REAL_DESCENDING: Reorders the eigenvalues and corresponding Schur vectors in real part descending order.
  • MAG_ASCENDING: Reorders the eigenvalues and corresponding Schur vectors in magnitude ascending order.
  • MAG_DESCENDING: Reorders the eigenvalues and corresponding Schur vectors in magnitude descending order.
Output
Name Type Description
matrixAA numeric array The quasi-triangular matrix such that QHAZ = matrixAA. If matrixAA = NULL, matrixAA is not computed.
matrixBB numeric array The upper triangular matrix such that QHBZ = matrixBB. If matrixBB = NULL, matrixBB is not computed.
matrixQ numeric array The orthogonal matrix Q.
matrixZ numeric array The orthogonal matrix Z.
alpha complex number array alpha and beta together define the generalized eigenvalues of (inputMatrixA, inputMatrixB).
beta double-precision array alpha and beta together define the generalized eigenvalues of (inputMatrixA, inputMatrixB).
leftEigenvectors numeric array The left generalized eigenvectors of matrix pair (A, B).
If, on input, leftEigenvectors = NULL, the left eigenvectors are not computed.
rightEigenvectors numeric array The right generalized eigenvectors of matrix pair (A, B).
If, on input, rightEigenvectors = NULL, the right eigenvectors are not computed.

Return Value

Name Type Description
status AnalysisLibErrType A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.