Technische Universitat Chemnitz

Sonderforschungsbereich

Numerische Simulation auf massiv parallelen Rechnern

Peter Benner Ralph Byers Volker Mehrmann Hongguo Xu

Numerical Computation of

Deating Subspaces

of Embedded Hamiltonian Pencils

Preprint SFB

PreprintReihe des Chemnitzer SFB

SFB June

Contents

Introduction and Preliminaries

Embedding of Extended Pencils

Hamiltonian Triangular Forms

SkewHamiltonian Pencils

Algorithms

Error and Perturbation Analysis

Conclusion

A Algorithmic Details

A Schur Forms for SkewHamiltonianHamiltonian Matrix Pencils and SkewHa

miltonianskewHamiltonian Matrix Pencils

A Subroutines Required by Algorithm

Authors

Peter Benner Ralph Byers

Zentrum f ur Technomathematik Department of Mathematics

Fachbereich Mathematik und Informatik University of Kansas

Universitat Bremen Lawrence KS

D Bremen FRG USA

bennermathunibremende byersmathukansedu

Volker Mehrmann Hongguo Xu Deparment of Mathematics

Fakultat f ur Mathematik Case Western University

Technische Universitat Chemnitz Cleveland OH

D Chemnitz FRG USA

mehrmannmathematiktuchemnitzde hxxpocwruedu

Numerical Computation of Deating Subspaces



of Embedded Hamiltonian Pencils

2 3

Peter Benner Ralph Byers Volker Mehrmann Hongguo Xu

Abstract

We discuss the numerical solution of structured generalized eigenvalue problems that

arise from linearquadratic optimal control problems H optimization multibo dy sys

1

tems and many other areas of applied mathematics physics and chemistry The classical

approach for these problems requires computing invariant and deating subspaces of ma

trices and matrix p encils with Hamiltonian andor skewHamiltonian structure We ex

tend the recently developed metho ds for Hamiltonian matrices and matrix p encils to the

general case of embedded matrix p encils The rounding error and p erturbation analysis

of the resulting algorithms is favorable

Keywords eigenvalue problem deating subspace algebraic Riccati equation Hamiltonian

matrix skewHamiltonian matrix skewHamiltonianHamiltonian matrix p encil embedded

matrix p encils

AMS sub ject classication N F B B C

Introduction and Preliminaries

In this pap er we study eigenvalue and invariant subspace computations involving matrices

and matrix p encils with the following algebraic structures

i h

I 0

n

where I is the n n Denition Let J

n

I 0

n

2n2n H

a A matrix H C is Hamiltonian if HJ HJ The of Hamiltonian

2 n2n

matrices in C is denoted by H

2n

2n2n H

b A matrix H C is skewHamiltonian if HJ H J The Jordan algebra of

2 n2n

skewHamiltonian matrices in C is denoted by SH

2n

2 n2n

c A matrix pencil S H C is skewHamiltonianHamiltonian if S SH and

2n

H H

2n

2 n2n H

d A matrix S C is symplectic if SJ S J The Lie of symplectic matrices

2 n2n

in C is denoted by S

2n

H 2n2n H

I The J and U U e A matrix U C is unitary symplectic if U J U

2n

d d d

d d

2 n2n

compact of unitary symplectic matrices in C is denoted by US

2n

2n H

f A subspace L of C is called Lagrangian if it has n and x J y for al l

x y L



Working title was Numerical Computation of Deating Subspaces of Embedded Hamiltonian and Sym

plectic Pencils All authors were partially supp orted by Deutsche Forschungsgemeinschaft Research Grant

Me and Sonderforschungsbereich Numerische Simulation auf massiv parallelen Rechnern

2

This author was partially supp orted by National Science Foundation awards CCR MRI

and by the NSF EPSCoRKSTAR program through the Center for Advanced Scientic Computing

3

This work was completed while this author was with the TU Chemnitz

There is little dierence b etween the structure of complex skewHamiltonian matrices and

complex Hamiltonian matrices If S SH and H H then iS H and iH

2n 2 n 2n

SH Similarly there is little dierence b etween the structure of complex skewHamiltoni

2n

anHamiltonian matrix p encils complex skewHamiltonianskewHamiltonian and complex

HamiltonianHamiltonian matrix p encils For S SH and H H the matrix p encil

2n 2 n

S H is skewHamiltonianHamiltonian the matrix p encil S iH is skewHamil

tonianskewHamiltonian and the matrix p encil iS H is HamiltonianHamiltonian

Here i and i However real skewHamiltonian matrices are not real scalar

multiples of Hamiltonian matrices There is a greater dierence in the structure of real

skewHamiltonian and real Hamiltonian matrices than in the complex case

The structures in Denition arise in linearquadratic optimal control H

optimization and several other areas of applied mathematics computational physics

and chemistry eg gyroscopic systems numerical simulation of elastic deformation

and linear resp onse theory Here we fo cus on applications in linearquadratic optimal

control and H optimization

First we consider the continuous time innite horizon linearquadratic optimal control

problem

Choose a control function ut to minimize the cost functional

Z

H

xt Q S xt

S dt

c

H

ut S R ut

t

0

subject to the linear dierentialalgebraic system descriptor control system

0

E x Ax B u xt x

0

m n nn nm H nn H mm

Here ut C xt C A E C B C Q Q C R R C and

nm

S C If the m n m n weighting matrix

Q S

R

H

S R

is Hermitian and p ositive semidenite then the problem is wellposed Note that R Q andor

R may b e singular Typically in addition to minimizing the control ut must make xt

asymptotically stable Of course if R is p ositive denite then asymptotic stability of xt

is automatically achieved by any control for which the cost functional is nite

Application of the maximum principle yields as a necessary optimality condition

that the control u satises the twopoint b oundary value problem of EulerLagrange equations

x x

0 H

E A xt x lim E t

c c 0

t

u u

with the matrix p encil

A B E

H H

Q A S E

E A

c c

H H

S B R

The matrix p encil do es not have matrices with one of the structures of Denition

Nevertheless many of the prop erties of Hamiltonian matrices carry over As reviewed b e

low if E andor R are nonsingular then and reduce to an ordinary dierential equation

with Hamiltonian matrix co ecients or a dierentialalgebraic equation with a skewHamilto

nianHamiltonian matrix p encil co ecients In Section we circumvent the nonsingularity

assumptions by embedding the matrix p encil into a skewHamiltonianHamiltonian ma

trix p encil of larger dimension

H

If b oth E and R are nonsingular then with E reduces to the twopoint

b oundary value problem

x x

0

H xt x lim t

0

t

with the Hamiltonian matrix

1 1 H 1 1 H H

F G E A BR S E BR B E

H

1 H 1 1 H H H

Q SR S E A BR S H F

This is the classical formulation found in many textb o oks on linearquadratic optimal control

like The solution of this b oundary value problem can b e obtained in many

dierent ways For example let Y b e a symmetric solution if it exists of the asso ciated

continuoustime algebraic Riccati equation

H

H Y F F Y Y GY

h i h i h i h i

I 0 x I 0 x

Multiplying from the left by the matrix and changing variables to

Y I Y I

one obtains the decoupled system

x

F GY G x

xt x lim t

0 0

H

t

F Y G

In the desired solution is identically zero In that case x is the solution to x F GY x

0 H

with initial condition x x Y x E and the control that minimizes

1 H H H

is u R S B E Y x

If E is singular and R is nonsingular then do es not simplify quite so much b ecause

it is a dierentialalgebraic equation with nontrivial linear constraints Substituting ut

1 H H

R S xt B t system do es simplify to

x x

0 H

S H xt x lim E t

0

t

with the reduced skewHamiltonianHamiltonian matrix p encil

1 H 1 H

E A BR S BR B

S H

H 1 H 1 H

E SR S Q A BR S

In this case the corresp onding generalized algebraic Riccati equation is

1 H H 1

Q SR S E Y A BR S

1 H H 1 H

A BR S Y E E Y BR B Y E

but in general the relationship with solutions of the optimal control problem is lost or

hidden See for details But even for E nonsingular the formulation in

is preferable from a numerical p oint of view if E is illconditioned with resp ect to inversion

If R is singular and E is nonsingular then the situation b ecomes still more complicated

Although the b oundary value problem remains well dened the Riccati equation do es not

This case has b een recently studied

At this writing the case in which b oth E and R are singular has not b een analyzed in

full generality

The EulerLagrange and Riccati equations their solvability and their numerical solution

have b een the sub ject of numerous publications in recent years see eg

and the references therein In most numerical metho ds the Riccati solutions are obtained

through the computation of deating or invariant subspaces of asso ciated matrix p encils see

A key observation in this context is that the Riccati solutions need not b e formed

explicitly It suces to work with bases of the deating subspaces of the matrix p encil

For example supp ose E A in has an ndimensional deating subspace asso ciated

c c

with eigenvalues in the left half plane This can only b e the case if E is invertible Let this

subspace b e spanned by the columns of a matrix U partitioned conformally with as

U

1

U

U

2

U

3

1

If U is invertible then the optimal control is a linear feedback of the form ut U U xt

1 3

1

1

1

and the solution of the asso ciated Riccati equation is Y U U E see Observe

2

1

that the optimal control may b e obtained without explicitly inverting E or solving equations

with co ecient E If E is nearly singular ie illconditioned then explicitly forming

the Riccati solution may introduce unnecessarily large rounding errors If E is singular

then an ndimensional deating subspace asso ciated with left half plane eigenvalues may

not exist In some circumstances the deating subspace can b e augmented in dimension by

enlarging a with appropriately chosen eigenvectors and principal vectors asso ciated with

the innite eigenvalue see In this case the optimal control law may still b e obtained as

1

xt but the Riccati solution need not exist Examples app ear in ut U U

3

1

Matrices and Riccati equations of a similar structure o ccur in H optimization see

Consider the linear timeinvariant system

x Ax B u B w

1 2

z C x D u D w

1 11 12

y C x D u D w

2 21 22

p n p m nn nm

i j

k k

C C for k and D C for i j Here where A C B C

ij

k k

m m p

1 2 2

u C denotes the control inputs w C the exogenous inputs y C the measured

p

1

outputs and z C the output error signals to b e minimized The H optimization problem

is to determine a stabilizing controller that minimizes the closedlo op transfer function T

z w

from w to z in the H norm Under mild hypotheses p for any there exists

an admissible controller such that jjT jj if and only if the following three conditions

z w

hold

nn

i There is a Hermitian nonnegative semidenite solution X C to the algebraic

Riccati equation

H H 2 H H

C C A X X A X B B B B X

1 1 2

1 1 2

H 2 H

X has no eigenvalue with nonnegative real part B B and A B B

2 1

2 1

nn

ii There is a Hermitian nonnegative semidenite solution Y C to the algebraic

Riccati equation

H H 2 H H

B B Y A AY Y C C C C Y

1 1 2

1 1 2

H 2 H

has no eigenvalue with nonnegative real part C C and A Y C C

2 1

2 1

2

iii X Y where represents the sp ectral radius

Moreover a controller that satises iiii is determined by the linear time invariant system

having the statespace representation

q Aq B y

u C q D y

where

2 H

A A B B X B C BC

1 2 2

1

2 1 H

B I Y X Y C

2

H

C B X

2

D

The sub optimal H controller determined by the ab ove formulae is called the central con

troller

The H optimization problem is equivalent to determining the supremum of for

which at least one of the three conditions iiii fails

