# qz

## Purpose

QZ factorization for generalized eigenvalues.

## Synopsis

    [AA,BB,Q,Z,V] = qz(A,B)

## Description

The `qz` function gives access to what are normally only intermediate results in the computation of generalized eigenvalues. For square matrices `A` and `B`, the statement

    [AA,BB,Q,Z,V] = qz(A,B)

produces upper triangular matrices `AA` and `BB`, and matrices `Q` and `Z` containing the products of the left and right transformations, such that

    Q*A*Z = AA
    Q*B*Z = BB

`qz` also returns the generalized eigenvector matrix `V`.

The generalized eigenvalues are the diagonal elements of `AA` and `BB` so that

    A*V*diag(BB) = B*V*diag(AA)

## Algorithm

Complex generalizations of the EISPACK routines `QZHES`, `QZIT`, `QZVAL`, and `QZVEC` implement the QZ algorithm.

## See Also

    eig

## References

[1] C. B. Moler and G.W. Stewart, "An Algorithm for Generalized Matrix Eigenvalue Problems", SIAM J. Numer. Anal., Vol. 10, No. 2, April 1973.

(c) Copyright 1994 by The MathWorks, Inc.