Can I use QZ decomposition on a single square matrix in Matlab? Like,
[Aa,Q,Z]=qz(A);
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It only takes a minute to sign up.
Sign up to join this communityAs far as I know, QZ decomposition is given for two matrices, so that for $A,B\in \mathbb F^{n \times n}$: $$ A=QSZ^*, B=QTZ^* \tag{1} \label{QZ} $$ where $Q,Z^*$ are unitary, and $S,T$ are upper-triangular, and $\mathbb F$ is the field (real $\mathbb R$ or complex $\mathbb C$). QZ decomposition is usually called generalized Schur decomposition.
For a single matrix $A\in\mathbb F^{n\times n}$, one would simply computes Shur decomposition: $$ A=Q_\text{Schur}UQ^*_\text{Schur} \tag{2} \label{Schur} $$ where $Q_\text{Schur}$ is unitary, and $U$ is upper triangular.
So the Schur decomposition $\eqref{Schur}$, allows "more restricted" decomposition of $A$, since there is no matrix $B$, which presence would result in a generalized QZ decomposition $\eqref{QZ}$ and a presence of $Z$.
In Matlab, Schur decomposition $\eqref{Schur}$ can be computed, as follows:
[Q,U] = schur(A,...)
Take a look at Matlab function help for some additional computation options. Notice a confusion between Wikipedia and this post notation choice, compared to the Matlab help page.