A diculty in this optimization is that in the limit as approaches the minimal H

norm the Riccati solutions X and Y may have innite norm Hence typically with this

approach only sub optimal controllers can b e computed numerically The essential role played

by X and Y is to represent particular right and left invariant subspaces of the Hamiltonian

matrices

H 2 H

B B A B B

2 1

2 1

H

H H

A C C

1

1

and

H

A B B

1

1

K

H H 2 H

C A C C C

2 1

2 1

H

resp ectively The columns of I X span a right invariant subspace of H and the rows of

I Y span a left invariant subspace of K In p conditions iiii are generalized

in terms of an arbitrary basis of the same invariant subspaces as follows

H nn H

Q Q Q i There are matrices Q Q T C such that Q

1 2 1 2 x

2 1

Q Q

1 1

H T

x

Q Q

2 2

and T has no eigenvalue with p ositive real part

x

H nn H

U U U ii There are matrices U U T C such that U

1 2 1 2 y

2 1

H H H H

U U K T U U

y

2 1 2 1

and T has no eigenvalue with p ositive real part

y

H 1 H

Q Q Q U

1 2

2 2

is p ositive semidenite iii The n n matrix

1 H H

U Q U U

2 1

2 2

In this formulation the computation of the optimal can b e obtained numerically by comput

ing the largest at which one of the conditions i ii or iii fails This approach is more

appropriate in nite arithmetic See also Remark For the optimal an

admissible controller is determined by the descriptor system having generalized statespace

realization

E q Aq B y

u C q D y

where

H 1 H

E U Q U Q

1 2

1 2

H H

B U C

2 2

H

C B Q

2

2

D

H

A ET BC Q T E U B C

x 2 1 y 2

1

This form avoids explicit solutions of algebraic Riccati equations and inversion of the p oten

2

tially illconditioned matrix I Y X We close the introduction with some remarks on

the numerical solution of the eigenvalue problems for matrices and matrix p encils involving the

structures in Denition Although the numerical computation of ndimensional Lagrangian

invariant subspaces of Hamiltonian matrices and the solution of algebraic Riccati equations

have b een extensively studied see and the references therein completely

satisfactory metho ds for general Hamiltonian matrices and extended matrix p encils are still

an op en problem Such metho ds would b e numerically backward stable have complexity

3

O n and preserve the given structure There are several reasons for this diculty all of

which are well demonstrated in the context of algorithms for Hamiltonian matrices Similar

diculties arise in the extended matrix p encil case First of all an algorithm based up on

structure preserving transformations including QR like algorithms would require

a triangularlike Hamiltonian Schur form that displays the desired deating subspaces We

summarize the denitions and basic results on Schurlike forms in Section A Hamiltonian

Schur form under unitary symplectic similarity transformations is presented in Unfortu

nately not every Hamiltonian matrix has this kind of Hamiltonian Schur form For example

the Hamiltonian matrix J in Denition is invariant under arbitrary symplectic similarity

transformations but is not in the Hamiltonian Schur form describ ed in A characterization

of Hamiltonian matrices that do admit a Hamiltonian Schur form under unitary symplectic

similarity transformations was conjectured in and proved in We summarize that

result in Section Schurlike forms are characterized for skewHamiltonianHamiltonian

matrix p encils in and for the other structures in A second diculty comes from

the fact that even when a Hamiltonian Schur form exists there is no known structure pre

serving numerical metho d to compute it It has b een argued in that except in sp ecial

cases QR like algorithms are impractically exp ensive b ecause of the lack of a Ha

miltonian Hessenberglike form For this reason other metho ds like the multishiftmethod of

the structured implicit pro duct metho ds of do not follow the QR algorithm

paradigm The implicit pro duct metho ds do come quite close to optimality We extend

the metho d of to skewHamiltonianHamiltonian matrix p encils in Section A third

diculty arises when the Hamiltonian matrix or the skewHamiltonianHamiltonian matrix

p encil has eigenvalues on the imaginary axis In that case the desired Lagrangian subspace

is in general not unique Furthermore if nite precision arithmetic or other errors p er

turb the matrix o the Lie algebra of Hamiltonian matrices then it is typically the case that

the p erturb ed matrix has no Lagrangian subspace or do es not have the exp ected eigenvalue

pairings see eg

To simplify notation the term eigenvalue is used b oth for eigenvalues of matrices and

for pairs for which detE A These pairs are not unique If

then we identify with and Pairs with are called innite

eigenvalues

By E A we denote the set of eigenvalues of E A including nite and innite

eigenvalues b oth counted according to multiplicity

We will denote by E A E A and E A the set of nite eigenvalues of A

0 +

E with negative zero and p ositive real parts resp ectively The set of innite eigenvalues

is denoted by E A Multiple eigenvalues are rep eated in E A E A E A

0 +

and E A according to algebraic multiplicity The set of all eigenvalues counted according

to multiplicity is E A E A E A E A E A Similarly we

0 +

denote by Def E A Def E A Def E A and Def E A the right deating subspaces

0 +

corresp onding to E A E A E A and E A resp ectively

0 +

p

is denoted by i The inertia of a Throughout this pap er the imaginary number

Hermitian matrix A consists of the triple InA where A A and

A represent the number of p ositive zero and negative eigenvalues resp ectively

Embedding of Extended Matrix Pencils

It is imp ortant to exploit and preserve algebraic structures like symmetries in the matrix

blo cks or symmetries in the sp ectrum as much as p ossible Such algebraic structures typically

arise from physical prop erties of the problem If rounding errors or other p erturbations destroy

the algebraic structures then the results may b e physically meaningless Not coincidentally

numerical metho ds that preserve algebraic structures are typically more ecient as well as

more accurate Preserving and exploiting structure recommends using the EulerLagrange

equations in the form of and or and

On the other hand reducing to the form of or using nite precision arithmetic may

b e illadvised For the purp ose of nite precision computation it is desirable to obtain the

solution directly from the original data without explicitly forming matrix pro ducts and in

verses Otherwise there is a real danger of numerical instability by transforming the problem

to an equivalent but more illconditioned one ie transforming the problem to one that is

more sensitive to p erturbations The matrices E andor R may b e singular Even if they are

nominally nonsingular they may b e nearly singular ie illconditioned Even if E and R

1 H

are not illconditioned forming matrixtimesitstransp ose pro ducts like BR B suers

from the same kind of wellknown numerical instability as forming the normal equations to

solve least squares problems See for example Example Hence it may happ en

that the transformed co ecient matrices in or are so corrupted by rounding errors

that the control ut computed from them is of limited value This recommends using the

EulerLagrange equations in the form of and in case small rounding errors can not b e

1 T

guaranteed a priori when forming BR B

In this section we show how to reconcile the sup ercially contradictory requirement to

avoid explicit pro ducts and inverses by working directly with and with the require

ment to preserve and exploit sp ecial structure by working directly with and or and

This is accomplished by embedding and into an extended dierentialalgebraic

b oundary value problem involving a skewHamiltonianHamiltonian matrix p encil of larger

dimension Solutions of the extended system display solutions of and For this ap

proach no nonsingularity assumption is required and only pro ducts are formed

explicitly

The extension requires an even number of controls If the number of controls m is o dd

then the control system must b e extended with one or more articial control variables

k

Let v C b e a vector of articial controls with k chosen so that m k is even If m is

even then k may b e set to zero and v b ecomes void We will see that even if k changing

the linearquadratic optimal control problem appropriately v will have no inuence on the

nk

optimal solution u Introduce the control matrix B C corresp onding to v If k then

we may take B With the articial control vector the descriptor system b ecomes

the extended system

u

0

E x Ax xt x

B B

0

v

k k

Introduce an articial Hermitian p ositive denite weighting matrix R C in to obtain

the extended cost functional

H

Z

Q S

xt xt

H

S R

ut ut

S dt

e

t

0

v t v t

R

m k

where minimization is now p erformed with resp ect to u v R R If k then R

may b e taken to b e the identity matrix

m+k

H H H

Now we repartition u v into two parts u and u of equal dimension

1 1

2

Then we may repartition B B and the cost functional weighting matrix conformally as

m u u

1

k v u

2

m k

n B B n B B

1 2

and

n m k n

n Q S n Q S S

1 2

H H

m S R S R R

11 12

1

H

k R S R R

21 22

2

In this notation the extended descriptor system b ecomes

u t

1

0

E x Ax B B xt x

1 2 0

u t

2

and the cost functional b ecomes

H

Z

xt Q S S xt

1 2

H

S u t R R S u t dt

e 1 11 12 1

1

H H

t

0

u t R R S u t

2 22 2

12 2

After a reordering of variables and equations the EulerLagrange equations for this ex

tended linearquadratic optimal control problem b ecome

x x

u u

1 1

e e 0 H

E A xt x lim E t

0

c c

t

u u

2 2

with the skewHamiltonianHamiltonian matrix p encil

B A B

E

2 1

H H H

R B R S

22

e e

2 12 2

E A

c c

H

H

Q S A S

E

1 2

H

H

R S B R

11 1 12

1

Numerical metho ds working directly with and can preserve and exploit the skew

HamiltonianHamiltonian structure while avoiding the explicit matrix inverses and pro ducts

required to form and or and

There is some freedom in the choice of k B and R How b est to use the freedom is an

op en question but some guidelines are appropriate

To avoid increasing the complexity of the problem much it may b e b est to choose k

as small as p ossible ie k if m is even and k if m is o dd However if the

dimension of the problem is small then k m may also b e a suitable choice

m k

If B and R is p ositive denite then for u v R R minimizing S in

e

it is clear that v t and u is a solution to the original problem

It is imp ortant that R and B b e chosen so that the matrix p encil is regular ie

e e

for some C C detE A Otherwise the twopoint b oundary

c c

value problem of dierentialalgebraic equations may not have a unique solution

0

for all consistently chosen initial values x see If the original extended Hamiltonian

matrix p encil is regular and B then is also regular Note that can b e

made to b e regular by appropriate prepro cessing of the system

The matrices R and B should b e chosen so that the matrix p encil has a struc

tured Schurlike form Such forms are characterized for skewHamiltonianHamiltonian

matrix p encils in and for the other structures in

If p ossible R and B should b e chosen so that the problem of computing the desired

invariant subspace should not b e more illconditioned than that for the original matrix

p encil If B and has wellconditioned deating subspaces eg if E and R

are nonsingular and wellconditioned and the reduced Hamiltonian matrix in has

no purely imaginary eigenvalues then the deating subspaces of are likely to have

wellconditioned deating subspaces also

There is a certain philosophy b ehind this embedding First of all the extension is an

approximate dual op eration to the reduction of the extended problem to the problem

Furthermore from a b ehavioral p oint of view ie if control variables and state

variables are interchangeable then the partitioning is not unnatural

A similar embedding may also b e constructed for the Hamiltonian matrices in H opti

mization

Hamiltonian Triangular Forms

In this section we briey review the results on the existence of structured Schur forms for

Hamiltonian matrices and skewHamiltonianHamiltonian matrix p encils

We call a matrix Hamiltonian block triangular if it is Hamiltonian and has the form

F G

H

F

If furthermore F is triangular then we call the matrix Hamiltonian triangular The terms

skewHamiltonian block triangular and skewHamiltonian triangular are dened analogously

If a Hamiltonian skewHamiltonian matrix H can b e transformed into Hamiltonian skew

Hamiltonian triangular form by a similarity transformation with a unitary

H

U US then we say that U HU has Hamiltonian Schur form skewHamiltonian Schur

