<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?>
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:space="preserve"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/><title>F02 Chapter Introduction : NAG Library, Mark 23</title><link rel="stylesheet" href="../styles/libdoc.css" type="text/css"/><script type="text/javascript">
   function showLevel(_levelId){
    var thisLevel = document.getElementById(_levelId);
    var thisplus = document.getElementById( _levelId.concat('plus'));
    var thisminus = document.getElementById( _levelId.concat('minus'));
    if(thisLevel.style.display != "block"){
     thisLevel.style.display = "block";
     thisplus.style.display = "none";
     thisminus.style.display = "inline";
     }
    else{
     thisLevel.style.display = "none";
     thisminus.style.display = "none";
     thisplus.style.display = "inline";
     }
    }
  </script></head><body><hr/><div><a class="chap" href="f02conts.xml">F02 Chapter Contents</a></div><div><a class="chapint" href="../../pdf/F02/f02intro.pdf">F02 Chapter Introduction (PDF version)</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div><hr/><h1 class="libdoc">NAG Library Chapter Introduction<br/><br/>F02 &#8211; Eigenvalues and Eigenvectors</h1><div class="htmltoc">
<h2 class="htmltoc"><span class="htmltochead" onclick="showLevel('htmltoc');"><span class="htmltocplus" id="htmltocplus">+</span><span class="htmltocminus" id="htmltocminus">&#8722;</span></span>&#160;Contents</h2>
<div class="htmltocitem" id="htmltoc">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#scope">1&#160;&#160;<b>Scope of the Chapter</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocbackground');"><span class="htmltocplus" id="tocbackgroundplus">+</span><span class="htmltocminus" id="tocbackgroundminus">&#8722;</span></span>
<a class="htmltoc" href="#background">2&#160;&#160;<b>Background to the Problems</b></a>
<div class="htmltocitem" id="tocbackground">
<div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocbackground1');"><span class="htmltocplus" id="tocbackground1plus">+</span><span class="htmltocminus" id="tocbackground1minus">&#8722;</span></span>
<a class="htmltoc" href="#background1">2.1&#160;&#160;<b>Standard Eigenvalue Problems</b></a>
<div class="htmltocitem" id="tocbackground1">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background11">2.1.1&#160;&#160;<b>Standard symmetric eigenvalue problems</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background12">2.1.2&#160;&#160;<b>Standard nonsymmetric eigenvalue problems</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background2">2.2&#160;&#160;<b>The Singular Value Decomposition</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocbackground3');"><span class="htmltocplus" id="tocbackground3plus">+</span><span class="htmltocminus" id="tocbackground3minus">&#8722;</span></span>
<a class="htmltoc" href="#background3">2.3&#160;&#160;<b>Generalized Eigenvalue Problems</b></a>
<div class="htmltocitem" id="tocbackground3">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background31">2.3.1&#160;&#160;<b>Generalized symmetric-definite eigenvalue problems</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background32">2.3.2&#160;&#160;<b>Generalized nonsymmetric eigenvalue problems</b></a>
</div>
</div>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocavailable');"><span class="htmltocplus" id="tocavailableplus">+</span><span class="htmltocminus" id="tocavailableminus">&#8722;</span></span>
<a class="htmltoc" href="#available">3&#160;&#160;<b>Recommendations on Choice and Use of Available Routines</b></a>
<div class="htmltocitem" id="tocavailable">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#recomm_1">3.1&#160;&#160;<b>Black Box Routines and General Purpose Routines</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#recomm_2">3.2&#160;&#160;<b>Computing Selected Eigenvalues and Eigenvectors</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#recomm_3">3.3&#160;&#160;<b>Storage Schemes for Symmetric Matrices</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#recomm_4">3.4&#160;&#160;<b>Balancing for Nonsymmmetric Eigenproblems</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#recomm_5">3.5&#160;&#160;<b>Non-uniqueness of Eigenvectors and Singular Vectors</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocdtree');"><span class="htmltocplus" id="tocdtreeplus">+</span><span class="htmltocminus" id="tocdtreeminus">&#8722;</span></span>
<a class="htmltoc" href="#dtree">4&#160;&#160;<b>Decision Trees</b></a>
<div class="htmltocitem" id="tocdtree">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#dtrees1">4.1&#160;&#160;<b>Black Box Routines</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#dtrees2">4.2&#160;&#160;<b>General Purpose Routines (Eigenvalues and Eigenvectors)</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#dtrees3">4.3&#160;&#160;<b>General Purpose Routines (Singular Value Decomposition)</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#index">5&#160;&#160;<b>Functionality Index</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#auxindex">6&#160;&#160;<b>Auxiliary Routines Associated with Library Routine Parameters</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#withdrawn">7&#160;&#160;<b>Routines Withdrawn or Scheduled for Withdrawal</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">8&#160;&#160;<b>References</b></a>
</div>
</div>
</div><h2 class="standard"><a class="sec" name="scope" id="scope"/>1&#160;&#160;Scope of the Chapter</h2>
<div class="paramtext">This chapter provides routines for various types of matrix eigenvalue problem:
<ul class="listind"><li class="listind">standard eigenvalue problems (finding eigenvalues and eigenvectors of a square matrix <m:math><m:mi>A</m:mi></m:math>);</li><li class="listind">singular value problems (finding singular values and singular vectors of a rectangular matrix <m:math><m:mi>A</m:mi></m:math>);</li><li class="listind">generalized eigenvalue problems (finding eigenvalues and eigenvectors of a matrix pencil <m:math><m:mi>A</m:mi><m:mo>-</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi></m:math>).</li></ul>
Routines are provided for both real and complex data.</div><div class="paramtext">The majority of routines for these problems can be found in <a class="chap" href="../F08/f08conts.xml">Chapter F08</a> which contains software derived from LAPACK (see <a class="ref" href="#ref562">Anderson <span class="italic">et al.</span> (1999)</a>). However, you should read the introduction to this chapter before turning to <a class="chap" href="../F08/f08conts.xml">Chapter F08</a>, especially if you are a new user.  <a class="chap" href="../F12/f12conts.xml">Chapter F12</a> contains routines for large sparse eigenvalue problems, although one such routine is also available in this chapter.</div><div class="paramtext"><a class="chap" href="../F02/f02conts.xml">Chapters F02</a> and <a class="chap" href="../F08/f08conts.xml">F08</a> contain <b>Black Box</b> (or <b>Driver</b>) routines that enable many problems to be solved by a call to a single routine, and the decision trees in <a class="sec" href="#dtree">Section 4</a> direct you to the most appropriate routines in <a class="chap" href="../F02/f02conts.xml">Chapters F02</a> and <a class="chap" href="../F08/f08conts.xml">F08</a>.
The <a class="chap" href="../F02/f02conts.xml">Chapter F02</a> routines call routines in <a class="chap" href="../F07/f07conts.xml">Chapters F07</a> and <a class="chap" href="../F08/f08conts.xml">F08</a> wherever possible to perform the computations, and there are pointers in <a class="sec" href="#dtree">Section 4</a> to the relevant decision trees in <a class="chap" href="../F08/f08conts.xml">Chapter F08</a>.
</div><h2 class="standard"><a class="sec" name="background" id="background"/>2&#160;&#160;Background to the Problems</h2>
<div class="paramtext">Here we describe the different types of problem which can be tackled by the routines in this chapter, and give a brief outline of the methods used to solve them. If you have one specific type of problem to solve, you need only read the relevant sub-section and then turn to <a class="sec" href="#available">Section 3</a>. Consult a standard textbook for a more thorough discussion, for example <a class="ref" href="#ref105">Golub and Van Loan (1996)</a> or <a class="ref" href="#ref111">Parlett (1998)</a>.</div><div class="paramtext">In each sub-section, we first describe the problem in terms of real matrices. The changes needed to adapt the discussion to complex matrices are usually simple and obvious: a matrix transpose such as <m:math><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>&#160;must be replaced by its conjugate transpose <m:math><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">H</m:mi></m:msup></m:math>; symmetric matrices must be replaced by Hermitian matrices, and orthogonal matrices by unitary matrices. Any additional changes are noted at the end of the sub-section.</div><h3 class="standard"><a class="sec" name="background1" id="background1"/>2.1&#160;&#160;Standard Eigenvalue Problems</h3>
<div class="paramtext">Let <m:math><m:mi>A</m:mi></m:math>&#160;be a square matrix of order <m:math><m:mi>n</m:mi></m:math>. The <span class="italic">standard eigenvalue problem</span> is to find eigenvalues, <m:math><m:mi>&#955;</m:mi></m:math>, and corresponding eigenvectors, <m:math><m:mi>x</m:mi><m:mo>&#8800;</m:mo><m:mn>0</m:mn></m:math>, such that

<div class="formula-eqn"><a name="eqn1" id="eqn1"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>x</m:mi><m:mtext>.</m:mtext>
</m:math></td><td class="formula-eqn2">
      (1)
     </td></tr></table></div>

