# QZ Decomposition (G Dataflow)

Version:

Performs the QZ decomposition of a pair of square matrices.

## matrix A

The first square matrix.

This input accepts a 2D array of double-precision, floating point numbers or 2D array of complex double-precision, floating point numbers.

Default: Empty array

## matrix B

The second square matrix.

Default: Empty array

## decomposition type

Type of decomposition to perform.

Name Value Description
Generalized Hessenberg 0 Uses the generalized Hessenberg method.
Generalized Schur 1 Uses the generalized Schur method.

Default: Generalized Hessenberg

## order

Method to order the generalized eigenvalues.

This input is available only when decomposition type is Generalized Schur.

Name Value Description
No Reorder 0 Does not change the order of the generalized eigenvalues.
Real Ascending 1 Lists the generalized eigenvalues in ascending order according to the real parts.
Real Descending 2 Lists the generalized eigenvalues in descending order according to the real parts.
Magnitude Ascending 3 Lists the generalized eigenvalues in ascending order according to the magnitudes.
Magnitude Descending 4 Lists the generalized eigenvalues in descending order according to the magnitudes.

Default: No Reorder

## error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

## eigenvectors

A complex matrix that contains the generalized eigenvectors in its columns.

## matrix Q

The orthogonal matrix.

Conditions for matrix Q when trans(Q) is the transpose matrix of Q

When trans(Q) is the transpose matrix of matrix Q, matrix Q satisfies the following conditions:

• trans(Q)AZ is an upper Hessenberg matrix if the decomposition type is Generalized Hessenberg or a quasi-triangular matrix with 1-by-1 and 2-by-2 diagonal blocks if the decomposition type is Generalized Schur.
• trans(Q)BZ is an upper triangular matrix.

where

• A is the input matrix A and Z is the output matrix Z

## matrix Z

The orthogonal matrix.

Conditions for matrix Z when trans(Q) is the transpose matrix of Q

When trans(matrix Q) is the transpose matrix of matrix Q, matrix Z satisfies the following conditions:

• trans(Q)AZ is an upper Hessenberg matrix if the decomposition type is Generalized Hessenberg or a quasi-triangular matrix with 1-by-1 and 2-by-2 diagonal blocks if the decomposition type is Generalized Schur.
• trans(Q)BZ is an upper triangular matrix.

where A is the input matrix A and Z is the output matrix Z.

## alpha

Numerators of the generalized eigenvalues of the input matrix pair.

If beta is nonzero, alphai/betai is a generalized eigenvalue of the input matrix pair.

## beta

Denominators of the generalized eigenvalues of the input matrix pair.

If beta is nonzero, alphai/betai is a generalized eigenvalue of the input matrix pair.

## error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

## Algorithm for Calculating QZ Decomposition

The following expressions define the QZ decomposition of a matrix pair (A, B).

A = QHZH

B = QTZH

where

• A and B are n-by-n square matrices
• ZH is the conjugate transpose of matrix Z
• T is an n-by-n upper triangular matrix
• H is either an n-by-n upper Hessenberg matrix if the input decomposition type is Generalized Hessenberg or a quasi-triangular matrix with 1-by-1 and 2-by-2 diagonal blocks if the input decomposition type is Generalized Schur

## QZ Decomposition for Singular Matrices

If B is singular, matrix pair (A, B) has an infinite generalized eigenvalue. In other words, the output betai is zero. If αA - βB is singular for all α and β, matrix pair (A, B) is singular and has an indeterminate generalized eigenvalue. In other words, both betai and alphai are zeros. This node cannot order the generalized eigenvalues if there are indeterminate generalized eigenvalues.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application