2n

form

Not all Hamiltonian matrices have a Hamiltonian Schur form All real skewHamiltonian

matrices but not all complex skewHamiltonian matrices have a skewHamiltonian Schur

form For Hamiltonian matrices that have no purely imaginary eigenvalues the existence

of a Hamiltonian Schur form was proved in The general result was suggested in

and a pro of based on a structured Hamiltonian Jordan form was recently given in The

results were extended in to skewHamiltonianHamiltonian matrix p encils In this

section we summarize the results from needed for the analysis and development

of the numerical metho ds b elow

The following theorem gives necessary and sucient conditions for the existence of a

Hamiltonian triangular form under unitary symplectic similarity transformations If this form

exists then we have also a Lagrangian invariant subspace that may b e used to decouple the

b oundary value problem Note that here and in the following by abuse of notation

we identify a subspace and a matrix whose columns span this subspace by the same symbol

Theorem Let H be a Hamiltonian matrix with pairwise distinct nonzero purely

imaginary eigenvalues i i i and associated invariant subspaces U U U

1 2 1 2

respectively The fol lowing are equivalent

1

i There exists a symplectic matrix S such that S HS is Hamiltonian triangular

H

ii There exists a unitary symplectic matrix U such that U HU is Hamiltonian triangular

H

J U is congruent to a copy of J of appropriate dimension If iii For k U

k

k

ie if H has no nonzero purely imaginary eigenvalue then this statement holds

vacuously

For regular skewHamiltonianHamiltonian matrix p encils the situation is similar see

The structure of skewHamiltonianHamiltonian matrix p encils is preserved by J

congruence transformations ie if S H is skewHamiltonianHamiltonian then

H T

for any nonsingular matrix Y JY J S H Y is also skewHamiltonianHamiltonian

Theorem Let S H be a regular skewHamiltonianHamiltonian matrix pencil

with pairwise distinct nite nonzero purely imaginary eigenvalues i i i of

1 2

algebraic multiplicity p p p and associated right deating subspaces Q Q

1 2 1 2

Q Let p be the algebraic multiplicity of the eigenvalue innity and let Q be its associated

deating subspace The fol lowing are equivalent

i There exists a nonsingular matrix Y such that

H H S S

11 12 11 12

H T

JY J S H Y

H H

H S

11 11

where S and H are upper triangular while S is skewHermitian and H is Her

11 11 12 12

mitian

H T

ii There exists a unitary matrix Q such that JQ J S H Q is of the form on the

righthandside of

H

J SQ is congruent to a p p copy of J If ie if iii For k Q

k k k

k

S H has no nite nonzero purely imaginary eigenvalue then this statement holds

vacuously

H

J H Q is congruent to a p p copy of iJ Furthermore if p then Q

The results covering real Schurlike forms of real Hamiltonian matrices and skewHamil

tonianHamiltonian matrix p encils are similar

Theorems and give necessary and sucient conditions for the existence of structured

triangularlike forms They also demonstrate that whenever a structured triangularlike form

exists then it also exists under unitary transformations This fact gives hop e that these forms

and the eigenvalues and deating subspaces that they display can b e computed with structure

preserving numerically stable unitary transformations The following sections prop ose such

numerical metho ds for the computation of eigenvalues of Hamiltonian matrices and skewHa

miltonianHamiltonian matrix p encils

SkewHamiltonianHamiltonian Matrix Pencils

The skewHamiltonianHamiltonian matrix p encils and have the common charac

teristic that the skewHamiltonian matrix S is blo ck diagonal In this case and also other

cases the matrix S factors in the form

H T

S J Z J Z

i h

E 0

nn

where E C then Z where J is as in Denition For example if S

H

0 E

H

diag I E in

2 n 2 n H

Consider the indenite inner pro duct on C C dened as hx y i x J y If Z

2n2n 2n H T

C then for all x y C hZ x y i hx J Z J y i ie the adjoint of Z with resp ect

H T T H T

to h i is J Z J Because J J the adjoint may also b e expressed as JZ J

From this p oint of view is a symmetriclike factorization of S into the pro duct of Z and

T

its adjoint JZJ By analogy with the factorization of symmetric matrices we will call a

skewHamiltonian J Hermitian factorization and we will use the term J semidenite to refer

to skewHamiltonians matrices which have a skewHamiltonian J Hermitian factorization

A J denite skewHamiltonian matrix is a skew Hamiltonian matrix that is b oth J

semidenite and nonsingular

As seen in the skewHamiltonianHamiltonian matrix p encils and J semidenite

ness arises frequently in applications We show b elow that all real skewHamiltonian matrices

are J semidenite We also show that if a skewHamiltonianHamiltonian matrix p encil has

a skewHamiltonianHamiltonian form as in Theorem then the skewHamiltonian part is

J semidenite

Although J semideniteness is a common prop erty of skewHamiltonian matrices it is not

universal The following lemma shows that neither iJ nor any nonsingular skewHamiltonian

T T

matrix of the form iJ LL is J semidenite Later Lemma will show that iJ LL fails to

b e J semidenite for any L

Lemma A nonsingular skewHamiltonian matrix S is J denite if and only if iJS is

Hermitian with n positive and n negative eigenvalues

Proof If S is J denite then Z in is nonsingular and the iJ S is

T

congruent to iJ iJ It follows from Sylvesters law of inertia p that iJS is a

Hermitian matrix with n p ositive eigenvalues and n negative eigenvalues

Conversely supp ose that iJS is Hermitian with n p ositive and n negative eigenvalues The

T

matrix iJ also has n p ositive and n negative eigenvalues so by an immediate consequence

2 n2n

of Sylvesters law of inertia there is a nonsingular matrix Z C for which iJS

H T

Z iJ Z It follows that holds with this matrix Z

Lemma suggests that J semideniteness might b e a characteristic of the inertia of iJ S

The next lemma shows that this is indeed the case

Lemma A matrix S SH is J semidenite if and only if iJS satises both iJ S n

2n

and iJS n

Proof Supp ose that S SH is J semidenite For some Z satisfying dene

2n

H T

S by S J Z I J Z I For small enough Z I is nonsingular and by

Lemma iJ S n and iJ S n Because eigenvalues are continuous functions

of matrix elements and S lim S it follows that iJ S n and iJ S n

0

For the converse if iJ S p n and iJ S q n then there exists a nonsingular

H

matrix W for which iJS W LW with

p n p q n q

p I

p

n p

L

q I

q

n q

Because p n and q n L factors as L L diag I I L where I is the n n identity

n n n

T

matrix The matrix diag I I is the of eigenvalues of iJ so L

n n

h i

p

I I

H T T

n n

LU iJ U L where U is the unitary matrix of eigenvectors of iJ

iI iI

n n

Hence holds with Z U LW

The following immediate corollary also follows from

Corollary Every real skewHamiltonian matrix S is J semidenite

Proof If S is real then JS is real and skewsymmetric The eigenvalues of JS app ear

in complex conjugate pairs with zero real part Hence the eigenvalues of iJ S lie on the

real axis in pairs In particular iJ S iJ S It follows from the trivial identity

iJ S iJ S iJ S n that iJ S n and iJ S n

The next lemma and its corollary show that J semideniteness of b oth S and iH are

necessary conditions for a skewHamiltonianHamiltonian matrix p encil S H to have the

skewHamiltonianHamiltonian Schur form of Theorem

Lemma If S SH and there exists a nonsingular matrix Y such that

2n

S S

11 12

H T

JY J SY

H

S

11

nn

with S S C then S is J semidenite

11 12

Proof Let T b e the Hermitian matrix

H

iS

H

11

T Y iJ S Y

iS iS

11 12

I

n

and set T T For suciently small b oth I iS and I iS are

n 12 n 11

I I

n n

nonsingular and T is congruent to

1 H

I iS I iS I iS

n 11 n 12 n 11

I iS

n 12

By Sylvesters law the inertia of the negative of the blo ck is equal to the inertia of the

blo ck This implies T T n Continuity of eigenvalues as implies

T n and T n The lemma now follows from Lemma

Corollary If H H and there exists a nonsingular matrix Y such that

2n

H H

11 12

H T

JY J HY

H

H

11

nn

with H H C then iH is J semidenite

11 12

Proof Apply Lemma to the skewHamiltonian matrix iH

It follows from Lemma Corollary and Theorem part ii that if S H is a skewHa

miltonianHamiltonian matrix p encil that has a skewHamiltonianHamiltonian Schur form

then S and iH are J semidenite As noted ab ove the factor Z in is often either given

explicitly as part of the problem statement or can b e obtained as in the pro of of Lemma

The next theorem shows that if S is nonsingular then the skewHamiltonianHamiltonian

Schur form if it exists can b e expressed in terms of blo ck triangular factorizations of Z and

H without explicitly using S This op ens the p ossibility of designing numerical metho ds that

work directly on Z and H and avoid forming S explicitly

Theorem Let S H be a skewHamiltonianHamiltonian matrix pencil with nonsingu

H T

lar J semidenite skewHamiltonian part S JZ J Z If any of the equivalent conditions

of Theorem holds then there exists a unitary matrix Q and a unitary symplectic matrix U

such that

Z Z

11 12

H

U ZQ

Z

22

H H

11 12

H T

JQ J HQ

H

H

11

H

and H are n n and upper triangular where Z Z

11 11

22

h i

H

S S

H T

11 12

Proof With Q as in Theorem part ii we obtain and JQ J SQ

0 S

11

2nn H T

Partition Z ZQ as Z Z Z where Z Z C Using S JZ J Z we obtain

1 2 1 2

H

S

H

11

Z J Z

S S

11 12

H

J Z ie the columns of Z form a basis of a Lagrangian subspace and In particular Z

1 1

1

therefore the columns of Z form the rst n columns of a symplectic matrix It is easy to verify

1

12 H

Z from Denition that using the nonnegative denite square ro ot Z J Z Z

1 1 1

1

is symplectic It is shown in that Z has a unitary symplectic QR factorization

1

Z

11

H

U Z

1

nn

where U US is unitary symplectic and Z C is upp er triangular Setting

2n 11

Z Z

11 12

H H

U ZQ U Z

Z

22

H

Z S Since S and Z are b oth upp er triangular and Z we obtain from that Z

11 11 11 11 11

22

H

is also upp er triangular is nonsingular we conclude that Z

22

Note that the invertibility of Z is only a sucient condition for the existence of U as in

and However there is no particular pathology asso ciated with Z b eing singular

The algorithms describ ed b elow do not require Z to b e nonsingular The unitary symplectic

matrix U is closely related to the Hermitian solution of the generalized algebraic Riccati

equation see However when Z is singular the relationship to Riccati equations is

complicated

If b oth S and H are nonsingular then the following stronger form of Theorem holds

Corollary Let S H be a skewHamiltonianHamiltonian matrix pencil with nonsin

H T

gular J semidenite skewHamiltonian part S JZ J Z and nonsingular J semidenite

H T

Hamiltonian part iH J W J W If any of the equivalent conditions of Theorem holds

then there exists a unitary matrix Q and a unitary symplectic matrix U such that

W W Z Z

11 12 11 12

H H

U WQ U ZQ

W Z

22 22

H H

where Z Z and W W are n n and upper triangular

11 11

22 22

Proof Similar to the pro of of Theorem

We will obtain the structured Schur form of a complex skewHamiltonianHamiltonian

matrix p encil from the structured Schur form of a real skewHamiltonianskewHamiltoni