(The phrase &#8216;eigenvalue problem&#8217; is sometimes abbreviated to <span class="italic">eigenproblem</span>.)</div><h4 class="standard"><a class="sec" name="background11" id="background11"/>2.1.1&#160;&#160;Standard symmetric eigenvalue problems</h4>
<div class="paramtext">If <m:math><m:mi>A</m:mi></m:math>&#160;is real symmetric, the eigenvalue problem has many desirable features, and it is advisable to take advantage of symmetry whenever possible.</div><div class="paramtext">The eigenvalues <m:math><m:mi>&#955;</m:mi></m:math>&#160;are all real, and the eigenvectors can be chosen to be mutually orthogonal. That is, we can write

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:msub><m:mi>z</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>&#955;</m:mi><m:mi>i</m:mi></m:msub><m:msub><m:mi>z</m:mi><m:mi>i</m:mi></m:msub><m:mtext>&#8195; for &#8203;</m:mtext><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi>
</m:math></td><td class="formula2"/></tr></table></div>

or equivalently:

<div class="formula-eqn"><a name="eqn2" id="eqn2"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mi>A</m:mi><m:mi>Z</m:mi><m:mo>=</m:mo><m:mi>Z</m:mi><m:mi>&#923;</m:mi>
</m:math></td><td class="formula-eqn2">
      (2)
     </td></tr></table></div>

where <m:math><m:mi>&#923;</m:mi></m:math>&#160;is a real diagonal matrix whose diagonal elements <m:math><m:msub><m:mi>&#955;</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are the eigenvalues, and <m:math><m:mi>Z</m:mi></m:math>&#160;is a real orthogonal matrix whose columns <m:math><m:msub><m:mi>z</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are the eigenvectors. This implies that <m:math>
 <m:msubsup><m:mi>z</m:mi><m:mi>i</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:msub><m:mi>z</m:mi><m:mi>j</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>&#160;if <m:math><m:mi>i</m:mi><m:mo>&#8800;</m:mo><m:mi>j</m:mi></m:math>, and <m:math><m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:msub><m:mi>z</m:mi><m:mi>i</m:mi></m:msub></m:mfenced><m:mn>2</m:mn></m:msub><m:mo>=</m:mo><m:mn>1</m:mn></m:math>.</div><div class="paramtext">Equation <a class="eqn" href="#eqn2">(2)</a> can be rewritten

<div class="formula-eqn"><a name="eqn3" id="eqn3"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mi>A</m:mi><m:mo>=</m:mo><m:mi>Z</m:mi><m:mi>&#923;</m:mi><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mtext>.</m:mtext>
</m:math></td><td class="formula-eqn2">
      (3)
     </td></tr></table></div>

This is known as the <span class="italic">eigen-decomposition</span> or <span class="italic">spectral factorization</span> of <m:math><m:mi>A</m:mi></m:math>.</div><div class="paramtext">Eigenvalues of a real symmetric matrix are well-conditioned, that is, they are not unduly sensitive to perturbations in the original matrix <m:math><m:mi>A</m:mi></m:math>. The sensitivity of an eigenvector depends on how small the gap is between its eigenvalue and any other eigenvalue: the smaller the gap, the more sensitive the eigenvector. More details on the accuracy of computed eigenvalues and eigenvectors are given in the routine documents, and in the <a class="chapint" href="../F08/f08intro.xml">F08 Chapter Introduction</a>.</div><div class="paramtext">For dense or band matrices, the computation of eigenvalues and eigenvectors proceeds in the following stages:
<ol class="listnumber"><li class="listnumber"><m:math><m:mi>A</m:mi></m:math>&#160;is reduced to a symmetric tridiagonal matrix <m:math><m:mi>T</m:mi></m:math>&#160;by an orthogonal similarity transformation: <m:math><m:mi>A</m:mi><m:mo>=</m:mo><m:mi>Q</m:mi><m:mi>T</m:mi><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>, where <m:math><m:mi>Q</m:mi></m:math>&#160;is orthogonal. (A <span class="italic">tridiagonal</span> matrix is zero except for the main diagonal and the first subdiagonal and superdiagonal on either side.) <m:math><m:mi>T</m:mi></m:math>&#160;has the same eigenvalues as <m:math><m:mi>A</m:mi></m:math>&#160;and is easier to handle.</li><li class="listnumber">Eigenvalues and eigenvectors of <m:math><m:mi>T</m:mi></m:math>&#160;are computed as required. If all eigenvalues (and optionally eigenvectors) are required, they are computed by the <m:math><m:mi>Q</m:mi><m:mi>R</m:mi></m:math>&#160;algorithm, which effectively factorizes <m:math><m:mi>T</m:mi></m:math>&#160;as <m:math><m:mi>T</m:mi><m:mo>=</m:mo><m:mi>S</m:mi><m:mi>&#923;</m:mi><m:msup><m:mi>S</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>, where <m:math><m:mi>S</m:mi></m:math>&#160;is orthogonal.
If only selected eigenvalues are required, they are computed by bisection, and if selected eigenvectors are required, they are computed by inverse iteration. If <m:math><m:mi>s</m:mi></m:math>&#160;is an eigenvector of <m:math><m:mi>T</m:mi></m:math>, then <m:math><m:mi>Q</m:mi><m:mi>s</m:mi></m:math>&#160;is an eigenvector of <m:math><m:mi>A</m:mi></m:math>.</li></ol>
</div><div class="paramtext">All the above remarks also apply &#8211; with the obvious changes &#8211; to the case when <m:math><m:mi>A</m:mi></m:math>&#160;is a complex Hermitian matrix. The eigenvectors are complex, but the eigenvalues are all real, and so is the tridiagonal matrix <m:math><m:mi>T</m:mi></m:math>.</div><div class="paramtext">If <m:math><m:mi>A</m:mi></m:math>&#160;is large and sparse, the methods just described would be very wasteful in both storage and computing time, and therefore an alternative algorithm, known as <span class="italic">subspace iteration</span>, is provided (for real problems only) to find a (usually small) subset of the eigenvalues and their corresponding eigenvectors. <a class="chap" href="../F12/f12conts.xml">Chapter F12</a> contains routines based on the Lanczos method for real symmetric large sparse eigenvalue problems, and these routines are usually more efficient than subspace iteration.</div><h4 class="standard"><a class="sec" name="background12" id="background12"/>2.1.2&#160;&#160;Standard nonsymmetric eigenvalue problems</h4>
<div class="paramtext">A real nonsymmetric matrix <m:math><m:mi>A</m:mi></m:math>&#160;may have complex eigenvalues, occurring as complex conjugate pairs. If <m:math><m:mi>x</m:mi></m:math>&#160;is an eigenvector corresponding to a complex eigenvalue <m:math><m:mi>&#955;</m:mi></m:math>, then the complex conjugate vector <m:math><m:mover><m:mi>x</m:mi><m:mo>-</m:mo></m:mover></m:math>&#160;is the eigenvector corresponding to the complex conjugate eigenvalue <m:math><m:mover><m:mi>&#955;</m:mi><m:mo>-</m:mo></m:mover></m:math>. Note that the vector <m:math><m:mi>x</m:mi></m:math>&#160;defined in equation <a class="eqn" href="#eqn1">(1)</a> is sometimes called a <span class="italic">right eigenvector</span>; a <span class="italic">left eigenvector</span>
<m:math><m:mi>y</m:mi></m:math>&#160;is defined by

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msup><m:mi>y</m:mi><m:mi mathvariant="normal">H</m:mi></m:msup><m:mi>A</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:msup><m:mi>y</m:mi><m:mi mathvariant="normal">H</m:mi></m:msup><m:mtext>&#8195; or &#8195;</m:mtext><m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>y</m:mi><m:mo>=</m:mo><m:mover><m:mi>&#955;</m:mi><m:mo>-</m:mo></m:mover><m:mi>y</m:mi><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

Routines in this chapter only compute right eigenvectors (the usual requirement), but routines in <a class="chap" href="../F08/f08conts.xml">Chapter F08</a> can compute left or right eigenvectors or both.</div><div class="paramtext">The eigenvalue problem can be solved via the <span class="italic">Schur factorization</span> of <m:math><m:mi>A</m:mi></m:math>, defined as

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:mo>=</m:mo><m:mi>Z</m:mi><m:mi>T</m:mi><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:mi>Z</m:mi></m:math>&#160;is an orthogonal matrix and <m:math><m:mi>T</m:mi></m:math>&#160;is a real upper <span class="italic">quasi-triangular</span> matrix, with the same eigenvalues as <m:math><m:mi>A</m:mi></m:math>. <m:math><m:mi>T</m:mi></m:math>&#160;is called the <span class="italic">Schur form</span> of <m:math><m:mi>A</m:mi></m:math>. If all the eigenvalues of <m:math><m:mi>A</m:mi></m:math>&#160;are real, then <m:math><m:mi>T</m:mi></m:math>&#160;is upper triangular, and its diagonal elements are the eigenvalues of <m:math><m:mi>A</m:mi></m:math>. If <m:math><m:mi>A</m:mi></m:math>&#160;has complex conjugate pairs of eigenvalues, then <m:math><m:mi>T</m:mi></m:math>&#160;has <m:math><m:mn>2</m:mn></m:math>&#160;by <m:math><m:mn>2</m:mn></m:math>&#160;diagonal blocks, whose eigenvalues are the complex conjugate pairs of eigenvalues of <m:math><m:mi>A</m:mi></m:math>. (The structure of <m:math><m:mi>T</m:mi></m:math>&#160;is simpler if the matrices are complex &#8211; see below.)</div><div class="paramtext">For example, the following matrix is in quasi-triangular form

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mfenced><m:mtable columnalign="right">
 <m:mtr>
  <m:mtd><m:mn>1</m:mn></m:mtd>
  <m:mtd><m:mo>*</m:mo></m:mtd>
  <m:mtd><m:mo>*</m:mo></m:mtd>
  <m:mtd><m:mo>*</m:mo></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>0</m:mn></m:mtd>
  <m:mtd><m:mn>2</m:mn></m:mtd>
  <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:mtd>
  <m:mtd><m:mo>*</m:mo></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>0</m:mn></m:mtd>
  <m:mtd><m:mn>1</m:mn></m:mtd>
  <m:mtd><m:mn>2</m:mn></m:mtd>
  <m:mtd><m:mo>*</m:mo></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mn>0</m:mn></m:mtd>
  <m:mtd><m:mn>0</m:mn></m:mtd>
  <m:mtd><m:mn>0</m:mn></m:mtd>
  <m:mtd><m:mn>3</m:mn></m:mtd>
 </m:mtr>
 </m:mtable></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

and has eigenvalues <m:math><m:mn>1</m:mn></m:math>, <m:math><m:mn>2</m:mn><m:mo>&#177;</m:mo><m:mi>i</m:mi></m:math>, and <m:math><m:mn>3</m:mn></m:math>. (The elements indicated by &#8216;<m:math><m:mo>*</m:mo></m:math>&#8217; may take any values.)</div><div class="paramtext">The columns of <m:math><m:mi>Z</m:mi></m:math>&#160;are called the <span class="italic">Schur vectors</span>. For each <m:math><m:mi>k</m:mi><m:mfenced separators=""><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>k</m:mi><m:mo>&#8804;</m:mo><m:mi>n</m:mi></m:mfenced></m:math>, the first <m:math><m:mi>k</m:mi></m:math>&#160;columns of <m:math><m:mi>Z</m:mi></m:math>&#160;form an orthonormal basis for the invariant subspace corresponding to the first <m:math><m:mi>k</m:mi></m:math>&#160;eigenvalues on the diagonal of <m:math><m:mi>T</m:mi></m:math>. (An <span class="italic">invariant subspace</span> (for <m:math><m:mi>A</m:mi></m:math>) is a subspace <m:math><m:mi>S</m:mi></m:math>&#160;such that for any vector <m:math><m:mi>v</m:mi></m:math>&#160;in <m:math><m:mi>S</m:mi></m:math>, <m:math><m:mi>A</m:mi><m:mi>v</m:mi></m:math>&#160;is also in <m:math><m:mi>S</m:mi></m:math>.) Because this basis is orthonormal, it is preferable in many applications to compute Schur vectors rather than eigenvectors. It is possible to order the Schur factorization so that any desired set of <m:math><m:mi>k</m:mi></m:math>&#160;eigenvalues occupy the <m:math><m:mi>k</m:mi></m:math>&#160;leading positions on the diagonal of <m:math><m:mi>T</m:mi></m:math>, and routines for this purpose are provided in <a class="chap" href="../F08/f08conts.xml">Chapter F08</a>.</div><div class="paramtext">Note that if <m:math><m:mi>A</m:mi></m:math>&#160;is symmetric, the Schur vectors are the same as the eigenvectors, but if <m:math><m:mi>A</m:mi></m:math>&#160;is nonsymmetric, they are distinct, and the Schur vectors, being orthonormal, are often more satisfactory to work with in numerical computation.</div><div class="paramtext">Eigenvalues and eigenvectors of a nonsymmetric matrix may be ill-conditioned, that is, sensitive to perturbations in <m:math><m:mi>A</m:mi></m:math>. <a class="chap" href="../F08/f08conts.xml">Chapter F08</a> contains routines which compute or estimate the condition numbers of eigenvalues and eigenvectors, and the <a class="chapint" href="../F08/f08intro.xml">F08 Chapter Introduction</a> gives more details about the error analysis of nonsymmetric eigenproblems. The accuracy with which eigenvalues and eigenvectors can be obtained is often improved by <span class="italic">balancing</span> a matrix. This is discussed further in <a class="sec" href="#recomm_4">Section 3.4</a>.</div><div class="paramtext">Computation of eigenvalues, eigenvectors or the Schur factorization proceeds in the following stages:
<ol class="listnumber"><li class="listnumber"><m:math><m:mi>A</m:mi></m:math>&#160;is reduced to an upper Hessenberg matrix <m:math><m:mi>H</m:mi></m:math>&#160;by an orthogonal similarity transformation: <m:math><m:mi>A</m:mi><m:mo>=</m:mo><m:mi>Q</m:mi><m:mi>H</m:mi><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>, where <m:math><m:mi>Q</m:mi></m:math>&#160;is orthogonal. (An <span class="italic">upper Hessenberg</span> matrix is zero below the first subdiagonal.) <m:math><m:mi>H</m:mi></m:math>&#160;has the same eigenvalues as <m:math><m:mi>A</m:mi></m:math>, and is easier to handle.</li><li class="listnumber">The upper Hessenberg matrix <m:math><m:mi>H</m:mi></m:math>&#160;is reduced to Schur form <m:math><m:mi>T</m:mi></m:math>&#160;by the <m:math><m:mi>Q</m:mi><m:mi>R</m:mi></m:math>&#160;algorithm, giving the Schur factorization <m:math><m:mi>H</m:mi><m:mo>=</m:mo><m:mi>S</m:mi><m:mi>T</m:mi><m:msup><m:mi>S</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>. The eigenvalues of <m:math><m:mi>A</m:mi></m:math>&#160;are obtained from the diagonal blocks of <m:math><m:mi>T</m:mi></m:math>. The matrix <m:math><m:mi>Z</m:mi></m:math>&#160;of Schur vectors (if required) is computed as <m:math><m:mi>Z</m:mi><m:mo>=</m:mo><m:mi>Q</m:mi><m:mi>S</m:mi></m:math>.</li><li class="listnumber">After the eigenvalues have been found, eigenvectors may be computed, if required, in two different ways. Eigenvectors of <m:math><m:mi>H</m:mi></m:math>&#160;can be computed by inverse iteration, and then pre-multiplied by <m:math><m:mi>Q</m:mi></m:math>&#160;to give eigenvectors of <m:math><m:mi>A</m:mi></m:math>; this approach is usually preferred if only a few eigenvectors are required. Alternatively, eigenvectors of <m:math><m:mi>T</m:mi></m:math>&#160;can be computed by back-substitution, and pre-multiplied by <m:math><m:mi>Z</m:mi></m:math>&#160;to give eigenvectors of <m:math><m:mi>A</m:mi></m:math>.</li></ol>
</div><div class="paramtext">All the above remarks also apply &#8211; with the obvious changes &#8211; to the case when <m:math><m:mi>A</m:mi></m:math>&#160;is a complex matrix. The eigenvalues are in general complex, so there is no need for special treatment of complex conjugate pairs, and the Schur form <m:math><m:mi>T</m:mi></m:math>&#160;is simply a complex upper triangular matrix.</div><div class="paramtext">As for the symmetric eigenvalue problem, if <m:math><m:mi>A</m:mi></m:math>&#160;and is large and sparse then it is generally preferable to use an alternative method.  <a class="chap" href="../F12/f12conts.xml">Chapter F12</a> provides routines based on Arnoldi's method for both real and complex matrices, intended to find a subset of the eigenvalues and vectors.</div><h3 class="standard"><a class="sec" name="background2" id="background2"/>2.2&#160;&#160;The Singular Value Decomposition</h3>
<div class="paramtext">The <span class="italic">singular value decomposition</span> (SVD) of a real <m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;matrix <m:math><m:mi>A</m:mi></m:math>&#160;is given by

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:mo>=</m:mo><m:mi>U</m:mi><m:mi>&#931;</m:mi><m:msup><m:mi>V</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:mi>U</m:mi></m:math>&#160;and <m:math><m:mi>V</m:mi></m:math>&#160;are orthogonal and <m:math><m:mi>&#931;</m:mi></m:math>&#160;is an <m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;diagonal matrix with real diagonal elements, <m:math><m:msub><m:mi>&#963;</m:mi><m:mi>i</m:mi></m:msub></m:math>, such that

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>&#963;</m:mi><m:mn>1</m:mn></m:msub><m:mo>&#8805;</m:mo><m:msub><m:mi>&#963;</m:mi><m:mn>2</m:mn></m:msub><m:mo>&#8805;</m:mo><m:mo>&#8943;</m:mo><m:mo>&#8805;</m:mo><m:msub><m:mi>&#963;</m:mi><m:mrow><m:mi>min</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mi>m</m:mi><m:mo>,</m:mo><m:mi>n</m:mi></m:mfenced></m:mrow></m:msub><m:mo>&#8805;</m:mo><m:mn>0</m:mn><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

The <m:math><m:msub><m:mi>&#963;</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are the <span class="italic">singular values</span> of <m:math><m:mi>A</m:mi></m:math>&#160;and the first <m:math><m:mrow><m:mi>min</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mi>m</m:mi><m:mo>,</m:mo><m:mi>n</m:mi></m:mfenced></m:mrow></m:math>&#160;columns of <m:math><m:mi>U</m:mi></m:math>&#160;and <m:math><m:mi>V</m:mi></m:math>&#160;are, respectively, the <span class="italic">left</span> and <span class="italic">right singular vectors</span> of <m:math><m:mi>A</m:mi></m:math>. The singular values and singular vectors satisfy

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:msub><m:mi>v</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>&#963;</m:mi><m:mi>i</m:mi></m:msub><m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub><m:mtext>&#8195; and &#8195;</m:mtext><m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>&#963;</m:mi><m:mi>i</m:mi></m:msub><m:msub><m:mi>v</m:mi><m:mi>i</m:mi></m:msub>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>v</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are the <m:math><m:mi>i</m:mi></m:math>th columns of <m:math><m:mi>U</m:mi></m:math>&#160;and <m:math><m:mi>V</m:mi></m:math>&#160;respectively.</div><div class="paramtext">The singular value decomposition of <m:math><m:mi>A</m:mi></m:math>&#160;is closely related to the eigen-decompositions of the symmetric matrices <m:math><m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>A</m:mi></m:math>&#160;or <m:math><m:mi>A</m:mi><m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>, because:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>A</m:mi><m:msub><m:mi>v</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msubsup><m:mi>&#963;</m:mi><m:mi>i</m:mi><m:mn>2</m:mn></m:msubsup><m:msub><m:mi>v</m:mi><m:mi>i</m:mi></m:msub><m:mtext>&#8195; and &#8195;</m:mtext><m:mi>A</m:mi><m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msubsup><m:mi>&#963;</m:mi><m:mi>i</m:mi><m:mn>2</m:mn></m:msubsup><m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

However, these relationships are not recommended as a means of computing singular values or vectors unless <m:math><m:mi>A</m:mi></m:math>&#160;is sparse and routines from <a class="chap" href="../F12/f12conts.xml">Chapter F12</a> are to be used.</div><div class="paramtext">If <m:math><m:msub><m:mi>U</m:mi><m:mi>k</m:mi></m:msub></m:math>, <m:math><m:msub><m:mi>V</m:mi><m:mi>k</m:mi></m:msub></m:math>&#160;denote the leading <m:math><m:mi>k</m:mi></m:math>&#160;columns of <m:math><m:mi>U</m:mi></m:math>&#160;and <m:math><m:mi>V</m:mi></m:math>&#160;respectively, and if <m:math><m:msub><m:mo>&#931;</m:mo><m:mi>k</m:mi></m:msub></m:math>&#160;denotes the leading principal submatrix of <m:math><m:mo>&#931;</m:mo></m:math>, then 

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msub><m:mi>A</m:mi><m:mi>k</m:mi></m:msub>
 <m:mo>&#8801;</m:mo>
 <m:msub><m:mi>U</m:mi><m:mi>k</m:mi></m:msub>
 <m:msub><m:mo>&#931;</m:mo><m:mi>k</m:mi></m:msub>
 <m:msub><m:msup><m:mi>V</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>k</m:mi></m:msub>
</m:math></td><td class="formula2"/></tr></table></div>

is the best rank-<m:math><m:mi>k</m:mi></m:math>&#160;approximation to <m:math><m:mi>A</m:mi></m:math>&#160;in both the <m:math><m:mn>2</m:mn></m:math>-norm and the Frobenius norm.</div><div class="paramtext">Singular values are well-conditioned; that is, they are not unduly sensitive to perturbations in <m:math><m:mi>A</m:mi></m:math>. The sensitivity of a singular vector depends on how small the gap is between its singular value and any other singular value: the smaller the gap, the more sensitive the singular vector. More details on the accuracy of computed singular values and vectors are given in the routine documents and in the <a class="chapint" href="../F08/f08intro.xml">F08 Chapter Introduction</a>.</div><div class="paramtext">The singular value decomposition is useful for the numerical determination of the rank of a matrix, and for solving linear least squares problems, especially when they are rank-deficient (or nearly so). See <a class="chap" href="../F04/f04conts.xml">Chapter F04</a>.</div><div class="paramtext">Computation of singular values and vectors proceeds in the following stages:
<ol class="listnumber"><li class="listnumber"><m:math><m:mi>A</m:mi></m:math>&#160;is reduced to an upper bidiagonal matrix <m:math><m:mi>B</m:mi></m:math>&#160;by an orthogonal transformation <m:math><m:mi>A</m:mi><m:mo>=</m:mo><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub><m:mi>B</m:mi><m:msubsup><m:mi>V</m:mi><m:mn>1</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup></m:math>, where <m:math><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>V</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;are orthogonal. (An <span class="italic">upper bidiagonal</span> matrix is zero except for the main diagonal and the first superdiagonal.) <m:math><m:mi>B</m:mi></m:math>&#160;has the same singular values as <m:math><m:mi>A</m:mi></m:math>, and is easier to handle.</li><li class="listnumber">The SVD of the bidiagonal matrix <m:math><m:mi>B</m:mi></m:math>&#160;is computed as <m:math>
 <m:mi>B</m:mi>
 <m:mo>=</m:mo>
 <m:msub><m:mi>U</m:mi><m:mn>2</m:mn></m:msub>
 <m:mi>&#931;</m:mi>
 <m:msubsup><m:mi>V</m:mi><m:mn>2</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup>
</m:math>, where <m:math><m:msub><m:mi>U</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>V</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;are orthogonal and <m:math><m:mi>&#931;</m:mi></m:math>&#160;is diagonal as described above. Then in the SVD of <m:math><m:mi>A</m:mi></m:math>, <m:math><m:mi>U</m:mi><m:mo>=</m:mo><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>U</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;and <m:math><m:mi>V</m:mi><m:mo>=</m:mo><m:msub><m:mi>V</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>V</m:mi><m:mn>2</m:mn></m:msub></m:math>.</li></ol>
</div><div class="paramtext">All the above remarks also apply &#8211; with the obvious changes &#8211; to the case when <m:math><m:mi>A</m:mi></m:math>&#160;is a complex matrix. The singular vectors are complex, but the singular values are real and non-negative, and the bidiagonal matrix <m:math><m:mi>B</m:mi></m:math>&#160;is also real.</div><div class="paramtext">By formulating the problems appropriately, real large sparse singular value problems may be solved using the symmetric eigenvalue routines in <a class="chap" href="../F12/f12conts.xml">Chapter F12</a>.</div><h3 class="standard"><a class="sec" name="background3" id="background3"/>2.3&#160;&#160;Generalized Eigenvalue Problems</h3>
<div class="paramtext">Let <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;be square matrices of order <m:math><m:mi>n</m:mi></m:math>. The <span class="italic">generalized eigenvalue problem</span> is to find eigenvalues, <m:math><m:mi>&#955;</m:mi></m:math>, and corresponding eigenvectors, <m:math><m:mi>x</m:mi><m:mo>&#8800;</m:mo><m:mn>0</m:mn></m:math>, such that

<div class="formula-eqn"><a name="eqn4" id="eqn4"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi><m:mi>x</m:mi><m:mtext>.</m:mtext>
</m:math></td><td class="formula-eqn2">
      (4)
     </td></tr></table></div>

For given <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>, the set of all matrices of the form <m:math><m:mi>A</m:mi><m:mo>-</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi></m:math>&#160;is called a <span class="italic">pencil</span>, and <m:math><m:mi>&#955;</m:mi></m:math>&#160;and <m:math><m:mi>x</m:mi></m:math>&#160;are said to be an eigenvalue and eigenvector of the pencil <m:math><m:mi>A</m:mi><m:mo>-</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi></m:math>.</div><div class="paramtext">When <m:math><m:mi>B</m:mi></m:math>&#160;is nonsingular, equation <a class="eqn" href="#eqn4">(4)</a> is mathematically equivalent to <m:math><m:mfenced separators=""><m:msup><m:mi>B</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mi>A</m:mi></m:mfenced><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>x</m:mi></m:math>, and when <m:math><m:mi>A</m:mi></m:math>&#160;is nonsingular, it is equivalent to <m:math><m:mfenced separators=""><m:msup><m:mi>A</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mi>B</m:mi></m:mfenced><m:mi>x</m:mi><m:mo>=</m:mo><m:mfenced separators=""><m:mn>1</m:mn><m:mo>/</m:mo><m:mi>&#955;</m:mi></m:mfenced><m:mi>x</m:mi></m:math>. Thus, in theory, if one of the matrices <m:math><m:mi>A</m:mi></m:math>&#160;or <m:math><m:mi>B</m:mi></m:math>&#160;is known to be nonsingular, the problem could be reduced to a standard eigenvalue problem.</div><div class="paramtext">However, for this reduction to be satisfactory from the point of view of numerical stability, it is necessary not only that <m:math><m:mi>B</m:mi></m:math>&#160;(or <m:math><m:mi>A</m:mi></m:math>) should be nonsingular, but that it should be well-conditioned with respect to inversion. The nearer <m:math><m:mi>B</m:mi></m:math>&#160;is to singularity, the more unsatisfactory <m:math><m:msup><m:mi>B</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mi>A</m:mi></m:math>&#160;will be as a vehicle for determining the required eigenvalues. Well-determined eigenvalues of the original problem <a class="eqn" href="#eqn4">(4)</a> may be poorly determined even by the correctly rounded version of <m:math><m:msup><m:mi>B</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mi>A</m:mi></m:math>.</div><div class="paramtext">We consider first a special class of problems in which <m:math><m:mi>B</m:mi></m:math>&#160;is known to be nonsingular, and then return to the general case in the following sub-section.</div><h4 class="standard"><a class="sec" name="background31" id="background31"/>2.3.1&#160;&#160;Generalized symmetric-definite eigenvalue problems</h4>
<div class="paramtext">If <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;are <span class="italic">symmetric</span> and <m:math><m:mi>B</m:mi></m:math>&#160;is <span class="italic">positive definite</span>, then the generalized eigenvalue problem has desirable properties similar to those of the standard symmetric eigenvalue problem. The eigenvalues are all real, and the eigenvectors, while not orthogonal in the usual sense, satisfy the relations <m:math>
 <m:msubsup><m:mi>z</m:mi><m:mi>i</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:mi>B</m:mi>
 <m:msub><m:mi>z</m:mi><m:mi>j</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>&#160;for <m:math><m:mi>i</m:mi><m:mo>&#8800;</m:mo><m:mi>j</m:mi></m:math>&#160;and can be normalized so that <m:math>
 <m:msubsup><m:mi>z</m:mi><m:mi>i</m:mi><m:mi mathvariant="normal">T</m:mi></m:msubsup>
 <m:mi>B</m:mi>
 <m:msub><m:mi>z</m:mi><m:mi>i</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
</m:math>.</div><div class="paramtext">Note that it is not enough for <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;to be symmetric; <m:math><m:mi>B</m:mi></m:math>&#160;must also be positive definite, which implies nonsingularity. Eigenproblems with these properties are referred to as <span class="italic">symmetric-definite</span> problems.</div><div class="paramtext">If <m:math><m:mi>&#923;</m:mi></m:math>&#160;is the diagonal matrix whose diagonal elements are the eigenvalues, and <m:math><m:mi>Z</m:mi></m:math>&#160;is the matrix whose columns are the eigenvectors, then

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>A</m:mi><m:mi>Z</m:mi><m:mo>=</m:mo><m:mi>&#923;</m:mi><m:mtext>&#8195; and &#8195;</m:mtext><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>B</m:mi><m:mi>Z</m:mi><m:mo>=</m:mo><m:mi>I</m:mi><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

To compute eigenvalues and eigenvectors, the problem can be reduced to a standard symmetric eigenvalue problem, using the Cholesky factorization of <m:math><m:mi>B</m:mi></m:math>&#160;as <m:math><m:mi>L</m:mi><m:msup><m:mi>L</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>&#160;or <m:math><m:msup><m:mi>U</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>U</m:mi></m:math>&#160;(see <a class="chap" href="../F07/f07conts.xml">Chapter F07</a>). Note, however, that this reduction does implicitly involve the inversion of <m:math><m:mi>B</m:mi></m:math>, and hence this approach should <span class="italic">not</span> be used if <m:math><m:mi>B</m:mi></m:math>&#160;is ill-conditioned with respect to inversion.</div><div class="paramtext">For example, with <m:math><m:mi>B</m:mi><m:mo>=</m:mo><m:mi>L</m:mi><m:msup><m:mi>L</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>, we have

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mi>A</m:mi><m:mi>z</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi><m:mi>z</m:mi>
 <m:mo>&#8660;</m:mo>
 <m:mfenced separators=""><m:msup><m:mi>L</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mi>A</m:mi><m:msup><m:mi>L</m:mi><m:mrow><m:mo>-</m:mo><m:mi mathvariant="normal">T</m:mi></m:mrow></m:msup></m:mfenced>
 <m:mfenced separators=""><m:msup><m:mi>L</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>z</m:mi></m:mfenced>
 <m:mo>=</m:mo>
 <m:mi>&#955;</m:mi><m:mfenced separators=""><m:msup><m:mi>L</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>z</m:mi></m:mfenced>
 <m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

Hence the eigenvalues of <m:math><m:mi>A</m:mi><m:mi>z</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi><m:mi>z</m:mi></m:math>&#160;are those of <m:math><m:mi>C</m:mi><m:mi>y</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>y</m:mi></m:math>, where <m:math><m:mi>C</m:mi></m:math>&#160;is the symmetric matrix <m:math>
 <m:mi>C</m:mi>
 <m:mo>=</m:mo>
 <m:msup><m:mi>L</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup>
 <m:mi>A</m:mi><m:msup><m:mi>L</m:mi><m:mrow><m:mo>-</m:mo><m:mi mathvariant="normal">T</m:mi></m:mrow></m:msup>
</m:math>&#160;and <m:math><m:mi>y</m:mi><m:mo>=</m:mo><m:msup><m:mi>L</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>z</m:mi></m:math>. The standard symmetric eigenproblem <m:math><m:mi>C</m:mi><m:mi>y</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>y</m:mi></m:math>&#160;may be solved by the methods described in <a class="sec" href="#background11">Section 2.1.1</a>. The eigenvectors <m:math><m:mi>z</m:mi></m:math>&#160;of the original problem may be recovered by computing <m:math>
 <m:mi>z</m:mi>
 <m:mo>=</m:mo>
 <m:msup><m:mi>L</m:mi><m:mrow><m:mo>-</m:mo><m:mi mathvariant="normal">T</m:mi></m:mrow></m:msup>
 <m:mi>y</m:mi>
</m:math>.</div><div class="paramtext">Most of the routines which solve this class of problems can also solve the closely related problems

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:mi>B</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>x</m:mi><m:mtext>&#8195; or &#8195;</m:mtext><m:mi>B</m:mi><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>x</m:mi>
</m:math></td><td class="formula2"/></tr></table></div>

where again <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;are symmetric and <m:math><m:mi>B</m:mi></m:math>&#160;is positive definite. See the routine documents for details.</div><div class="paramtext">All the above remarks also apply &#8211; with the obvious changes &#8211; to the case when <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;are complex Hermitian matrices. Such problems are called <span class="italic">Hermitian-definite</span>. The eigenvectors are complex, but the eigenvalues are all real.</div><div class="paramtext">If <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;are large and sparse, reduction to an equivalent standard eigenproblem as described above would almost certainly result in a large dense matrix <m:math><m:mi>C</m:mi></m:math>, and hence would be very wasteful in both storage and computing time. The methods of subspace iteration and Lanczos type methods, mentioned in <a class="sec" href="#background11">Section 2.1.1</a>, can also be used for large sparse generalized symmetric-definite problems.</div><h4 class="standard"><a class="sec" name="background32" id="background32"/>2.3.2&#160;&#160;Generalized nonsymmetric eigenvalue problems</h4>
<div class="paramtext">Any generalized eigenproblem which is not symmetric-definite with well-conditioned <m:math><m:mi>B</m:mi></m:math>&#160;must be handled as if it were a general nonsymmetric problem.</div><div class="paramtext">If <m:math><m:mi>B</m:mi></m:math>&#160;is singular, the problem has infinite eigenvalues. These are not a problem; they are equivalent to zero eigenvalues of the problem <m:math><m:mi>B</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#956;</m:mi><m:mi>A</m:mi><m:mi>x</m:mi></m:math>. Computationally they appear as very large values.</div><div class="paramtext">If <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;are both singular and have a common null space, then <m:math><m:mi>A</m:mi><m:mo>-</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi></m:math>&#160;is singular for all <m:math><m:mi>&#955;</m:mi></m:math>; in other words, any value <m:math><m:mi>&#955;</m:mi></m:math>&#160;can be regarded as an eigenvalue. Pencils with this property are called <span class="italic">singular</span>.</div><div class="paramtext">As with standard nonsymmetric problems, a real problem may have complex eigenvalues, occurring as complex conjugate pairs.</div><div class="paramtext">The generalized eigenvalue problem can be solved via the <span class="italic">generalized Schur factorization</span> of <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:mo>=</m:mo><m:mi>Q</m:mi><m:mi>U</m:mi><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mtext>, &#8195;</m:mtext><m:mi>B</m:mi><m:mo>=</m:mo><m:mi>Q</m:mi><m:mi>V</m:mi><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:mi>Q</m:mi></m:math>&#160;and <m:math><m:mi>Z</m:mi></m:math>&#160;are orthogonal, <m:math><m:mi>V</m:mi></m:math>&#160;is upper triangular, and <m:math><m:mi>U</m:mi></m:math>&#160;is upper quasi-triangular (defined just as in <a class="sec" href="#background12">Section 2.1.2</a>).</div><div class="paramtext">If all the eigenvalues are real, then <m:math><m:mi>U</m:mi></m:math>&#160;is upper triangular; the eigenvalues are given by <m:math><m:msub><m:mi>&#955;</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>u</m:mi><m:mrow><m:mi>i</m:mi><m:mi>i</m:mi></m:mrow></m:msub><m:mo>/</m:mo><m:msub><m:mi>v</m:mi><m:mrow><m:mi>i</m:mi><m:mi>i</m:mi></m:mrow></m:msub></m:math>. If there are complex conjugate pairs of eigenvalues, then <m:math><m:mi>U</m:mi></m:math>&#160;has <m:math><m:mn>2</m:mn></m:math>&#160;by <m:math><m:mn>2</m:mn></m:math>&#160;diagonal blocks.</div><div class="paramtext">Eigenvalues and eigenvectors of a generalized nonsymmetric problem may be ill-conditioned; that is, sensitive to perturbations in <m:math><m:mi>A</m:mi></m:math>&#160;or <m:math><m:mi>B</m:mi></m:math>.</div><div class="paramtext">Particular care must be taken if, for some <m:math><m:mi>i</m:mi></m:math>, <m:math><m:msub><m:mi>u</m:mi><m:mrow><m:mi>i</m:mi><m:mi>i</m:mi></m:mrow></m:msub><m:mo>=</m:mo><m:msub><m:mi>v</m:mi><m:mrow><m:mi>i</m:mi><m:mi>i</m:mi></m:mrow></m:msub><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, or in practical terms if <m:math><m:msub><m:mi>u</m:mi><m:mrow><m:mi>i</m:mi><m:mi>i</m:mi></m:mrow></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>v</m:mi><m:mrow><m:mi>i</m:mi><m:mi>i</m:mi></m:mrow></m:msub></m:math>&#160;are both small; this means that the pencil is singular, or approximately so. Not only is the particular value <m:math><m:msub><m:mi>&#955;</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;undetermined, but also <b>no reliance</b> can be placed on <b>any</b> of the computed eigenvalues. See also the routine documents.</div><div class="paramtext">Computation of eigenvalues and eigenvectors proceeds in the following stages.
<ol class="listnumber"><li class="listnumber">The pencil <m:math><m:mi>A</m:mi><m:mo>-</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi></m:math>&#160;is reduced by an orthogonal transformation to a pencil <m:math><m:mi>H</m:mi><m:mo>-</m:mo><m:mi>&#955;</m:mi><m:mi>K</m:mi></m:math>&#160;in which <m:math><m:mi>H</m:mi></m:math>&#160;is upper Hessenberg and <m:math><m:mi>K</m:mi></m:math>&#160;is upper triangular: <m:math>
 <m:mi>A</m:mi>
 <m:mo>=</m:mo>
 <m:msub><m:mi>Q</m:mi><m:mn>1</m:mn></m:msub>
 <m:mi>H</m:mi>
 <m:msubsup><m:mi>Z</m:mi><m:mn>1</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup>
</m:math>&#160;and <m:math>
 <m:mi>B</m:mi>
<m:mo>=</m:mo>
 <m:msub><m:mi>Q</m:mi><m:mn>1</m:mn></m:msub>
 <m:mi>K</m:mi>
 <m:msubsup><m:mi>Z</m:mi><m:mn>1</m:mn><m:mi mathvariant="normal">T</m:mi></m:msubsup>
</m:math>. The pencil <m:math><m:mi>H</m:mi><m:mo>-</m:mo><m:mi>&#955;</m:mi><m:mi>K</m:mi></m:math>&#160;has the same eigenvalues as <m:math><m:mi>A</m:mi><m:mo>-</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi></m:math>, and is easier to handle.</li><li class="listnumber">The upper Hessenberg matrix <m:math><m:mi>H</m:mi></m:math>&#160;is reduced to upper quasi-triangular form, while <m:math><m:mi>K</m:mi></m:math>&#160;is maintained in upper triangular form, using the <m:math><m:mi>Q</m:mi><m:mi>Z</m:mi></m:math>&#160;algorithm. This gives the generalized Schur factorization: <m:math><m:mi>H</m:mi><m:mo>=</m:mo><m:msub><m:mi>Q</m:mi><m:mn>2</m:mn></m:msub><m:mi>U</m:mi><m:msub><m:mi>Z</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;and <m:math><m:mi>K</m:mi><m:mo>=</m:mo><m:msub><m:mi>Q</m:mi><m:mn>2</m:mn></m:msub><m:mi>V</m:mi><m:msub><m:mi>Z</m:mi><m:mn>2</m:mn></m:msub></m:math>.</li><li class="listnumber">Eigenvectors of the pencil <m:math><m:mi>U</m:mi><m:mo>-</m:mo><m:mi>&#955;</m:mi><m:mi>V</m:mi></m:math>&#160;are computed (if required) by back-substitution, and pre-multiplied by <m:math><m:msub><m:mi>Z</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>Z</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;to give eigenvectors of <m:math><m:mi>A</m:mi></m:math>.</li></ol>
</div><div class="paramtext">All the above remarks also apply &#8211; with the obvious changes &#8211; to the case when <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;are complex matrices. The eigenvalues are in general complex, so there is no need for special treatment of complex conjugate pairs, and the matrix <m:math><m:mi>U</m:mi></m:math>&#160;in the generalized Schur factorization is simply a complex upper triangular matrix.</div><div class="paramtext">As for the generalized symmetric-definite eigenvalue problem, if <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;are large and sparse then it is generally preferable to use an alternative method.  <a class="chap" href="../F12/f12conts.xml">Chapter F12</a> provides routines based on Arnoldi's method for both real and complex matrices, intended to find a subset of the eigenvalues and vectors.</div><h2 class="standard"><a class="sec" name="available" id="available"/>3&#160;&#160;Recommendations on Choice and Use of Available Routines</h2><h3 class="standard"><a class="sec" name="recomm_1" id="recomm_1"/>3.1&#160;&#160;Black Box Routines and General Purpose Routines</h3>
<div class="paramtext">Routines in the NAG Library for solving eigenvalue problems fall into two categories.
<ol class="listnumber"><li class="listnumber"><b>Black Box Routines</b>: these are designed to solve a standard type of problem in a single call &#8211; for example, to compute all the eigenvalues and eigenvectors of a real symmetric matrix. You are recommended to use a black box routine if there is one to meet your needs; refer to the decision tree in <a class="sec" href="#dtrees1">Section 4.1</a> or the index in <a class="sec" href="#index">Section 5</a>.</li><li class="listnumber"><b>General Purpose Routines</b>: these perform the computational subtasks which make up the separate stages of the overall task, as described in <a class="sec" href="#background">Section 2</a> &#8211; for example, reducing a real symmetric matrix to tridiagonal form. General purpose routines are to be found, for historical reasons, some in this chapter, a few in <a class="chap" href="../F01/f01conts.xml">Chapter F01</a>, but most in <a class="chap" href="../F08/f08conts.xml">Chapter F08</a>. If there is no black box routine that meets your needs, you will need to use one or more general purpose routines.</li></ol>
</div><div class="paramtext">The decision trees in <a class="sec" href="#dtrees2">Section 4.2</a> list the combinations of general purpose routines which are needed to solve many common types of problem.</div><div class="paramtext">Sometimes a combination of a black box routine and one or more general purpose routines will be the most convenient way to solve your problem: the black box routine can be used to compute most of the results, and a general purpose routine can be used to perform a subsidiary computation, such as computing condition numbers of eigenvalues and eigenvectors.</div><h3 class="standard"><a class="sec" name="recomm_2" id="recomm_2"/>3.2&#160;&#160;Computing Selected Eigenvalues and Eigenvectors</h3>
<div class="paramtext">The decision trees and the routine documents make a distinction between routines which compute <span class="italic">all</span> eigenvalues or eigenvectors, and routines which compute <span class="italic">selected</span> eigenvalues or eigenvectors; the two classes of routine use different algorithms.</div><div class="paramtext">It is difficult to give clear guidance on which of these two classes of routine to use in a particular case, especially with regard to computing eigenvectors. If you only wish to compute a very few eigenvectors, then a routine for selected eigenvectors will be more economical, but if you want to compute a substantial subset (an old rule of thumb suggested more than 25%), then it may be more economical to compute all of them. Conversely, if you wish to compute all the eigenvectors of a sufficiently large symmetric tridiagonal matrix, the routine for selected eigenvectors may be faster.</div><div class="paramtext">The choice depends on the properties of the matrix and on the computing environment; if it is critical, you should perform your own timing tests.</div><div class="paramtext">For dense nonsymmetric eigenproblems, there are no algorithms provided for computing selected eigenvalues; it is always necessary to compute all the eigenvalues, but you can then select specific eigenvectors for computation by inverse iteration.</div><h3 class="standard"><a class="sec" name="recomm_3" id="recomm_3"/>3.3&#160;&#160;Storage Schemes for Symmetric Matrices</h3>
<div class="paramtext">Routines which handle symmetric matrices are usually designed to use either the upper or lower triangle of the matrix; it is not necessary to store the whole matrix. If either the upper or lower triangle is stored conventionally in the upper or lower triangle of a two-dimensional array, the remaining elements of the array can be used to store other useful data. However, that is not always convenient, and if it is important to economize on storage, the upper or lower triangle can be stored in a one-dimensional array of length <m:math><m:mi>n</m:mi><m:mfenced separators=""><m:mi>n</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>/</m:mo><m:mn>2</m:mn></m:math>; in other words, the storage is almost halved. This storage format is referred to as <span class="italic">packed storage</span>.</div><div class="paramtext">Routines designed for packed storage are usually less efficient, especially on high-performance computers, so there is a trade-off between storage and efficiency.</div><div class="paramtext">A <span class="italic">band</span> matrix is one whose nonzero elements are confined to a relatively small number of subdiagonals or superdiagonals on either side of the main diagonal. Algorithms can take advantage of bandedness to reduce the amount of work and storage required.</div><div class="paramtext">Routines which take advantage of packed storage or bandedness are provided for both standard symmetric eigenproblems and generalized symmetric-definite eigenproblems.</div><h3 class="standard"><a class="sec" name="recomm_4" id="recomm_4"/>3.4&#160;&#160;Balancing for Nonsymmmetric Eigenproblems</h3>
<div class="paramtext">There are two preprocessing steps which one may perform on a nonsymmetric matrix <m:math><m:mi>A</m:mi></m:math>&#160;in order to make its eigenproblem easier. Together they are referred to as <span class="italic">balancing</span>.</div><ol class="listnumber"><li class="listnumber"><b>Permutation</b>: this involves reordering the rows and columns to make <m:math><m:mi>A</m:mi></m:math>&#160;more nearly upper triangular (and thus closer to Schur form): <m:math><m:msup><m:mi>A</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mo>=</m:mo><m:mi>P</m:mi><m:mi>A</m:mi><m:msup><m:mi>P</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>, where <m:math><m:mi>P</m:mi></m:math>&#160;is a permutation matrix. If <m:math><m:mi>A</m:mi></m:math>&#160;has a significant number of zero elements, this preliminary permutation can reduce the amount of work required, and also improve the accuracy of the computed eigenvalues. In the extreme case, if <m:math><m:mi>A</m:mi></m:math>&#160;is permutable to upper triangular form, then no floating point operations are needed to reduce it to Schur form.</li><li class="listnumber"><b>Scaling</b>: a diagonal matrix <m:math><m:mi>D</m:mi></m:math>&#160;is used to make the rows and columns of <m:math><m:msup><m:mi>A</m:mi><m:mo>&#8242;</m:mo></m:msup></m:math>&#160;more nearly equal in norm: <m:math><m:msup><m:mi>A</m:mi><m:mrow><m:mo>&#8242;</m:mo><m:mo>&#8242;</m:mo></m:mrow></m:msup><m:mo>=</m:mo><m:mi>D</m:mi><m:msup><m:mi>A</m:mi><m:mo>&#8242;</m:mo></m:msup><m:msup><m:mi>D</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup></m:math>. Scaling can make the matrix norm smaller with respect to the eigenvalues, and so possibly reduce the inaccuracy contributed by roundoff (see Chapter II/11 of <a class="ref" href="#ref103">Wilkinson and Reinsch (1971)</a>).</li></ol><div class="paramtext">Routines are provided in <a class="chap" href="../F08/f08conts.xml">Chapter F08</a> for performing either or both of these preprocessing steps, and also for transforming computed eigenvectors or Schur vectors back to those of the original matrix.</div><div class="paramtext">The black box routines in this chapter which compute eigenvectors perform both forms of balancing.</div><h3 class="standard"><a class="sec" name="recomm_5" id="recomm_5"/>3.5&#160;&#160;Non-uniqueness of Eigenvectors and Singular Vectors</h3>
<div class="paramtext">Eigenvectors, as defined by equations <a class="eqn" href="#eqn1">(1)</a> or <a class="eqn" href="#eqn4">(4)</a>, are <span class="italic">not uniquely defined</span>. If <m:math><m:mi>x</m:mi></m:math>&#160;is an eigenvector, then so is <m:math><m:mi>k</m:mi><m:mi>x</m:mi></m:math>&#160;where <m:math><m:mi>k</m:mi></m:math>&#160;is any nonzero scalar. Eigenvectors computed by different algorithms, or on different computers, may appear to disagree completely, though in fact they differ only by a scalar factor (which may be complex). These differences should not be significant in any application in which the eigenvectors will be used, but they can arouse uncertainty about the correctness of computed results.</div><div class="paramtext">Even if eigenvectors <m:math><m:mi>x</m:mi></m:math>&#160;are normalized so that <m:math><m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>x</m:mi></m:mfenced><m:mn>2</m:mn></m:msub><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, this is not sufficient to fix them uniquely, since they can still be multiplied by a scalar factor <m:math><m:mi>k</m:mi></m:math>&#160;such that <m:math><m:mfenced open="|" close="|" separators=""><m:mi>k</m:mi></m:mfenced><m:mo>=</m:mo><m:mn>1</m:mn></m:math>. To counteract this inconvenience, most of the routines in this chapter, and in <a class="chap" href="../F08/f08conts.xml">Chapter F08</a>, normalize eigenvectors (and Schur vectors) so that <m:math><m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>x</m:mi></m:mfenced><m:mn>2</m:mn></m:msub><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;<span class="italic">and</span> the component of <m:math><m:mi>x</m:mi></m:math>&#160;with largest absolute value is real and positive. (There is still a possible indeterminacy if there are two components of equal largest absolute value &#8211; or in practice if they are very close &#8211; but this is rare.)</div><div class="paramtext">In symmetric problems the computed eigenvalues are sorted into ascending order, but in nonsymmetric problems the order in which the computed eigenvalues are returned is dependent on the detailed working of the algorithm and may be sensitive to rounding errors. The Schur form and Schur vectors depend on the ordering of the eigenvalues and this is another possible cause of non-uniqueness when they are computed. However, it must be stressed again that variations in the results from this cause should not be significant. (Routines in <a class="chap" href="../F08/f08conts.xml">Chapter F08</a> can be used to transform the Schur form and Schur vectors so that the eigenvalues appear in any given order if this is important.)</div><div class="paramtext">In singular value problems, the left and right singular vectors <m:math><m:mi>u</m:mi></m:math>&#160;and <m:math><m:mi>v</m:mi></m:math>&#160;which correspond to a singular value <m:math><m:mi>&#963;</m:mi></m:math>&#160;cannot be normalized independently: if <m:math><m:mi>u</m:mi></m:math>&#160;is multiplied by a factor <m:math><m:mi>k</m:mi></m:math>&#160;such that <m:math><m:mfenced open="|" close="|" separators=""><m:mi>k</m:mi></m:mfenced><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, then <m:math><m:mi>v</m:mi></m:math>&#160;must also be multiplied by <m:math><m:mi>k</m:mi></m:math>.</div><div class="paramtext">Non-uniqueness also occurs among eigenvectors which correspond to a multiple eigenvalue, or among singular vectors which correspond to a multiple singular value. In practice, this is more likely to be apparent as the extreme sensitivity of eigenvectors which correspond to a cluster of close eigenvalues (or of singular vectors which correspond to a cluster of close singular values).</div><h2 class="standard"><a class="sec" name="dtree" id="dtree"/>4&#160;&#160;Decision Trees</h2><h3 class="standard"><a class="sec" name="dtrees1" id="dtrees1"/>4.1&#160;&#160;Black Box Routines</h3>
<div class="paramtext">The decision tree for this section is divided into three sub-trees.
<ul class="listind"><li class="listind"><a class="dtree" href="#tree1">Tree 1 Eigenvalues and Eigenvectors of Real Matrices
</a></li><li class="listind"><a class="dtree" href="#tree2">Tree 2 Eigenvalues and Eigenvectors of Complex Matrices
</a></li><li class="listind"><a class="dtree" href="#tree3">Tree 3 Singular Values and Singular Vectors
</a></li></ul>
</div><div class="paramtext"><b>Note:</b> for the <a class="chap" href="../F08/f08conts.xml">Chapter F08</a> routines there is generally a choice of simple and comprehensive routine.  The comprehensive routines return additional information such as condition and/or error estimates.</div><h3 class="sec"><a name="tree1" id="tree1"/>Tree 1: Eigenvalues and Eigenvectors of Real Matrices
</h3>
<table class="dtree">
<tr>
<td class="dtentry">Is this a sparse eigenproblem <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>x</m:mi></m:math>&#160;or <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi><m:mi>x</m:mi></m:math>?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is the problem symmetric?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F02/f02fjf.xml">F02FJF</a> or <a class="chap" href="../F12/f12conts.xml">Chapter F12</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="chap" href="../F12/f12conts.xml">Chapter F12</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Is the eigenproblem <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi><m:mi>x</m:mi></m:math>?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Are <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;symmetric with <m:math><m:mi>B</m:mi></m:math>&#160;positive definite and well-conditioned w.r.t inversion?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Are <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;band matrices?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08uaf.xml">F08UAF</a> or <a class="rout" href="../F08/f08ubf.xml">F08UBF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/><td class="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../F08/f08saf.xml">F08SAF</a> or <a class="rout" href="../F08/f08sbf.xml">F08SBF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is the generalized Schur factorization required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08xaf.xml">F08XAF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../F08/f08waf.xml">F08WAF</a> or <a class="rout" href="../F08/f08wbf.xml">F08WBF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">The eigenproblem is <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>x</m:mi></m:math>. Is <m:math><m:mi>A</m:mi></m:math>&#160;symmetric?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Are all eigenvalues or all eigenvectors required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08faf.xml">F08FAF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../F08/f08fbf.xml">F08FBF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Are eigenvalues only required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08naf.xml">F08NAF</a> or <a class="rout" href="../F08/f08nbf.xml">F08NBF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Is the Schur factorization required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08paf.xml">F08PAF</a> or <a class="rout" href="../F08/f08pbf.xml">F08PBF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Are all eigenvectors required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08naf.xml">F08NAF</a> or <a class="rout" href="../F08/f08nbf.xml">F08NBF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry"><a class="rout" href="../F02/f02ecf.xml">F02ECF</a></td></tr></table><h3 class="sec"><a name="tree2" id="tree2"/>Tree 2: Eigenvalues and Eigenvectors of Complex Matrices
</h3>
<table class="dtree">
<tr>
<td class="dtentry">Is this a sparse eigenproblem <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>x</m:mi></m:math>&#160;or <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi><m:mi>x</m:mi></m:math>?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="chap" href="../F12/f12conts.xml">Chapter F12</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Is the eigenproblem <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>B</m:mi><m:mi>x</m:mi></m:math>?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Are <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;Hermitian with <m:math><m:mi>B</m:mi></m:math>&#160;positive definite and well-conditioned w.r.t. inversion?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08unf.xml">F08UNF</a> or <a class="rout" href="../F08/f08upf.xml">F08UPF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry">Is the generalized Schur factorization required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08xnf.xml">F08XNF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../F08/f08wnf.xml">F08WNF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">The eigenproblem is <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>&#955;</m:mi><m:mi>x</m:mi></m:math>. Is <m:math><m:mi>A</m:mi></m:math>&#160;Hermitian?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Are all eigenvalues and eigenvectors required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08fnf.xml">F08FNF</a> or <a class="rout" href="../F08/f08fpf.xml">F08FPF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../F08/f08fpf.xml">F08FPF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Are eigenvalues only required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08nnf.xml">F08NNF</a> or <a class="rout" href="../F08/f08npf.xml">F08NPF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Is the Schur factorization required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08pnf.xml">F08PNF</a> or <a class="rout" href="../F08/f08ppf.xml">F08PPF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Are all eigenvectors required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08nnf.xml">F08NNF</a> or <a class="rout" href="../F08/f08npf.xml">F08NPF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry"><a class="rout" href="../F02/f02gcf.xml">F02GCF</a></td></tr></table><h3 class="sec"><a name="tree3" id="tree3"/>Tree 3: Singular Values and Singular Vectors
</h3>
<table class="dtree">
<tr>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;a complex matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;upper triangular?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F02/f02xuf.xml">F02XUF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr><td class="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../F08/f08kpf.xml">F08KPF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;upper triangular?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F02/f02wuf.xml">F02WUF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Are only the leading terms required?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F02/f02wgf.xml">F02WGF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry"><a class="rout" href="../F08/f08kbf.xml">F08KBF</a></td></tr></table><h3 class="standard"><a class="sec" name="dtrees2" id="dtrees2"/>4.2&#160;&#160;General Purpose Routines (Eigenvalues and Eigenvectors)</h3>
<div class="paramtext">Routines for large sparse eigenvalue problems are to be found in <a class="chap" href="../F12/f12conts.xml">Chapter F12</a>, see the <a class="chapint" href="../F12/f12intro.xml">F12 Chapter Introduction</a>.</div><div class="paramtext">The decision tree for this section addressing dense problems, is divided into eight sub-trees:
<ul class="listind"><li class="listind"><a class="dtree" href="../F08/f08intro.xml#tree1">Tree 1 Real Symmetric Eigenvalue Problems
</a> in  the F08 Chapter Introduction</li><li class="listind"><a class="dtree" href="../F08/f08intro.xml#tree2">Tree 2 Real Generalized Symmetric-definite Eigenvalue Problems
</a> in  the F08 Chapter Introduction</li><li class="listind"><a class="dtree" href="../F08/f08intro.xml#tree3">Tree 3 Real Nonsymmetric Eigenvalue Problems
</a> in  the F08 Chapter Introduction</li><li class="listind"><a class="dtree" href="../F08/f08intro.xml#tree4">Tree 4 Real Generalized Nonsymmetric Eigenvalue Problems
</a> in  the F08 Chapter Introduction</li><li class="listind"><a class="dtree" href="../F08/f08intro.xml#tree5">Tree 5 Complex Hermitian Eigenvalue Problems
</a> in  the F08 Chapter Introduction</li><li class="listind"><a class="dtree" href="../F08/f08intro.xml#tree6">Tree 6 Complex Generalized Hermitian-definite Eigenvalue Problems
</a> in  the F08 Chapter Introduction</li><li class="listind"><a class="dtree" href="../F08/f08intro.xml#tree7">Tree 7 Complex non-Hermitian Eigenvalue Problems
</a> in  the F08 Chapter Introduction</li><li class="listind"><a class="dtree" href="../F08/f08intro.xml#tree8">Tree 8 Complex Generalized non-Hermitian Eigenvalue Problems
</a> in  the F08 Chapter Introduction</li></ul>
</div><div class="paramtext">As it is very unlikely that one of the routines in this section will be called on its own, the other routines required to solve a given problem are listed in the order in which they should be called.</div><h3 class="standard"><a class="sec" name="dtrees3" id="dtrees3"/>4.3&#160;&#160;General Purpose Routines (Singular Value Decomposition)</h3>
<div class="paramtext">See <a class="sec" href="../F08/f08intro.xml#dtree2">Section 4.2</a> in  the F08 Chapter Introduction.  For real sparse matrices where only selected singular values are required (possibly with their singular vectors), routines from <a class="chap" href="../F12/f12conts.xml">Chapter F12</a> may be applied to the symmetric matrix <m:math><m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>A</m:mi></m:math>; see <a class="sec" href="../F12/f12fbf.xml#example">Section 9</a> in F12FBF.</div><h2 class="standard"><a class="sec" name="index" id="index"/>5&#160;&#160;Functionality Index</h2>
<div>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>Black&#160;Box&#160;routines,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;complex&#160;eigenproblem,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;selected&#160;eigenvalues&#160;and&#160;eigenvectors</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../F02/f02gcf.xml">F02GCF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;complex&#160;upper&#160;triangular&#160;matrix,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;singular&#160;values&#160;and,&#160;optionally,&#160;left&#160;and/or&#160;right&#160;singular&#160;vectors</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../F02/f02xuf.xml">F02XUF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;generalized&#160;real&#160;sparse&#160;symmetric-definite&#160;eigenproblem,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;selected&#160;eigenvalues&#160;and&#160;eigenvectors</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../F02/f02fjf.xml">F02FJF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;real&#160;eigenproblem,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;selected&#160;eigenvalues&#160;and&#160;eigenvectors</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../F02/f02ecf.xml">F02ECF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;real&#160;sparse&#160;symmetric&#160;matrix,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;selected&#160;eigenvalues&#160;and&#160;eigenvectors</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../F02/f02fjf.xml">F02FJF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;real&#160;upper&#160;triangular&#160;matrix,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;singular&#160;values&#160;and,&#160;optionally,&#160;left&#160;and/or&#160;right&#160;singular&#160;vectors</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../F02/f02wuf.xml">F02WUF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>General&#160;Purpose&#160;routines&#160;(see&#160;also&#160;<a class="chap" href="../F08/f08conts.xml">Chapter&#160;F08</a>),</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;real&#160;band&#160;matrix,&#160;selected&#160;eigenvector,&#160;<span><i>A</i>&#160;&#8722;&#160;<i>&#955;</i><i>B</i></span></nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../F02/f02sdf.xml">F02SDF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;real&#160;<span><i>m</i></span>&#160;by <span><i>n</i></span>&#160;matrix <span><span>(<i>m</i><span>&#160;&#8805;&#160;</span><i>n</i>)</span></span>, <span><i>Q</i><i>R</i></span>&#160;factorization and SVD</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../F02/f02wdf.xml">F02WDF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>General&#160;Purpose&#160;routines&#160;(see&#160;also&#160;<a class="chap" href="../F12/f12conts.xml">Chapter&#160;F12</a>),</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;real&#160;<span><i>m</i></span>&#160;by <span><i>n</i></span>&#160;matrix, leading terms SVD</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../F02/f02wgf.xml">F02WGF</a></nobr></td></tr></table></div><h2 class="standard"><a class="sec" name="auxindex" id="auxindex"/>6&#160;&#160;Auxiliary Routines Associated with Library Routine Parameters</h2>
<div class="tablediv"><table class="wdrn"><tbody><tr><td class="libdoc" valign="top" align="left">F02FJZ</td><td class="libdoc" valign="top" align="left">nagf_eigen_real_symm_sparse_eigsys_dummy_monit<br/>See the description of the argument 
    MONIT in <a class="rout" href="../F02/f02fjf.xml">F02FJF</a>.</td></tr></tbody></table></div><h2 class="standard"><a class="sec" name="withdrawn" id="withdrawn"/>7&#160;&#160;Routines Withdrawn or Scheduled for Withdrawal</h2>
<div class="left-tablediv"><table class="wdrn"><tbody>
<tr><td class="libdoc" valign="top"><b>Withdrawn<br/>Routine</b></td><td class="libdoc" valign="top" align="center"><b>Mark of<br/>Withdrawal</b></td><td class="libdoc" valign="top"><br/><b>Replacement Routine(s)</b></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02AAF">F02AAF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08faf.xml">F08FAF (DSYEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02ABF">F02ABF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08faf.xml">F08FAF (DSYEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02ADF">F02ADF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08saf.xml">F08SAF (DSYGV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02AEF">F02AEF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08saf.xml">F08SAF (DSYGV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02AFF">F02AFF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08naf.xml">F08NAF (DGEEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02AGF">F02AGF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08naf.xml">F08NAF (DGEEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02AJF">F02AJF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08nnf.xml">F08NNF (ZGEEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02AKF">F02AKF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08nnf.xml">F08NNF (ZGEEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02AMF">F02AMF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08jef.xml">F08JEF (DSTEQR)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02ANF">F02ANF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08psf.xml">F08PSF (ZHSEQR)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02APF">F02APF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08pef.xml">F08PEF (DHSEQR)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02AQF">F02AQF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08pef.xml">F08PEF (DHSEQR)</a> and <a class="rout" href="../F08/f08qkf.xml">F08QKF (DTREVC)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02ARF">F02ARF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08psf.xml">F08PSF (ZHSEQR)</a> and <a class="rout" href="../F08/f08qxf.xml">F08QXF (ZTREVC)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02AVF">F02AVF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08jff.xml">F08JFF (DSTERF)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02AWF">F02AWF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08fnf.xml">F08FNF (ZHEEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02AXF">F02AXF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08fnf.xml">F08FNF (ZHEEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02AYF">F02AYF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08jsf.xml">F08JSF (ZSTEQR)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02BBF">F02BBF</a></td><td class="libdoc" valign="top" align="center">19</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08fbf.xml">F08FBF (DSYEVX)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02BCF">F02BCF</a></td><td class="libdoc" valign="top" align="center">19</td><td class="libdoc" valign="top"><a class="rout" href="../F02/f02ecf.xml">F02ECF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02BDF">F02BDF</a></td><td class="libdoc" valign="top" align="center">19</td><td class="libdoc" valign="top"><a class="rout" href="../F02/f02gcf.xml">F02GCF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02BEF">F02BEF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08jjf.xml">F08JJF (DSTEBZ)</a> and <a class="rout" href="../F08/f08jkf.xml">F08JKF (DSTEIN)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02BFF">F02BFF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08jjf.xml">F08JJF (DSTEBZ)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02BJF">F02BJF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08waf.xml">F08WAF (DGGEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02BKF">F02BKF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08pkf.xml">F08PKF (DHSEIN)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02BLF">F02BLF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08pxf.xml">F08PXF (ZHSEIN)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02EAF">F02EAF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08paf.xml">F08PAF (DGEES)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02EBF">F02EBF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08naf.xml">F08NAF (DGEEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02FAF">F02FAF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08faf.xml">F08FAF (DSYEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02FCF">F02FCF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08fbf.xml">F08FBF (DSYEVX)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02FDF">F02FDF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08saf.xml">F08SAF (DSYGV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02FHF">F02FHF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08uaf.xml">F08UAF (DSBGV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02GAF">F02GAF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08pnf.xml">F08PNF (ZGEES)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02GBF">F02GBF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08nnf.xml">F08NNF (ZGEEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02GJF">F02GJF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08wnf.xml">F08WNF (ZGGEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02HAF">F02HAF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08fnf.xml">F08FNF (ZHEEV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02HCF">F02HCF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08fpf.xml">F08FPF (ZHEEVX)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02HDF">F02HDF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08snf.xml">F08SNF (ZHEGV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02SWF">F02SWF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08kef.xml">F08KEF (DGEBRD)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02SXF">F02SXF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08kff.xml">F08KFF (DORGBR)</a> and <a class="rout" href="../F08/f08kgf.xml">F08KGF (DORMBR)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02SYF">F02SYF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08mef.xml">F08MEF (DBDSQR)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02UWF">F02UWF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08ksf.xml">F08KSF (ZGEBRD)</a>, <a class="rout" href="../F06/f06tff.xml">F06TFF</a>, <a class="rout" href="../F08/f08ktf.xml">F08KTF (ZUNGBR)</a> and <a class="rout" href="../F08/f08kuf.xml">F08KUF (ZUNMBR)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02UXF">F02UXF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08ktf.xml">F08KTF (ZUNGBR)</a> or <a class="rout" href="../F08/f08kuf.xml">F08KUF (ZUNMBR)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02UYF">F02UYF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08msf.xml">F08MSF (ZBDSQR)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02WAF">F02WAF</a></td><td class="libdoc" valign="top" align="center">16</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08kbf.xml">F08KBF (DGESVD)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02WEF">F02WEF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08kbf.xml">F08KBF (DGESVD)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F02XEF">F02XEF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08kpf.xml">F08KPF (ZGESVD)</a></td></tr></tbody></table></div><h2 class="standard"><a class="sec" name="references" id="references"/>8&#160;&#160;References</h2><div class="paramtext"><a name="ref562" id="ref562"/>Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999)  <i>LAPACK Users' Guide</i> (3rd Edition) SIAM, Philadelphia </div>
<div class="paramtext"><a name="ref105" id="ref105"/>Golub G H and Van Loan C F (1996)  <i>Matrix Computations</i> (3rd Edition) Johns Hopkins University Press, Baltimore </div>
<div class="paramtext"><a name="ref111" id="ref111"/>Parlett B N (1998)  <i>The Symmetric Eigenvalue Problem</i> SIAM, Philadelphia </div>
<div class="paramtext"><a name="ref103" id="ref103"/>Wilkinson J H and Reinsch C (1971)  <i>Handbook for Automatic Computation II, Linear Algebra</i> Springer&#8211;Verlag </div><hr/><div><a class="chap" href="f02conts.xml">F02 Chapter Contents</a></div><div><a class="chapint" href="../../pdf/F02/f02intro.pdf">F02 Chapter Introduction (PDF version)</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div>
<div><hr/><a class="genint" href="../FRONTMATTER/copyright.xml">&#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2011</a></div></body></html>