an matrix p encil of double dimension Consequently we need the following theorem that

establishes the existence of a structured real Schur form for these matrix p encils

Theorem If S N is a real regular skewHamiltonianskewHamiltonian matrix pen

T T 2n2n

cil with S J Z J Z then there exists a real Q R and a real

2 n2n

orthogonal symplectic matrix U R such that

Z Z

11 12

T

U ZQ

Z

22

N N

11 12

T T

J Q J NQ

T

N

11

T

are upper triangular N is quasi upper triangular and N is skew where Z and Z

11 12 11

22

symmetric

Moreover

T T T

N N Z Z Z Z Z Z

11 12 11 12 22

T T

22 22 12

J Q J S N Q

T T

N Z Z

22

11 11

is a J congruent skewHamiltonianskewHamiltonian matrix pencil

Proof A constructive pro of for the existence of Q and U satisfying and is

Algorithm in App endix A To show recall that U is orthogonal symplectic and therefore

commutes with J Hence

T T T T T T

J Q J SQ J Q J J Z J Z Q

T T T T T

J Q J J Z J U U ZQ

T T T T

J U ZQ J U ZQ

Equation now follows from the blo ck triangular form of

Note that this theorem do es not easily extend to complex skewHamiltonianskewHa

miltonian matrix p encils In the complex case there is little dierence in the structure of

Hamiltonian and skewHamiltonian matrices b ecause a skewHamiltonian matrix is just a

scalar multiple by i of a Hamiltonian matrix Real skewHamiltonian matrices have a

fundamentally dierent structure than real Hamiltonian matrices

A metho d for computing the structured Schur form for real matrices was prop osed in

If S is given in factored form then Algorithm in App endix A is more robust in nite

precision arithmetic b ecause it avoids forming S explicitly

Neither the metho d in nor Algorithm in App endix A applies to complex skewHa

miltonianHamiltonian matrix p encils b ecause those algorithms dep end on the fact that real

diagonal skewsymmetric matrices are identically zero This prop erty is also crucial for the

structured Schur form algorithms in

Algorithm given b elow computes the eigenvalues of a complex skewHamiltonianHa

2

miltonian matrix p encil S H using an unusual embedding of C into R that was recently

prop osed in Let S H b e a complex skewHamiltonianHamiltonian matrix p encil with

H T

J semidenite skewHamiltonian part S J Z J Z Split the skewHamiltonian matrix

N iH SH as iH N N iN where N is real skewHamiltonian and N is real

2n 1 2 1 2

Hamiltonian ie

F G

1 1

T T

H H G G N

1 1 1

T 1 1

H F

1

1

F G

2 2

T T

N G G H H

2 2 2

T 2 2

H F

2

2

nn

and F G H R for j Setting

j j j

p

I iI

2n 2n

Y

c

I iI

2n 2n

I

n

I

n

P

I

n

I

n

X Y P

c c

and using the embedding B diag N N we obtain that

N

G G F F

1 2 1 2

F F G G

2 1 2 1

c H

B X B X

N c

N c

T T

F H H F

1 2

2 1

T T

F F H H

2 1

1 2

is a real skewHamiltonian matrix in SH Similarly set

4n

Z

B

Z

Z

H T

JZ J

B

T

H T

J Z J

S

B B B

S T Z

S

Hence

S N

B B

S N

S N

We can easily verify that

c H

B X B X

Z c

Z c

c H c T T

B X B X J B J

T c

T c Z

c H c T T c

B X B X J B J B

S c

S c Z Z

are all real Therefore

c c H

B B X B B X

S N c

S N c

S N

H

X X

c

c

S N

is a real n n skewHamiltonianskewHamiltonian matrix p encil For this matrix p encil

we can employ Algorithm in App endix A to compute the structured factorization ie

we can determine an orthogonal symplectic matrix U and an orthogonal matrix Q such that

Z Z

11 12

c T c

B U B Q

Z Z

Z

22

N N

11 12

c T T c

B JQ J B Q

N N

T

N

11

c c T T c

Thus if B J B J B then

S Z Z

c c T T c T T c

B B J Q J B Q J Q J B Q

S N S N

is a J congruent skewHamiltonianskewHamiltonian matrix p encil in Schur form By

and the fact that the nite eigenvalues of S N are symmetric with resp ect to the real

axis we get

T

S H S iN Z Z iN

11 11

22

In this way Algorithm b elow computes the eigenvalues of the complex skewHamiltoni

anHamiltonian matrix p encil S H S i N

We can also extend the complex skewHamiltonianHamiltonian matrix p encil S H

to a double size complex skewHamiltonianHamiltonian matrix p encil B B where

S H

H

B

H

H

and B is as in The sp ectrum of the extended matrix p encil B B consists of two

S S H

copies of the sp ectrum of S H If

c H

X B X B

H c

H c

then it follows from and that

Z Z

11 12

c T c

B U B Q

Z Z

Z

22

iN iN

11 12

c T T c

B J Q J B Q

H H

H

iN

11

c c c H T c c

and the matrix p encil B B J B J B B is in skewHamiltonianHamil

S H Z Z H

tonian Schur form We have thus obtained the structured Schur form of the extended complex

c c

skewHamiltonianHamiltonian matrix p encil B B Moreover

S H

c c H T c c

B B JQ J B B Q

S H S H

S H

T H

X J QJ X Q

c c

S H

is in skewHamiltonianHamiltonian Schur form

We have seen so far that we can compute structured Schur forms and thus are able

to compute the eigenvalues of the structured matrix p encils under consideration using the

embedding technique into a structured matrix p encil of double size

To get the desired subspaces we generalize the techniques developed in For this we

need a structure preserving metho d to reorder the eigenvalues in the structured Schur form

This reordering metho d is describ ed in detail in App endix A The metho d shows that the

eigenvalues can b e ordered along the diagonal of structured Schur form so that all eigenvalues

with negative real part app ear in the blo ck and eigenvalues with p ositive real part

app ear in the blo ck

The following theorem uses this eigenvalue ordering to determine the desired deating

subspaces of the matrix p encil S H from the real structured Schur form

2 n2n

Theorem Let S H C be a skewHamiltonianHamiltonian matrix pencil with

H T

J semidenite skewHamiltonian matrix S JZ J Z Consider the extended matrices

B diag Z Z

Z

H T

H T

J Z J B diag J Z J

T

B B B diag S S

S T Z

B diag H H

H

Let U V W be unitary matrices such that

Z Z

11 12

H

U B V R

Z Z

Z

22

T T

11 12

H

W B U R

T T

T

22

H H

11 12

H

W B V R

H H

H

22

where B B T Z H and T Z H B B Suppose S H

S H 11 11 11 11 11 11 + S H

h i

V

4 nm

1

contains p eigenvalues If C are the rst m columns of V p m n p

V

2

then there are subspaces L and L such that

1 2

range V Def S H L L Def S H Def S H

1 1 1 0

V Def S H L L Def S H Def S H range

2 + 2 2 0

h i h i

U W

1 1

If T Z H B B and are the rst m columns of U W respec

11 11 11 S H

U W

2 2

tively then there exist unitary matrices Q Q Q such that

U V W

+

Q Q U P U P

U U 2 1

U U

+

Q Q V P V P

V V 2 1

V V

+

Q Q W P W P

W W 2 1

W W

+

and form orthogonal bases of Def S H and Def S H re and the columns of P P

+

V V

+ +

have orthonormal columns and the and P P P spectively Moreover the matrices P

W W U U

fol lowing relations are satised

H T

P H P T H P P Z JZ J P Z P

11 11 11

W W V U U V

+ + + + + +

H T

P P P P P P Z Z JZ J T H H

22 22 22

V U U W V W

Here Z T and H k satisfy T Z H T Z H S H

11 11 11 22 22 22

k k k k k k

Proof

The factorizations in imply that B V WR R and B V WR Comparing

S T Z H H

the rst m columns and making use of the blo ck forms we have

S V W T Z H V W H

1 1 11 11 1 1 11

V W T Z H V W H S

2 2 11 11 2 2 11

Clearly range V and range V are b oth deating subspaces of S H Since

1 2

S H B B T Z H

S H 11 11 11

and T Z H contains no eigenvalue with p ositive real part we get

11 11 11

range V Def S H L L Def S H Def S H

1 1 1 0

range V Def S H L L Def S H Def S H

2 + 2 2 0

We still need to show that

Def S H range V Def S H range V

1 + 2

Let V and V b e full rank matrices whose columns form bases of Def S H and Def S H

1 2 +

i h

~

0

V

1

span Def B B This implies resp ectively It is easy to show that the columns of

S H

~

0

V

2

that

V

V

1

1

range range

V

2 V

2

Therefore

V

V

1

1

range range range

V

V

2

2

and from this we obtain and hence

If T Z H B B where p is the number of eigenvalues in S H then

11 11 11 S H

from we have m p and

range V Def S H range V Def S H

1 2 +

Hence rank V rank V p and furthermore T Z and H must b e nonsingular Using

1 2 11 11 11

we get

1

H V S V T Z H

1 1 11 11 11

1

V S V T Z H H

2 2 11 11 11

of full column rank Since Q b e an RQ decomp osition with P Let V P

V 1

V V

+

H H

conformally with V Q Since p Partition V Q P P rank V p we have rank P

1 2 V 1

V V

V V

h i

V

+ + +

H

1

p I and hence rank P the columns of P are orthonormal we obtain P

p

V V V

V

2

Furthermore since rank V p we have

2

+

range V range P range P

2 V

V

+

and and using we obtain P Therefore the columns of P form P

V

V V

orthogonal bases of Def S H and Def S H resp ectively

+

From we have

H T

Z V U Z JZ J U W T H V W H

1 1 11 1 1 11 1 1 11

and

H T

V U Z J Z J U W T H V W H Z

2 2 11 2 2 11 2 2 11

of full P Q b e RQ decomp ositions with P Q and W P Let U P

W U 1 1

W U W U

are of full rank and H P S P Q and the fact that Z P column rank Using V P

V 1

V V V V

otherwise there would b e a zero or innite eigenvalue asso ciated with the deating subspace

from the rst and third identity in we obtain range P

V

p rank P rank P rank P

V W U

Moreover setting

H H H

Z Q Z Q T Q T Q H Q H Q

U 11 W 11 W 11

V U V

we obtain

H T Z

11 11 11

H T Z

H H T T Z Z

22 21 22 21 22 21

where all diagonal blo cks are p p

+ + +

H H H

The blo ck forms and take V Q P W Q P P Set U Q P P

2 2 W 2 U

V W U

V W U

+

of Z T and H together with the rst identity of imply that P P Z Since Z

U 21 11

U

h i

U

+ + +

H H

1

P Hence the columns of I and P P are orthonormal we have P

U p

U U U

U

2

Z and consequently P Similarly from the third identity of we get P

21 U W

H and from the second identity we obtain T Combining all these observations

21 21

we obtain

Z P Z P

11

U V

+ +

P Z P

Z

22

U V

H T

JZ J

T P P

11

W U

+ +

H T

P P

T

JZ J

22

W U

H P P H

11

W V

+ +

P P H

H

22

W V

which gives

We remark that can b e constructed from by reordering the eigenvalues prop erly

Theorem gives a way to obtain the stable deating subspace of a skewHamiltonianHa

miltonian matrix p encil form the deating subspaces of an embedded skewHamiltonianHa

miltonian matrix p encil of double size This will b e used by the algorithms formulated in the

next section

Algorithms

The results of Theorem together with the embedding technique lead to the following

algorithm to compute the eigenvalues and the deating subspaces Def S H and Def S H

+

of a complex skewHamiltonianHamiltonian matrix p encil S H

In summary Algorithm prop osed b elow transforms a n n complex skewHamilto

nianHamiltonian matrix p encil with J semidenite skewHamiltonian part into a n n

complex skewHamiltonianHamiltonian matrix p encil in Schur form The pro cess passes

through intermediate matrix p encils of the following types

n n complex skewHamiltonianHamiltonian matrix p encil

H T

S H with S J Z J Z

Equation

n n real skewHamiltonianskewHamiltonian matrix p encil

c c c c T T

B B with B J B J B

Z

S N S Z

Algorithm in App endix A

n n real skewHamiltonianskewHamiltonian matrix p encil in Schur form

c c c c T T c

B B with B J B J B

S N S Z Z

h i

Z Z

c T c

11 12

and B U B Q as in and

Z Z

0 Z

22

Algorithm in App endix A

n n complex skewHamiltonianskewHamiltonian matrix p encil in Schur form

with ordered eigenvalues

The required deating subspaces of the original skewHamiltonianHamiltonian matrix

p encil are then obtained from the deating subspaces of the nal n n complex skewHa

miltonianskewHamiltonian matrix p encil Unfortunately if there are nonreal eigenvalues

then Algorithm in App endix A the eigenvalue sorting algorithm reintroduces complex

entries into the n n extended real matrix p encil

Algorithm Given a complex skewHamiltonianHamiltonian matrix pencil S H with

H T

J semidenite skewHamiltonian part S J Z J Z this algorithm computes the structured

c c

Schur form of the extended skewHamiltonianHamiltonian matrix pencil B B the

S H

eigenvalues of S H and orthonormal bases of the deating subspace Def S H and the

companion subspace range P

U

Input Hamiltonian matrix H and the factor Z of S

as dened in Theorem P Output P

U V

Step

c c

Set N iH and form matrices B B as in and resp ectively Find the

Z N

c c

structured Schur form of the skewHamiltonianHamiltonian matrix p encil B B

S N

using Algorithm in App endix A to compute the factorization

Z Z

11 12

c T c

B U B Q

Z Z

Z

22

N N

11 12

c T T c

B JQ J B Q

N N

T

N

11

T

are upp er triangular where Q is real orthogonal U is real orthogonal symplectic Z Z

11

22

and N is quasi upp er triangular

11

Step

Reorder the eigenvalues using Algorithm in App endix A to determine a unitary matrix

Q and a unitary symplectic matrix U such that

Z Z

11 12

H c

U B Q

Z

Z

22

H H

11 12

H T c

J Q J iB Q

N

H

H

11

c H T c c H

H upp er triangular such that J B J B iB is contained with Z Z

11 11

22

Z Z N

H

in the sp ectrum of the p p leading principal subp encil of Z Z H

11 11

22

Step

i i h h

I I

2p 2p

where X is as in and com U I X U U Set V I X QQ

c 2n c 2n c

0 0

orthogonal bases of range V and range U resp ectively using any numer P pute P

U V

ically stable scheme

End

A detailed op count shows that this algorithm needs approximately the same number of

H T

ops as the p erio dic QZ algorithm applied to J Z J Z H

If S is not factored then the algorithm can b e simplied by using the metho d of to

c c

compute the real skewHamiltonianskewHamiltonian Schur form of B B directly

S H

Algorithm Given a complex skewHamiltonianHamiltonian matrix pencil S H This

algorithm computes the structured Schur form of the extended skewHamiltonianHamiltonian

c c

matrix pencil B B the eigenvalues of S H and an orthogonal basis of the deating

S H

subspace Def S H

Input A complex skewHamiltonianHamiltonian matrix p encil S H with S SH

2n

H H

2n

as dened in Theorem Output P

V

Step

c c

Set N iH and form the matrices B B as in and resp ectively

S N

Find the structured Schur form of the skewHamiltonianHamiltonian matrix p encil

c c

B B using Algorithm in App endix A to compute the factorization

S N

S S

11 12

c T T c

B JQ J B Q

S S

T

S

11

N N

11 12

c T T c

B JQ J B Q

N N

T

N

11

where Q is real orthogonal S is upp er triangular and N is quasi upp er triangular

11 11

Step

Reorder the eigenvalues using Algorithm in App endix A to determine a unitary matrix

Q such that

S S

11 12

H T c

J Q J B Q

S

H

S

11

H H

11 12

H T c

J Q J iB Q

N

H

H

11

c c

with S H upp er triangular and such that B iB is contained in the sp ec

11 11

S N

trum of the p p leading principal subp encil of S H

11 11

Step

i h

I

2p

the orthogonal where X is as in and compute P Set V I X QQ

c 2n c

V

0

basis of range V using any numerically stable orthogonalization scheme

End

H T

if S J Z J Z by computing the orthogonal The algorithm can also compute range P

U

However if Z is near singular then in nite arithmetic the isotropy of the basis of Z P

V

H

may b e lost or p o or J P subspace ie that P

U U

Algorithm needs roughly of the ops required by the QZ algorithm applied to

S H as suggested in

In this section we have presented complex structured triangular forms and numerical

algorithms for the computation of these forms In the next section we give an error analysis

for these metho ds The analysis is a generalization of the analysis for Hamiltonian matrices

in

Error and Perturbation Analysis

In this section we will give the p erturbation analysis for eigenvalues and deating subspaces

of skewHamiltonianHamiltonian matrix p encils Variables marked with a circumex denote

p erturb ed quantities

H T

We b egin with the p erturbation analysis for the eigenvalues of S H and J Z J Z

H T

H In principle we could multiply out JZ J Z and apply the classical p erturbation

analysis of matrix p encils using the chordal metric but this may give p essimistic b ounds

and would display neither the eects of p erturbing each factor separately nor the eects of

structured p erturbations Therefore we make use of the p erturbation analysis for formal

pro ducts of matrices developed in

If Algorithm is applied to the skewHamiltonianHamiltonian matrix p encil S H

then we compute the structured Schur form of the extended skewHamiltonianHamiltonian

c c

matrix p encil B B The wellknown backward error analysis of orthogonal matrix

S H

c

computations implies that rounding errors in Algorithm are equivalent to p erturbing B

S

c c c

B to a nearby matrix p encil B B where

H S H

c c

B B E

S

S S

c c

B B E

H

H H

with E SH E H and

S 4n H 4n

c

jjE jj c jjB jj

S S

S

2 2

c

jjE jj c jjB jj

H H

H

2 2

Here is the unit round of the oating p oint arithmetic and c and c are mo dest constants

S H

dep ending on the details of the implementation and arithmetic Let x and y b e unit norm

vectors such that

H x y S x y

1 1

and let b e a simple eigenvalue of S H If is nite and Re then is

1 1

also a simple eigenvalue of S H Let u v b e unit norm vectors such that

H u v S u v

2 2

and Then we have

2 2

Hu v S u v

2 2

c c

Using the equivalence of the matrix p encils B B and B B and setting

S H

S H

y x

H H

U X U X

1 2

c c

v u

we obtain from and that

1 1

c c

B U U B U U

2 1 2 1

H S

2 2

c c

which implies that is a double eigenvalue of B B with a complete set of linearly

S H

c c

indep endent eigenvectors Similarly is a double eigenvalue of B B with a complete

S H

set of linearly indep endent eigenvectors and

2 2

c c

B V V B V V

2 1 2 1

S H

1 1

where

v u

H H

V X V X

1 2

c c

y x

Note that the nite eigenvalues with nonzero real part app ear in pairs as in and

but innite and purely imaginary eigenvalues may not app ear in pairs Consequently in the

following p erturbation theorem the b ounds for purely imaginary and innite eigenvalues are

dierent from the b ounds for nite eigenvalues with nonzero real part

Theorem Consider the skewHamiltonianHamiltonian matrix pencil S H along with

c c H

B B X where B is given the corresponding extended matrix pencils B B X

S H c S

c

S H

c c c

by B by X by and B by Let B B be a perturbed extended

H c

S S H

matrix pencil satisfying with constants c c and let be equal to the unit round

H S

of the oating point arithmetic

If is a simple eigenvalue of S H with vectors x and y as in and vectors u

c c

and v as in then the corresponding double eigenvalue of B B may split into two

S H

c c

eigenvalues and of the perturbed matrix pencil B B each of which satises the

1 2

S H

fol lowing bounds

If is nite and Re then

c c

S H

k

2

jjHjj jjS jj O k

2 2

H

ju J y j j j j j

1 1

If is nite and Re then

2

c jjHjj c jj jjSjj O k j j

H S

k

2 2

H

j jjx J y j

1

If then

c jjSjj

S

2

2

O k

H

j jjx J y j

1

j j

k

Proof We rst consider the case that is nite and Re Let U and U b e dened

1 2

by and V and V b e dened by Using the p erturbation theory for formal pro ducts

1 2

of matrices see we obtain

H 1 H

V J U C V J E E U min

1 S H S 2

2 2

2

1

2 H 1 H

E E U C O V J U V J

H S 2 1

2 2

S

2

h i h i

H

H

0 u 0 u J y 0 y 0

H H

1

Here C X J X and V JU The second

T

S  c 1

c

2

0 0 x 0 x J v 0 v

2

H H

equation in implies u JS v J Combining this with the second equation of

2

H H

we get v J x u J y Hence

2 1

2 H 1 H

E E U O JU C V J V

H S 2 1 S

2 2

2

2 H 1

E E O JU C V

H S 1 S

2

2

2

jjE jj jjE jj

S H

2

2 2

O

H

ju J y j j j j j

1 1

c c

H S

2

jjHjj jjSjj O

2 2

H

ju J y j j j j j

1 1

If is purely imaginary or innite then the b ounds are obtained by adapting the classical

p erturbation theory in to a formal pro duct of matrices for details see and by replacing

with H x y and S x y as well as replacing u v and by x y and

1 1 2 2 1

resp ectively

1

The b ound in part app ears to involve only u y and but not v x and

1 1 2 2

H H

However note in the pro of that v J x u J y so the b ound implicitly involves all the

2 1

parameters

If S is given in factored form Algorithm computes the triangular form of the p erturb ed

matrix p encil

c c c c

B B B E B E

Z H

Z H Z H

where

c c

jjE jj c jjB jj jjE jj c jjB jj

Z Z H H

Z H

2 2 2 2

and is the machine precision and c and c are constants The eigenvalue p erturbation

Z H

b ounds then are essentially the same as in Theorem

Theorem Consider the skewHamiltonianHamiltonian matrix pencil S H with J

H T c c H

semidenite skewHamiltonian part S J Z J Z Let B B X B B X

S H c

c

S H

c c H T c

J B J B B is given by be the corresponding extended matrix pencils where B

Z

S Z Z

c c

B by and X by Let B B be the perturbed extended matrix pencil

H c

S H

in with constants c c and let be equal to the unit round of the oating point

H S

arithmetic

H T

Let be a simple eigenvalue of S H J Z J Z H with Re and let x

y z u v w be unit norm vectors such that

H T

JZ J x y H z y Z z x

1 1 1

1

and with

1 1

H T

JZ J u v H w v Z w u

2 2 2

2

with

2 2

c c

The corresponding double eigenvalue of B B may split into two eigenvalues and

1

S H

c c

of the perturbed matrix pencil B B each of which satises the fol lowing bounds

2

S H

If is nite and Re then

c c

Z H

2

jjHjj jjZjj O

2 2

H H H

j w J y j minfj u J xj j w J y jg

1 1 1

If is purely imaginary then

c jjc

H Z

2

jjHjj jjZ jj j j O

2 2

H H

j y J z j j u J xj

1 1 1

1

2

If then j j O

Proof The p erturbation analysis follows If is nite and Re then

H 2 H 1 1 H H H H

V JE U O V J U C C V E J U C C U JE U

H 3 3 1 3 1 3 Z 3

3 2 3 Z 3 1

2

H

v J z

H

J U From V it follows that

3

T

2

y J w

1

maxfj j j jg jjE jj jjE jj

1 2 Z H

jjE jj

2 2

jj

Z

2

2

O

H H H H

minfj v J z j j w J y jg minfj v J z j j w J y jg

2 2 1 1 2 1

From and we also have

H H H H H H

v J z u J x u J x w J y v J z w J y

2 1 2 1 2 1

It follows that

H H H

j v J z j j u J xj j w J y j

2 2 2 1 1 1

Hence

maxfj j j jg

1 2

H H H H

minfj v J z j j w J y jg minfj v J z j j w J y jg

2 2 1 1 2 1

H H H

jj minfj v J z j j w J y jg j w J y j

2 2 1 1 1

and

c c

Z H

2

jjHjj jjZjj O

2 2

H H H

j w J y j minfj v J z j j w J y jg

1 2 1

H H

Equation implies that v J z u J x The rst part of the theorem follows

2 1

If is purely imaginary the pro of is analogous

H

If then or Using the rst equation of we have y J z

1 1 1

H

x J x where we have replaced u v and by x y and resp ectively Since is simple

1 2 1

H H

ie y J z and x J x we have and hence C C Using the

1 1 1 3

1

2

O same argument as in Theorem gives

^

To study the p erturbations in the computed deating subspaces we need to study the

p erturbations for the extended matrix p encil in more detail As mentioned b efore by applying

c c

Algorithm to B B we actually compute a unitary matrix Q such that

S H

H T c c

J Q J B B Q R R

S H

S H

S S H H

11 12 11 12

H H

S H

11 11

c c c c

where B and B are dened in and and S H B B If we assume

11 11

S H S H

that the matrix p encil S H has no purely imaginary eigenvalues then by Theorem

there exist unitary matrices Q Q such that

1 2

H H S S

H T

11 12 11 12

J Q J S H Q

1

1

H H

H S

11 11

with S H S H and

11 11

+ + + +

H H S S

H T

11 12 11 12

J Q J S H Q

2

+ +

2

H H

H S

11 11

+ +

H

with S H S H resp ectively Set Q X diag Q Q P with P and X as in

+ 1 2 c

c

11 11

and Then Q is unitary and

H T c c

JQ J B B Q

S H

S H S H

12 12 11 11

+ + + +

S S H H

11 12 11 12

H H

S H

11 11

+ +

H H

S H

11 11

H H S S

11 12 11 12

H H

H S

11 11

R R

S H

This is the structured Schur form of the extended skewHamiltonianHamiltonian matrix

c c c c

p encil B B Moreover S H B B

11 11

S H S H

nn nn

In the following we will use the linear space C C endowed with the norm

jjX Y jj maxfjj X jj jjY jj g

2 2

Theorem Let S H be a regular skewHamiltonianHamiltonian matrix pencil with

be the orthogonal basis of the neither innite nor purely imaginary eigenvalues Let P

V

be the perturbation of deating subspace of S H corresponding to S H and let P

V

nn

obtained by Algorithm in nite precision arithmetic Denote by C the diagonal P

V

and P matrix of canonical angles between P

V V

Using the structured Schur form of the extended skewHamiltonianHamiltonian matrix

c c

pencil B B as in and given by dene by

S H

H H H H

Y Y S Y Y H S H

11 11

11 11

min

2 n2n

jjY jj

Y C nf0g

2

If

2

jjE E jj jj S H jj

S H 12 12

then

jj c S c H jj jj E E jj

S H S H

c jjjj c

b b

2

p p

where c and c are the modest constants in and c

S H

b

Proof Let R R Q b e the output of Step in Algorithm in nite precision

S H

c c

arithmetic where B B satisfy and Let Q b e the unitary matrix computed by

S H

Algorithm in exact arithmetic such that

H T c c

J Q J B B Q R R

S H

S H

S S H H

11 12 11 12

H H

S H

11 11

c c

with S H B B Since is another structured Schur form with the same

11 11

S H

eigenvalue ordering there exits a unitary diagonal matrix G diag G G such that Q

1 2

QG Therefore we have

jjS H jj S H

12 12 12 12

and for given in we also have

H H H H

H Y Y H S Y Y S

11 11

11 11

min

2 n2n

jjY jj

Y C nf0g

2

Let

F F E E

11 12 11 12

H T H T

E J Q J E E J Q J E Q Q

H H S S

H H

F F E E

21 21

11 11

and jj E F jj Since we S E H F and set jjE F jj

11 11 12 12 12 12 21 21

jjE E jj condition implies that E E have

S H S H

jjE E jj

S H

and clearly

2

jjE E jj jjS H jj jjE E jj

S H 12 12 S H

Hence

jjE E jjg S H jjE E jj f

S H 12 12 S H

2

2

jjE E jj

S H

2

2

jjE E jj jjE E jj

S H S H

2

jj E E jj

S H

Following the p erturbation analysis for a formal pro duct of matrices in it can b e shown

that there exists a unitary matrix

1 1

H H H

2 2

W I WW I W W

W

1 1

H H

2 2

W I W W I WW

with

jj W jj

2

such that

H T c c

J QW J B B QW

S H

is another structured Schur form of the p erturb ed matrix p encil Since there are neither

H

innite nor purely imaginary eigenvalues implies that Q QW is unitary blo ck diagonal

h i

Q Q

11 12

Without loss of generality we may take Q QW If X as in and X Q

c c

Q Q

21 22

rangefQ Q W I range Q Clearly P then it follows from Theorem that P

11 12 11

V V

1

H

2

W W g The upp er b ound then can b e derived from by using the same argument

as in the pro of of Theorem in

If S is given in factored form then we obtain a similar result In this case by using

Algorithm we compute a unitary matrix Q and a unitary symplectic matrix U such that

Z Z

11 12

H c

U Q R B

Z

Z

Z

22

H H

11 12

H T c

J Q J B Q R

H

H

H

H

11

c c H c c

where B and B are dened in and and Z Z H B B where

11 11

22

Z H S H

c c H T c

B J B J B

S Z Z

Analogous to Theorem if S H has no purely imaginary eigenvalues then there

exist unitary matrices Q Q and unitary symplectic matrices U U such that

1 2 1 2

H H Z Z

H T H

11 12 11 12

J Q J H Q U Z Q

1 1

1 1

H

H Z

11 22

H

with Z Z H S H and

22 11 11

+ + + +

H H Z Z

H T H

11 12 11 12

J Q J H Q U Z Q

2 2

+ +

H 2 2

H Z

11 22

+ + +

H

with Z Z H S H resp ectively Set

+

22 11 11

H H

Q X diag Q Q P U X diag U U P

1 2 1 2

c c

where P and X are as in and Then Q is unitary and U US and a simple

c 4n

calculation yields

Z Z

12 11

+ +

Z Z

Z Z

11 12

H c

11 12

U B Q R

Z

Z

Z

Z

22

22

+

Z

22

H H

12 11

+ +

H H

H H

11 12

H T c

11 12

R JQ J B Q

H

H

H

H

H

H

11

11

+

H

H

11

This leads to the structured Schur form of the extended skewHamiltonianHamiltonian ma

c c c H T c c H

Z H B B trix p encil J B J B B with Z

11 11

22

S H Z Z H

Theorem Consider the regular skewHamiltonianHamiltonian matrix pencil S H

H T

with nonsingular J denite skewHamiltonian part S JZ J Z Suppose that S H

has no eigenvalue with zero real part Let the extended skewHamiltonian and Hamiltonian

c c

matrix B and B be as in and respectively with structured triangular form given

Z H

by and Dene as

p

H H

Y Y H X Z Z Y H

11 11 22

11

min

p

2n2 n 2 n2n

jjX Y jj

(X Y )C C nf(00)g

2

be the deating subspaces and P P P Dene errors E and E by and Let P

Z H

U V U V

computed by Algorithm in exact and nite precision arithmetic respectively Denote by

nn

and P P and P C the diagonal matrices of canonical angles between P

V U

U U V V

respectively

If

2

jj E E jj jj Z H jj

Z H p 12 12

p

then

jj E E jj jjc Z c H jj

Z H Z H

jj jj jj jj c c

V U

b b

2 2

p p

with c as in Theorem

b

Proof The pro of is analogous to the pro of of Theorem

It follows that all the describ ed numerical algorithms are numerically backwards sta

ble The dierent metho ds compute the eigenvalues and the deating subspaces Def S H

Def S H of a skewHamiltonianHamiltonian matrix p encil S H These algorithms

+

can also b e used to compute deating subspaces which contain eigenvectors asso ciated with

innite or purely imaginary eigenvalues By Theorem we get partial information also in

these cases but we face the diculty that the desired deating subspace may not b e unique

or may not exist See the recent analysis for Hamiltonian matrices

Conclusion

We have presented numerical pro cedures for the computation of structured Schur forms

eigenvalues and deating subspaces of matrix p encils with matrices having a Hamiltonian

andor skewHamiltonian structure These metho ds generalize the recently developed meth

o ds for Hamiltonian matrices which use an extended double dimension Hamiltonian matrix

that always has a Hamiltonian Schur form

The algorithms circumvent problems with skewHamiltonianHamiltonian matrix p encils

that lack structured Schur form by embedding them in extended matrix p encils that always

admit a structured Schur form For the extended matrix p encils the algorithms use structure

preserving unitary matrix computations and are strongly backwards stable ie they compute

the exact structured Schur form of a nearby matrix p encil with the same structure Such

structured Schur forms can always b e computed regardless of the regularity of the original

matrix p encil

It is still somewhat unsatisfactory that the algorithms do not eciently exploit the micro

c

structures of the extended matrix p encils as for example in the matrix B in How b est

N

to use these micro structures is still an op en question

References

GS Ammar P Benner and V Mehrmann A multishift algorithm for the numerical

solution of algebraic Riccati equations Electr Trans Num Anal

GS Ammar and V Mehrmann On Hamiltonian and symplectic Hessenberg forms

Linear Algebra Appl

DJ Bender and AJ Laub The linearquadratic optimal regulator for descriptor sys

tems IEEE Trans Automat Control AC

P Benner R Byers and E Barth FORTRAN subroutines for computing the eigen

values of Hamiltonian matrices I The squarereduced metho d ACM Trans Math Soft

To app ear

P Benner V Mehrmann and H Xu A new metho d for computing the stable invariant

subspace of a real Hamiltonian matrix J Comput Appl Math

P Benner V Mehrmann and H Xu A numerically stable structure preserving metho d

for computing the eigenvalues of real Hamiltonian or symplectic p encils Numer Math

P Benner V Mehrmann and H Xu A note on the numerical solution of complex

Hamiltonian and skewHamiltonian eigenvalue problems Electr Trans Num Anal

P Benner V Mehrmann and H Xu Perturbation analysis for the

eigenvalue problem of a formal pro duct of matrices Available from

httpwwwmathunibremendezetemberichtehtml January

S Bittanti A Laub and J C Willems editors The Riccati Equation SpringerVerlag

Berlin

A Bo janczyk GH Golub and P Van Do oren The p erio dic Schur decomp osition

algorithms and applications In Proc SPIE Conference vol pages

A BunseGerstner Matrix factorization for symplectic QRlike metho ds

Appl

A BunseGerstner R Byers and V Mehrmann Numerical metho ds for algebraic Riccati

equations In S Bittanti editor Proc Workshop on the Riccati Equation in Control

Systems and Signals pages Como Italy

R Byers Hamiltonian and Symplectic Algorithms for the Algebraic Riccati Equation

PhD thesis Cornell University Dept Comp Sci Ithaca NY

R Byers A Hamiltonian QRalgorithm SIAM J Sci Statist Comput

R Byers T Geerts and V Mehrmann Descriptor systems without controllability at

innity SIAM J Cont

Ralph Byers Peter Kunkel and Volker Mehrmann Regularization of linear descriptor

systems with variable co ecients SIAM J Cont Optim

H Fabender DS Mackey N Mackey and H Xu Hamiltonian square ro ots of skew

Hamiltonian matrices Linear Algebra Appl

FR Gantmacher Theory of Matrices volume Chelsea New York

GH Golub and CF Van Loan Matrix Computations Johns Hopkins University Press

Baltimore third edition

M Green and DJN Limeb eer Linear Robust Control PrenticeHall Englewoo d Clis

NJ

JJ Hench and AJ Laub Numerical solution of the discretetime p erio dic Riccati

equation IEEE Trans Automat Control

V Ionescu C Oara and M Weiss General matrix p encil techniques for the solution of

algebraic Riccati equations A unied approach IEEE Trans Automat Control

V Ionescu C Oara and M Weiss Generalized Riccati theory and robust control A

Popov function approach John Wiley Sons Chichester

V Ionescu and M Weiss Continuous and discretetime Riccati theory a Pop ovfunction

approach Linear Algebra Appl

HW Knoblo ch and H Kwakernaak Lineare Kontrolltheorie SpringerVerlag Berlin

In German

P Kunkel and V Mehrmann Numerical solution of Riccati dierential algebraic equa

tions Linear Algebra Appl

P Kunkel and V Mehrmann The linear quadratic control problem for linear descriptor

systems with variable co ecients Math Control Signals Sys

P Lancaster Strongly stable gyroscopic systems Electr J Linear Algebra

P Lancaster and L Ro dman The Algebraic Riccati Equation Oxford University Press

Oxford

AJ Laub Invariant subspace metho ds for the numerical solution of Riccati equations In

S Bittanti AJ Laub and JC Willems editors The Riccati Equation pages

SpringerVerlag Berlin

WW Lin and TC Ho On Schur type decomp ositions for Hamiltonian and sym

plectic p encils Technical rep ort Institute of Applied Mathematics National Tsing Hua

University Taiwan

WW Lin V Mehrmann and H Xu Canonical forms for Hamiltonian and symplectic

matrices and p encils Linear Algebra Appl

C Mehl Compatible Lie and Jordan algebras and applications to structured matrices and

pencils Dissertation Fakultat f ur Mathematik TU Chemnitz Chemnitz FRG

C Mehl Condensed forms for skewHamiltonianHamiltonian p encils SIAM J Matrix

Anal Appl

V Mehrmann The Autonomous Linear Quadratic Control Problem Theory and Nu

merical Solution Number in Lecture Notes in Control and Information Sciences

SpringerVerlag Heidelb erg July

V Mehrmann and H Xu Lagrangian invariant subspaces of Hamiltonian matrices

Technical Rep ort SFB Fakultat f ur Mathematik TU Chemnitz Chem

nitz FRG Available from httpwwwtuchemnitzdesfbsfbprhtml

J Olson HJA Jensen and P Jrgensen Solution of large matrix equations which

o ccur in resp onse theory J Comput Phys

CC Paige and CF Van Loan A Schur decomp osition for Hamiltonian matrices Linear

Algebra Appl

RV Patel On computing the eigenvalues of a symplectic p encil Linear Algebra Appl

PH Petkov ND Christov and MM Konstantinov Computational Methods for Linear

Control Systems PrenticeHall Hertfordshire UK

LS Pontryagin V Boltyanskii R Gamkrelidze and E Mishenko The Mathematical

Theory of Optimal Processes Interscience New York

AM Sandig and WL Wendland Asymptotic expansions of elastic elds in domains

with b oundary and structural singularities In Boundary element topics Stuttgart

pages Springer Berlin

V Sima Algorithms for LinearQuadratic Optimization volume of Pure and Applied

Mathematics Marcel Dekker Inc New York NY

GW Stewart and JG Sun Matrix Perturbation Theory Academic Press New York

P Van Do oren A generalized eigenvalue approach for solving Riccati equations SIAM

J Sci Statist Comput

CF Van Loan A symplectic metho d for approximating all the eigenvalues of a Hamil

tonian matrix Linear Algebra Appl

JC Willems Paradigms and puzzles in the theory of dynamical systems IEEE Trans

Automat Control

K Zhou JC Doyle and K Glover Robust and Optimal Control PrenticeHall Upp er

Saddle River NJ

A Algorithmic Details

In the following we describ e the details of the factorization algorithms We employ elementary

orthogonal and orthogonal symplectic transformation matrices

We denote an m m Givens matrix by

I

i1

i

cos sin e

Gi j I

j i1

i

sin e cos

I

mj

where i j m and If then the

is a real orthogonal matrix In this case we drop the fourth argument and use the three

argument notation Gi j Gi j If m n j n i and then the

rotation matrix is a real orthogonal and symplectic In this case we also drop the second

argument j and use the two argument notation G i Gi n i Gi n i If

s

n

z C then the j th comp onent of the pro duct Gi j arctan jx x j x jx jjx jx x is

j i j i j i

n

zero Here we use the convention that If x R then the j th comp onent of the

pro duct Gi j arctan x x x is zero For brevity we will use the arctangent formula when

j i

describing algorithms In practice no transcendental functions are needed For eciency and

rotations should b e constructed as describ ed for example in

Another elementary orthogonal symplectic matrix that we will use is

Gi j

G i j

d

Gi j

where Gi j is n n

k

For w C we denote an n n Householder matrix n k by

H

w w

T T

H k w I w w

n

H

w w

where w is obtained from w by prep ending n k zeros If w then we take H k I

n

For ease of explication the algorithms b elow explicitly assemble and multiply rotations

and reections as full size matrices In actual implementation one would store and use these

elementary unitary matrices in the ecient way describ ed for example in

A Schur Forms for SkewHamiltonianHamiltonian Matrix Pencils and

SkewHamiltonianskewHamiltonian Matrix Pencils

In this subsection we describ e the computation of the structured Schur forms for complex

skewHamiltonianHamiltonian and real skewHamiltonianskewHamiltonian matrix p encils

We rst give the metho d for computing the structured factorization of a real skewHamilto

nianskewHamiltonian matrix p encil as in

Algorithm Given a real skewHamiltonianskewHamiltonian matrix pencil S N with

T T

S J Z J Z The algorithm computes an orthogonal matrix Q and an orthogonal sym

T T T

plectic matrix U such that U ZQ and JQ J NQ are in the block triangular forms as in

2 n2n

Input A real matrix N SH and a real matrix Z R

2n

Output A real orthogonal matrix Q a real orthogonal symplectic matrix U and the struc

tured factorization

Step Set U Q I

2n

Step By changing the elimination order in the classical RQ decomp osition determine an

orthogonal matrix Q such that

1

Z Z

11 12

Z ZQ

1

Z

22

T T T

where Z Z are upp er triangular Up date Q QQ and N J Q J NQ

11 1 1

22 1

Step FOR k n

I Annihilate N n k k n as wel l as N n k n k

FOR j k n

a Use Gj j to eliminate N from the right Set

1

n+k j

T T

N J Gj j J N Gj j

1 1

Z Z Gj j

1

Q QGj j

1

b Use G j j to eliminate Z from the left Set

2 j +1j

d

T

Z G j j Z

2

d

U U G j j

2

d

c Use Gn j n j to eliminate Z from the right

3 n+jn+j +1

Set

Z Z Gn j n j

3

T T

N J Gn j n j J N Gn j n j

3 3

Q QGn j n j

3

END FOR j

II Annihilate N and due to the skewHamiltonian

n+k n

structure simultaneously annihilate N

2nk

a Use G n to eliminate N from the right Set

s 1

n+k n

T T

N J G n J N G n

s 1 s 1

Z Z G n

s 1

Q QG n

s 1

b Use G n to eliminate Z from the left Set

s 2 2nn

T

Z G n Z

s 2

U U G n

s 2

III Annihilate N n k n k n and due to the skew

Hamiltonian structure simultaneously annihilate N k n k

FOR j n n k

a Use Gn j n j to eliminate N from the right

1

n+k n+j

Set

T T

N J Gn j n j J N Gn j n j

1 1

Z Z Gn j n j

1

Q QGn j n j

1

b Use G j j to eliminate Z from the left Set

2 n+j 1n+j

d

T

Z G j j Z

2

d

U U G j j

2

d

c Use Gj j to eliminate Z from the right Set

3 jj 1

Z Z Gj j

3

T T

N J Gj j J N Gj j

3 3

Q QGj j

3

END FOR j

END FOR k

N N Z Z

11 12 11 12

N Now Z

T

N Z

22

11

T

Step Apply the p erio dic QZ algorithm to the matrix p encil Z Z N to

11 11

22

T T T

U are b oth upp er Z determine orthogonal matrices Q Q U such that U Z Q Q

1 2 11 1

22 2

T

N Q is quasi upp er triangular triangular and Q

11 1

2

Set U diag U U Q diag Q Q

1 2 1 2

T T T

Up date Z U ZQ N JQ J NQ Q QQ U UU

2 2 2 1

1 2

END

The next subroutine is the eigenvalue reordering metho d for a complex skewHamiltoni

H T

anHamiltonian matrix p encil S H with S J Z J Z which is in structured triangular

form We rst introduce some subroutines to deal with problems

Subroutine Given a regular matrix pencil T Z H with T Z H upper triangular

H H H

HQ ZQ Q TQ Q This subroutine determines unitary matrices Q Q Q such that Q

1 1 2 1 2 3

3 2 3

are stil l upper triangular but the eigenvalues are in the reversed order

Input upp er triangular matrices T Z H

Output The unitary matrices Q Q Q describ ed ab ove

1 2 3

Set t z h t z h

11 11 22 22 22 11

IF

T Z H has a double eigenvalue

Set Q Q Q I

1 2 3 2

ELSE

Compute Q G arctan arg arg

1

with t z h t z h t z h

11 12 22 12 22 22 22 22 12

Compute Q G arctan arg arg

2

with t z h t z h t z h

12 11 22 22 11 12 22 12 11

Compute Q G arctan arg arg

3

with t z h t z h t z h

11 11 12 11 12 11 12 22 11

END IF

END

The second subroutine deals with triangular skewHamiltonianHamiltonian matrix

p encils

Subroutine Given a regular complex skewHamiltonianHamiltonian matrix pencil

h h z z

11 12 11 12

H T

The subrou H S H with S JZ J Z where Z

h z

11 22

H

tine determines a unitary matrix Q and a unitary symplectic matrix U such that U ZQ

T H T H

J QJ HQ are both upper triangular but the eigenvalues of J QJ S H Q are in

reversed order

Input upp er triangular matrices Z H with H H

2

Output The unitary matrix Q and a real orthogonal symplectic matrix U

describ ed ab ove

Set Re h z z

11 11 22

IF

S H has a double purely imaginary eigenvalue

Set Q U I

2

ELSE

2

Compute U G arctan with jz j h Re h z z

11 12 12 11 22

z z

11 12

H

Set U Z

z z

21 22

Compute Q G arctan z z arg z arg z

22 11 11 22

END IF

END

Now we are ready to formulate the algorithm

Algorithm Given a regular n n complex skewHamiltonianHamiltonian matrix pencil

H T

S H with J semidenite skew Hamiltonian part S JZ J Z

Z W H D

Z H

H

T H

H

and Z T and H upper triangular This algorithm determines a unitary matrix Q and a

H H T

unitary symplectic matrix U such that U ZQ and JQ J HQ stil l have the same triangular

form as Z and H respectively but the eigenvalues in S H are reordered so that they

H T

occur in the leading principal subpencil of JQ J S H Q

Input A Matrix Z and a Hamiltonian matrix H in triangular form

Output A unitary matrix Q and a unitary symplectic matrix U The matrices S and

H H T

H are overwritten by U ZQ and JQ J HQ resp ectively that the eigenvalues of

H T

J Q J S H Q are in the desired order

Step Set Q U I

2n

H

Step Reorder the eigenvalues in the subpencil T Z H

Set m m n

+

I Reorder the eigenvalues with negative real parts to the top

Set k

WHILE k n DO

IF t z and Re h t z

k k k k k k k k k k

FOR j k m

a Apply Subroutine to the matrix p encil

t t z z h h

j j j +1j j j jj +1 j j jj +1

t z h

j +1j +1 j +1j +1 j +1j +1

to determine unitary matrices Q Q Q

1 2 3

b Set Q diag I Q I I Q I

j 1 1 nj 1 j 1 3 nj 1

U diag I Q I I Q I

j 1 2 nj 1 j 1 2 nj 1

H H T

c Up date Z U Z Q H J Q J H Q U U U

Q QQ

END FOR j

m m

END IF

k k

END WHILE

II Reorder the eigenvalues with positive real parts to the bottom

Set k n

WHILE k m DO

IF t z and Re h t z

k k k k k k k k k k

FOR j k m

+

a Apply Subroutine to the matrix p encil

h h z z t t

j j jj +1 j j jj +1 j j j +1j

h z t

j +1j +1 j +1j +1 j +1j +1

to determine unitary matrices Q Q Q

1 2 3

b Set Q diag I Q I I Q I

j 1 1 nj 1 j 1 3 nj 1

U diag I Q I I Q I

j 1 2 nj 1 j 1 2 nj 1

H H T

c Up date Z U Z Q H J Q J H Q U U U

Q QQ

END FOR j

m m

+ +

END IF

k k

END WHILE

The remaining n m eigenvalues with negative real part are now

+

in the bottom right subpencil of S H

Step Reorder the remaining n m eigenvalues

+

FOR k n m

+

I Exchange the eigenvalues between two diagonal blocks

a Apply Subroutine to the matrix p encil

t w z w h d

nn nn nn nn nn nn

z t h

nn nn nn

c s

to determine a unitary matrix Q and a unitary sym

s c

u u

1 2

plectic matrix U

u u

2 1

b Let Q diag c Q diag s

1 2

U diag u U diag u

1 1 2 2

U U Q Q

1 2 1 2

U Set Q

U U Q Q

2 1 2 1

H H T

c Up date Z U Z Q H J Q J H Q U U Q Q QQ

II Move the eigenvalue in the nth diagonal position to the m

position

m m

FOR j n m

a Apply Subroutine to the matrix p encil

h h z z t t

j j jj +1 j j jj +1 j +1j j j

h z t

j +1j +1 j +1j +1 j +1j +1

to determine unitary matrices Q Q Q

1 2 3

b Set Q diag I Q I I Q I

j 1 1 nj 1 j 1 3 nj 1

U diag I Q I I Q I

j 1 2 nj 1 j 1 2 nj 1

H H T

c Up date Z U Z Q H J Q J H Q U U U Q QQ

END FOR j

END FOR k

END

A Subroutines Required by Algorithm

In this app endix we present the subroutines used in Algorithm First we recall the following

algorithm from

Algorithm Given a real skewHamiltonianskewHamiltonian matrix pencil S N

T T T T

This algorithm computes an orthogonal matrix Q such that JQ J SQ and JQ J NQ

are in skewHamiltonian triangular form

Input Real matrices S N SH

2n

Output A real orthogonal matrix Q which reduces S and N to skewHamiltonian triangular

T T T T

form S and N are overwritten by JQ J SQ and JQ J NQ resp ectively

Step Set Q I

2n

Step Reduce S to skewHamiltonian triangular form

FOR k n

a Determine a Householder matrix H n k x to eliminate S n k k

n as well as S n k n k from the right Set

T T T T

Q diag H n k x I S J Q J S Q N J Q J N Q Q QQ

n

b Determine G k to eliminate S as well as S from

s

n+k k +1 n+k +1k

the right Set

T

S G k S G k

s s

T

N G k N G k

s s

Q QG k

s

c Determine H n k y to eliminate S n k n k n as well

as S k n k from the right

Set Q diag I H n k y

n

T T T T

Up date S J Q J S Q N J Q J N Q Q QQ

END FOR k

Step Reduce N to skewHamiltonian triangular form

FOR k n

I Annihilate N n k k n as wel l as N n k n k

FOR j k n

a Use Gj j to eliminate N from the right Set

1

n+k j

T T

N J Gj j J N Gj j

1 1

T T

S J Gj j J S Gj j

1 1

Q QGj j

1

b Use Gn j n j to eliminate S from the right

2 n+jn+j +1

Set

T T

N J Gn j n j J N Gn j n j

2 2

T T

S J Gn j n j J S Gn j n j

2 2

Q QGn j n j

2

END FOR j

II Annihilate N and simultaneously N

n+k n 2nk

Use G n to eliminate N from the right Set

s 1

n+k n

T

N G n N G n

s 1 s 1

T

S G n S G n

s 1 s 1

Q QG n

s 1

III Annihilate N n k n k n as wel l as N k n k

FOR j n n k

a Use Gn j n j to eliminate N from the right

1

n+k n+j

Set

T T

N J Gn j n j J N Gn j n j

1 1

T T

S J Gn j n j J S Gn j n j

1 1

Q QGn j n j

1

b Use G j j to eliminate S from the right Set

2 jj 1

d

T T

N J Gj j J N Gj j

2 2

T T

S J Gj j J S Gj j

2 2

Q QGj j

2

END FOR j

END FOR k

N N S S

11 12 11 12

N Now we have S

T T

N S

11 11

Step Apply the QZ algorithm to the matrix p encil S N to determine orthog

11 11

T T

onal matrices Q Q such that Q S Q is upp er triangular and Q N Q is quasi

1 2 11 1 11 1

2 2

upp er triangular

Set Q diag Q Q

1 2

T T T T

Up date S J Q J S Q N J Q J N Q Q QQ

END

We also need an eigenvalue reordering metho d for Algorithm We rst introduce some

subroutines

Subroutine Given a regular matrix pencil S H with S H upper triangular

H

This subroutine determines unitary matrices Q Q such that Q S H Q is stil l

1 2 1

2

upper triangular but the eigenvalues are in reversed order

Input upp er triangular matrices S H

Output The unitary matrices Q and Q describ ed ab ove

1 2

Set s h s h

11 22 22 11

IF

S H has a double eigenvalue

Set Q Q I

1 2 2

ELSE

Compute Q G arctan arg arg where s h s h

1 12 22 22 12

Compute Q G arctan arg arg where s h s h

2 11 12 12 11

END IF

END

Subroutine Given a regular complex skewHamiltonianHamiltonian matrix pencil

h h s s

11 12 11 12

This subroutine determines a unitary H S H with S

h s

11 11

H T

matrix Q such that JQ J S H Q is upper triangular but the eigenvalues are in reversed

order

Input upp er triangular matrices S SH H H

2 2

Output The unitary matrix Q describ ed ab ove

Set Re h s

11 11

IF

S H has a double purely imaginary eigenvalue

set Q I

2

ELSE

Compute Q G arctan arctan arg arg with

z and s h s h

11 11 12 12 11

END IF

END

Using these subroutines we now present the eigenvalue reordering algorithm for a complex

skewHamiltonianHamiltonian matrix p encil

Algorithm Given a regular n n complex skewHamiltonianHamiltonian matrix pencil

S H of the form

S W H D

S H

H H

S H

with S and H upper triangular This algorithm determines a unitary matrix Q such that

H T

the matrix pencil JQ J S H Q remains in triangular form but the eigenvalues in

S H are reordered in the leading principal subpencil

Input Matrices S SH and H H in triangular form

2n 2n

H T

Output Unitary matrix Q such that the eigenvalues of JQ J S H Q are in the

H T H T

desired order S and H are overwritten by JQ J SQ and J Q J HQ resp ectively

Step Set Q I

2n

Step Reorder the eigenvalues in the subpencil S H

Set m m n

+

I Reorder the eigenvalues with negative real parts to the top

Set k

WHILE k n DO

IF s and Re h s

k k k k k k

FOR j k m

a Apply Subroutine to the matrix p encil

s s h h

j j jj +1 j j jj +1

s h

j +1j +1 j +1j +1

to determine unitary matrices Q Q

1 2

b Set Q diag I Q I I Q I

j 1 1 nj 1 j 1 2 nj 1

H T H T

c Up date S J Q J S Q H J Q J H Q Q QQ

END FOR j

m m

END IF

k k

END WHILE

II Reorder the eigenvalues with positive real parts to the bottom

Set k n

WHILE k m DO

IF s and Re h s

k k k k k k

FOR j k m

+

a Apply Subroutine to the matrix p encil

h h s s

j j jj +1 j j jj +1

h s

j +1j +1 j +1j +1

to determine unitary matrices Q Q

1 2

b Set Q diag I Q I I Q I

j 1 1 nj 1 j 1 2 nj 1

H T H T

c Up date S J Q J S Q H J Q J H Q Q QQ

END FOR j

m m

+ +

END IF

k k

END WHILE

The remaining n m eigenvalues with negative real part are

+

now in the bottom right subpencil of S H

Step Reorder the remaining n m eigenvalues

+

FOR k n m

+

I Exchange the eigenvalues between two diagonal blocks

a Apply Subroutine to the matrix p encil

s w h d

nn nn nn nn

s h

nn nn

c s

to determine a unitary matrix Q

s c

b Let Q diag c Q diag s and

1 2

Q Q

1 2

set Q

Q Q

2 1

H T H T

c Up date S J Q J S Q H J Q J H Q Q QQ

II Move the eigenvalue in nth diagonal position to the m

position

m m

FOR j n m

a Apply Subroutine to the matrix p encil

h h s s

j j jj +1 j j jj +1

h s

j +1j +1 j +1j +1

to determine unitary matrices Q Q

1 2

b Set Q diag I Q I I Q I

j 1 1 nj 1 j 1 2 nj 1

H T H T

c Up date S J Q J S Q H J Q J H Q Q QQ

END FOR j

END FOR k

END