<?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>F04 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="f04conts.xml">F04 Chapter Contents</a></div><div><a class="chapint" href="../../pdf/F04/f04intro.pdf">F04 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/>F04 &#8211; Simultaneous Linear Equations</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="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background1">2.1&#160;&#160;<b>Unique Solution of Ax=b</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background2">2.2&#160;&#160;<b>The Least Squares Solution of Ax&#8771;b, m&gt;n, A=n</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background3">2.3&#160;&#160;<b>Rank-deficient Cases</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background4">2.4&#160;&#160;<b>The Rank of a Matrix</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background5">2.5&#160;&#160;<b>Generalized Linear Least Squares Problems</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background6">2.6&#160;&#160;<b>Calculating the Inverse of a Matrix</b></a>
</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 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>Systems of Linear Equations</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#recomm_3">3.3&#160;&#160;<b>Linear Least Squares Problems</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#recomm_4">3.4&#160;&#160;<b>Sparse Matrix Routines</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#dtree">4&#160;&#160;<b>Decision Trees</b></a>
</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 is concerned with the solution of the matrix equation <m:math><m:mi>A</m:mi><m:mi>X</m:mi><m:mo>=</m:mo><m:mi>B</m:mi></m:math>, where <m:math><m:mi>B</m:mi></m:math>&#160;may be a single vector or a matrix of multiple right-hand sides.  The matrix <m:math><m:mi>A</m:mi></m:math>&#160;may be real, complex, symmetric, Hermitian, positive definite, positive definite Toeplitz or banded.  It may also be rectangular, in which case a least squares solution is obtained.</div><div class="paramtext">For a general introduction to sparse systems of equations,  see the <a class="chapint" href="../F11/f11intro.xml">F11 Chapter Introduction</a>, which
currently
provides routines for large sparse systems.
Some routines for sparse problems are also included in this chapter; they are described in <a class="sec" href="#recomm_4">Section 3.4</a>.
</div><h2 class="standard"><a class="sec" name="background" id="background"/>2&#160;&#160;Background to the Problems</h2>
<div class="paramtext">A set of linear equations may be written in the form

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>b</m:mi>
</m:math></td><td class="formula2"/></tr></table></div>

where the known matrix <m:math><m:mi>A</m:mi></m:math>, with real or complex coefficients, is of size <m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;(<m:math><m:mi>m</m:mi></m:math>&#160;rows and  <m:math><m:mi>n</m:mi></m:math>&#160;columns), the known right-hand vector <m:math><m:mi>b</m:mi></m:math>&#160;has  <m:math><m:mi>m</m:mi></m:math>&#160;components (<m:math><m:mi>m</m:mi></m:math>&#160;rows and one column), and the required solution vector <m:math><m:mi>x</m:mi></m:math>&#160;has <m:math><m:mi>n</m:mi></m:math>&#160;components  (<m:math><m:mi>n</m:mi></m:math>&#160;rows and one column).  There may also be <m:math><m:mi>p</m:mi></m:math>&#160;vectors <m:math><m:msub><m:mi>b</m:mi><m:mi mathvariant="italic">i</m:mi></m:msub></m:math>, for <m:math><m:mi mathvariant="italic">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>p</m:mi></m:math>, on the right-hand side and the equations may then be written as

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:mi>X</m:mi><m:mo>=</m:mo><m:mi>B</m:mi><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

the required matrix <m:math><m:mi>X</m:mi></m:math>&#160;having as its <m:math><m:mi>p</m:mi></m:math>&#160;columns the solutions of <m:math><m:mi>A</m:mi><m:msub><m:mi>x</m:mi><m:mi mathvariant="italic">i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>b</m:mi><m:mi mathvariant="italic">i</m:mi></m:msub></m:math>, for <m:math><m:mi mathvariant="italic">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>p</m:mi></m:math>.  Some routines deal with the latter case, but for clarity only the case  <m:math><m:mi>p</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;is discussed here.</div><div class="paramtext">The most common problem, the determination of the unique solution of <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>b</m:mi></m:math>, occurs when <m:math><m:mi>m</m:mi><m:mo>=</m:mo><m:mi>n</m:mi></m:math>&#160;and <m:math><m:mi>A</m:mi></m:math>&#160;is not singular, that is <m:math><m:mrow><m:mi>rank</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi>n</m:mi></m:math>.  This is discussed in <a class="sec" href="#background1">Section 2.1</a> below.  The next most common problem,  discussed in <a class="sec" href="#background2">Section 2.2</a> below, is the determination of the least squares solution of <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>&#8771;</m:mo><m:mi>b</m:mi></m:math>&#160;required when  <m:math><m:mi>m</m:mi><m:mo>&gt;</m:mo><m:mi>n</m:mi></m:math>&#160;and <m:math><m:mrow><m:mi>rank</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi>n</m:mi></m:math>, i.e., the determination of the vector <m:math><m:mi>x</m:mi></m:math>&#160;which minimizes the norm of the residual vector <m:math><m:mi>r</m:mi><m:mo>=</m:mo><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mi>x</m:mi></m:math>.  All other cases are rank deficient, and they are treated in <a class="sec" href="#background3">Section 2.3</a>.</div><h3 class="standard"><a class="sec" name="background1" id="background1"/>2.1&#160;&#160;Unique Solution of <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>b</m:mi></m:math></h3>
<div class="paramtext">Most routines in this chapter solve this particular problem.  The computation starts with the triangular decomposition <m:math><m:mi>A</m:mi><m:mo>=</m:mo><m:mi>P</m:mi><m:mi>L</m:mi><m:mi>U</m:mi></m:math>,  where <m:math><m:mi>L</m:mi></m:math>&#160;and <m:math><m:mi>U</m:mi></m:math>&#160;are respectively lower and upper triangular matrices and <m:math><m:mi>P</m:mi></m:math>&#160;is a permutation matrix, chosen so as to ensure that the decomposition is numerically stable.  The solution is then obtained by solving in succession the simpler equations

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable columnalign="left center left">
 <m:mtr>
  <m:mtd><m:mi>L</m:mi><m:mi>y</m:mi></m:mtd>
  <m:mtd><m:mo>=</m:mo></m:mtd>
  <m:mtd><m:msup><m:mi>P</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>b</m:mi></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd><m:mi>U</m:mi><m:mi>x</m:mi></m:mtd>
  <m:mtd><m:mo>=</m:mo></m:mtd>
  <m:mtd><m:mi>y</m:mi></m:mtd>
 </m:mtr>
</m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

the first by forward-substitution and the second by back-substitution.</div><div class="paramtext">If <m:math><m:mi>A</m:mi></m:math>&#160;is real symmetric and positive definite,  <m:math><m:mi>U</m:mi><m:mo>=</m:mo><m:msup><m:mi>L</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>, while if <m:math><m:mi>A</m:mi></m:math>&#160;is complex Hermitian and positive definite, <m:math><m:mi>U</m:mi><m:mo>=</m:mo><m:msup><m:mi>L</m:mi><m:mi mathvariant="normal">H</m:mi></m:msup></m:math>; in both these cases  <m:math><m:mi>P</m:mi></m:math>&#160;is the identity matrix (i.e., no permutations are necessary).  In all other cases either <m:math><m:mi>U</m:mi></m:math>&#160;or <m:math><m:mi>L</m:mi></m:math>&#160;has unit diagonal elements.</div><div class="paramtext">Due to rounding errors the computed &#8216;solution&#8217;
<m:math><m:msub><m:mi>x</m:mi><m:mn>0</m:mn></m:msub></m:math>, say, is only an approximation to the true solution <m:math><m:mi>x</m:mi></m:math>.  This approximation will sometimes be satisfactory, agreeing with <m:math><m:mi>x</m:mi></m:math>&#160;to several figures, but if the problem is ill-conditioned then <m:math><m:mi>x</m:mi></m:math>&#160;and <m:math><m:msub><m:mi>x</m:mi><m:mn>0</m:mn></m:msub></m:math>&#160;may have few or even no figures in common, and at this stage there is no means of estimating the &#8216;accuracy&#8217; of <m:math><m:msub><m:mi>x</m:mi><m:mn>0</m:mn></m:msub></m:math>.</div><div class="paramtext">There are three possible approaches to estimating the accuracy of a computed solution.</div><div class="paramtext">One way to do so, and to &#8216;correct&#8217;
<m:math><m:msub><m:mi>x</m:mi><m:mn>0</m:mn></m:msub></m:math>&#160;when this is meaningful (see next paragraph), involves computing the residual vector  <m:math><m:mi>r</m:mi><m:mo>=</m:mo><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:msub><m:mi>x</m:mi><m:mn>0</m:mn></m:msub></m:math>&#160;in extended precision arithmetic, and obtaining a correction vector <m:math><m:mi>d</m:mi></m:math>&#160;by solving <m:math><m:mi>P</m:mi><m:mi>L</m:mi><m:mi>U</m:mi><m:mi>d</m:mi><m:mo>=</m:mo><m:mi>r</m:mi></m:math>.  The new approximate solution <m:math><m:msub><m:mi>x</m:mi><m:mn>0</m:mn></m:msub><m:mo>+</m:mo><m:mi>d</m:mi></m:math>&#160;is usually more accurate and the correcting process is repeated until (a) further corrections are negligible or (b) they show no further decrease.</div><div class="paramtext">It must be emphasised that the &#8216;true&#8217; solution <m:math><m:mi>x</m:mi></m:math>&#160;may not be meaningful, that is correct to all figures quoted, if the elements of <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>b</m:mi></m:math>&#160;are known with certainty only to say <m:math><m:mi>p</m:mi></m:math>&#160;figures, where <m:math><m:mi>p</m:mi></m:math>&#160;is less than full precision.
The first correction vector <m:math><m:mi>d</m:mi></m:math>&#160;will then give some useful information about the number of figures in the  &#8216;solution&#8217; which probably remain unchanged with respect to maximum possible uncertainties in the coefficients.
</div><div class="paramtext">
An alternative

approach to assessing the accuracy of the solution is to compute or estimate the <b>condition number</b> 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>&#954;</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced>
 <m:mo>=</m:mo>
 <m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>A</m:mi></m:mfenced>
 <m:mo>.</m:mo>
 <m:mfenced open="&#8214;" close="&#8214;" separators=""><m:msup><m:mi>A</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup></m:mfenced>
 <m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

Roughly speaking, errors or uncertainties in <m:math><m:mi>A</m:mi></m:math>&#160;or  <m:math><m:mi>b</m:mi></m:math>&#160;may be amplified in the solution by a factor  <m:math><m:mi>&#954;</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced></m:math>.  Thus, for example, if the data in  <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>b</m:mi></m:math>&#160;are only accurate to <m:math><m:mn>5</m:mn></m:math>&#160;digits and <m:math><m:mi>&#954;</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced><m:mo>&#8776;</m:mo><m:msup><m:mn>10</m:mn><m:mn>3</m:mn></m:msup></m:math>, then the solution cannot be guaranteed to have more than <m:math><m:mn>2</m:mn></m:math>&#160;correct digits.  If  <m:math><m:mi>&#954;</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced><m:mo>&#8805;</m:mo><m:msup><m:mn>10</m:mn><m:mn>5</m:mn></m:msup></m:math>, the solution may have no meaningful digits.</div><div class="paramtext">To be more precise, suppose that

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>b</m:mi><m:mtext>&#8195; and &#8195;</m:mtext><m:mfenced separators=""><m:mi>A</m:mi><m:mo>+</m:mo><m:mi>&#948;</m:mi><m:mi>A</m:mi></m:mfenced><m:mfenced separators=""><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>&#948;</m:mi><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mi>b</m:mi><m:mo>+</m:mo><m:mi>&#948;</m:mi><m:mi>b</m:mi><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

Here <m:math><m:mi>&#948;</m:mi><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>&#948;</m:mi><m:mi>b</m:mi></m:math>&#160;represent perturbations to the matrices <m:math><m:mi>A</m:mi></m:math>&#160;and <m:math><m:mi>b</m:mi></m:math>&#160;which cause a perturbation <m:math><m:mi>&#948;</m:mi><m:mi>x</m:mi></m:math>&#160;in the solution.  We can define measures of the relative sizes of the perturbations in  <m:math><m:mi>A</m:mi></m:math>, <m:math><m:mi>b</m:mi></m:math>&#160;and <m:math><m:mi>x</m:mi></m:math>&#160;as

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>&#961;</m:mi><m:mi>A</m:mi></m:msub><m:mo>=</m:mo><m:mfrac><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>&#948;</m:mi><m:mi>A</m:mi></m:mfenced>
  <m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>A</m:mi></m:mfenced>
 </m:mfrac><m:mtext>, &#8195;</m:mtext><m:msub><m:mi>&#961;</m:mi><m:mi>b</m:mi></m:msub><m:mo>=</m:mo><m:mfrac><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>&#948;</m:mi><m:mi>b</m:mi></m:mfenced>
  <m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>b</m:mi></m:mfenced>
 </m:mfrac><m:mtext>&#8195; and &#8195;</m:mtext><m:msub><m:mi>&#961;</m:mi><m:mi>x</m:mi></m:msub><m:mo>=</m:mo><m:mfrac><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>&#948;</m:mi><m:mi>x</m:mi></m:mfenced>
  <m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>x</m:mi></m:mfenced>
 </m:mfrac><m:mtext>&#8195; respectively.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

Then

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>&#961;</m:mi><m:mi>x</m:mi></m:msub><m:mo>&#8804;</m:mo><m:mfrac><m:mrow><m:mi>&#954;</m:mi> <m:mfenced separators=""><m:mi>A</m:mi></m:mfenced></m:mrow>
  <m:mrow><m:mn>1</m:mn><m:mo>-</m:mo><m:mi>&#954;</m:mi> <m:mfenced separators=""><m:mi>A</m:mi></m:mfenced><m:msub><m:mi>&#961;</m:mi><m:mi>A</m:mi></m:msub></m:mrow>
 </m:mfrac><m:mfenced separators=""><m:msub><m:mi>&#961;</m:mi><m:mi>A</m:mi></m:msub><m:mo>+</m:mo><m:msub><m:mi>&#961;</m:mi><m:mi>b</m:mi></m:msub></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

provided that <m:math><m:mi>&#954;</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced><m:msub><m:mi>&#961;</m:mi><m:mi>A</m:mi></m:msub><m:mo>&lt;</m:mo><m:mn>1</m:mn></m:math>.  Often  <m:math><m:mi>&#954;</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced><m:msub><m:mi>&#961;</m:mi><m:mi>A</m:mi></m:msub><m:mo>&#8810;</m:mo><m:mn>1</m:mn></m:math>&#160;and then the bound effectively simplifies to

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>&#961;</m:mi><m:mi>x</m:mi></m:msub><m:mo>&#8804;</m:mo><m:mi>&#954;</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced><m:mfenced separators=""><m:msub><m:mi>&#961;</m:mi><m:mi>A</m:mi></m:msub><m:mo>+</m:mo><m:msub><m:mi>&#961;</m:mi><m:mi>b</m:mi></m:msub></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

Hence, if we know <m:math><m:mi>&#954;</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced></m:math>, <m:math><m:msub><m:mi>&#961;</m:mi><m:mi>A</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>&#961;</m:mi><m:mi>b</m:mi></m:msub></m:math>, we can compute a bound on the relative errors in the solution.  Note that <m:math><m:msub><m:mi>&#961;</m:mi><m:mi>A</m:mi></m:msub></m:math>, <m:math><m:msub><m:mi>&#961;</m:mi><m:mi>b</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>&#961;</m:mi><m:mi>x</m:mi></m:msub></m:math>&#160;are defined in terms of the norms of  <m:math><m:mi>A</m:mi></m:math>, <m:math><m:mi>b</m:mi></m:math>&#160;and <m:math><m:mi>x</m:mi></m:math>.  If <m:math><m:mi>A</m:mi></m:math>,  <m:math><m:mi>b</m:mi></m:math>&#160;or <m:math><m:mi>x</m:mi></m:math>&#160;contains elements of widely differing magnitude, then <m:math><m:msub><m:mi>&#961;</m:mi><m:mi>A</m:mi></m:msub></m:math>, <m:math><m:msub><m:mi>&#961;</m:mi><m:mi>b</m:mi></m:msub></m:math>&#160;and  <m:math><m:msub><m:mi>&#961;</m:mi><m:mi>x</m:mi></m:msub></m:math>&#160;will be dominated by the errors in the larger elements, and <m:math><m:msub><m:mi>&#961;</m:mi><m:mi>x</m:mi></m:msub></m:math>&#160;will give no information about the relative accuracy of smaller elements of <m:math><m:mi>x</m:mi></m:math>.</div><div class="paramtext">
A third

way to obtain useful information about the accuracy of a solution is to solve two sets of equations, one with the given coefficients, which are assumed to be known with certainty to <m:math><m:mi>p</m:mi></m:math>&#160;figures, and one with the coefficients rounded to (<m:math><m:mi>p</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:math>) figures, and to count the number of figures to which the two solutions agree.  In ill-conditioned problems this can be surprisingly small and even zero.</div><h3 class="standard"><a class="sec" name="background2" id="background2"/>2.2&#160;&#160;The Least Squares Solution of <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>&#8771;</m:mo><m:mi>b</m:mi></m:math>, <m:math><m:mi>m</m:mi><m:mo>&gt;</m:mo><m:mi>n</m:mi></m:math>, <m:math><m:mrow><m:mi>rank</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi>n</m:mi></m:math></h3>
<div class="paramtext">The least squares solution is the vector <m:math><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover></m:math>&#160;which minimizes the sum of the squares of the residuals,

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>S</m:mi><m:mo>=</m:mo><m:msup><m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup><m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover></m:mfenced><m:mo>=</m:mo><m:msup><m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover></m:mfenced><m:mn>2</m:mn></m:msub><m:mn>2</m:mn></m:msup><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

The solution is obtained in two steps.
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline"><a name="itema" id="itema"/>(a)</td>
<td valign="top">Householder transformations are used to reduce <m:math><m:mi>A</m:mi></m:math>&#160;to &#8216;simpler form&#8217; via the equation <m:math><m:mi>Q</m:mi><m:mi>A</m:mi><m:mo>=</m:mo><m:mi>R</m:mi></m:math>, where  <m:math><m:mi>R</m:mi></m:math>&#160;has the appearance

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mfenced separators=""><m:mfrac><m:mover><m:mi>R</m:mi><m:mo>^</m:mo></m:mover><m:mn>0</m:mn></m:mfrac></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

with <m:math><m:mover><m:mi>R</m:mi><m:mo>^</m:mo></m:mover></m:math>&#160;a nonsingular upper triangular  <m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;matrix and <m:math><m:mn>0</m:mn></m:math>&#160;a zero matrix of shape  <m:math><m:mfenced separators=""><m:mi>m</m:mi><m:mo>-</m:mo><m:mi>n</m:mi></m:mfenced></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>.  Similar operations convert <m:math><m:mi>b</m:mi></m:math>&#160;to  <m:math><m:mi>Q</m:mi><m:mi>b</m:mi><m:mo>=</m:mo><m:mi>c</m:mi></m:math>, where

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>c</m:mi><m:mo>=</m:mo><m:mfenced separators=""><m:mfrac><m:msub><m:mi>c</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>c</m:mi><m:mn>2</m:mn></m:msub></m:mfrac></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

with <m:math><m:msub><m:mi>c</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;having <m:math><m:mi>n</m:mi></m:math>&#160;rows and <m:math><m:msub><m:mi>c</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;having (<m:math><m:mi>m</m:mi><m:mo>-</m:mo><m:mi>n</m:mi></m:math>) rows.</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline"><a name="itemb" id="itemb"/>(b)</td>
<td valign="top">The required least squares solution is obtained by back-substitution in the equation

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mover><m:mi>R</m:mi><m:mo>^</m:mo></m:mover><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover><m:mo>=</m:mo><m:msub><m:mi>c</m:mi><m:mn>1</m:mn></m:msub><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>
</td>
</tr></table>
</div><div class="paramtext">Again due to rounding errors the computed <m:math><m:msub><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover><m:mn>0</m:mn></m:msub></m:math>&#160;is only an approximation to the required <m:math><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover></m:math>, but as in <a class="sec" href="#background1">Section 2.1</a>, this can be improved by &#8216;iterative refinement&#8217;.  The first correction <m:math><m:mi>d</m:mi></m:math>&#160;is the solution of the least squares problem

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:mi>d</m:mi><m:mo>=</m:mo><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:msub><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover><m:mn>0</m:mn></m:msub><m:mo>=</m:mo><m:mi>r</m:mi>
</m:math></td><td class="formula2"/></tr></table></div>

and since the matrix <m:math><m:mi>A</m:mi></m:math>&#160;is unchanged, this computation takes less time than that of the original <m:math><m:msub><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover><m:mn>0</m:mn></m:msub></m:math>.  The process can be repeated until further corrections are <a class="item" href="#itema">(a)</a> negligible or <a class="item" href="#itemb">(b)</a> show no further decrease.
</div><h3 class="standard"><a class="sec" name="background3" id="background3"/>2.3&#160;&#160;Rank-deficient Cases</h3>
<div class="paramtext">If, in the least squares problem just discussed,  <m:math><m:mrow><m:mi>rank</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced></m:mrow><m:mo>&lt;</m:mo><m:mi>n</m:mi></m:math>, then a least squares solution exists but it is not unique.  In this situation it is usual to ask for the least squares solution &#8216;of minimal length&#8217;, i.e., the vector  <m:math><m:mi>x</m:mi></m:math>&#160;which minimizes <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:math>,  among all those <m:math><m:mi>x</m:mi></m:math>&#160;for which <m:math><m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mi>x</m:mi></m:mfenced><m:mn>2</m:mn></m:msub></m:math>&#160;is a minimum.</div><div class="paramtext">This can be computed from the Singular Value Decomposition (SVD) of <m:math><m:mi>A</m:mi></m:math>, in which <m:math><m:mi>A</m:mi></m:math>&#160;is factorized 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>Q</m:mi><m:mi>D</m:mi><m:msup><m:mi>P</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;is an <m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;matrix with orthonormal columns, <m:math><m:mi>P</m:mi></m:math>&#160;is an <m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;orthogonal matrix and <m:math><m:mi>D</m:mi></m:math>&#160;is an <m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;diagonal matrix.  The diagonal elements of <m:math><m:mi>D</m:mi></m:math>&#160;are called the &#8216;singular values&#8217; of <m:math><m:mi>A</m:mi></m:math>; they are non-negative and can be arranged in decreasing order of magnitude:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>d</m:mi><m:mn>1</m:mn></m:msub><m:mo>&#8805;</m:mo><m:msub><m:mi>d</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>d</m:mi><m:mi>n</m:mi></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 columns of <m:math><m:mi>Q</m:mi></m:math>&#160;and <m:math><m:mi>P</m:mi></m:math>&#160;are called respectively the left and right singular vectors of <m:math><m:mi>A</m:mi></m:math>.  If the singular values <m:math><m:msub><m:mi>d</m:mi><m:mrow><m:mi>r</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>d</m:mi><m:mi>n</m:mi></m:msub></m:math>&#160;are zero or negligible, but  <m:math><m:msub><m:mi>d</m:mi><m:mi>r</m:mi></m:msub></m:math>&#160;is not negligible, then the rank of <m:math><m:mi>A</m:mi></m:math>&#160;is taken to be <m:math><m:mi>r</m:mi></m:math>&#160;(see also <a class="sec" href="#background4">Section 2.4</a>)  and the minimal length least squares solution of <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>&#8771;</m:mo><m:mi>b</m:mi></m:math>&#160;is given by

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover><m:mo>=</m:mo><m:msup><m:mi>D</m:mi><m:mo>&#8224;</m:mo></m:msup><m:msup><m:mi>Q</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>b</m:mi>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msup><m:mi>D</m:mi><m:mo>&#8224;</m:mo></m:msup></m:math>&#160;is the diagonal matrix with diagonal elements <m:math><m:msubsup><m:mi>d</m:mi><m:mn>1</m:mn><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msubsup><m:mo>,</m:mo><m:msubsup><m:mi>d</m:mi><m:mn>2</m:mn><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msubsup><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msubsup><m:mi>d</m:mi><m:mi>r</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msubsup><m:mo>,</m:mo><m:mn>0</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mn>0</m:mn></m:math>.</div><div class="paramtext">The SVD  may also be used to find solutions to the homogeneous system of equations  <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, where <m:math><m:mi>A</m:mi></m:math>&#160;is <m:math><m:mi>m</m:mi></m:math>&#160;by  <m:math><m:mi>n</m:mi></m:math>.  Such solutions exist if and only if  <m:math><m:mrow><m:mi>rank</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced></m:mrow><m:mo>&lt;</m:mo><m:mi>n</m:mi></m:math>, and are given by

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>x</m:mi><m:mo>=</m:mo><m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>i</m:mi><m:mo>=</m:mo><m:mi>r</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow><m:mi>n</m:mi></m:munderover><m:msub><m:mi>&#945;</m:mi><m:mi>i</m:mi></m:msub><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub>
</m:math></td><td class="formula2"/></tr></table></div>

where the <m:math><m:msub><m:mi>&#945;</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are arbitrary numbers and the  <m:math><m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are the columns of <m:math><m:mi>P</m:mi></m:math>&#160;which correspond to negligible elements of <m:math><m:mi>D</m:mi></m:math>.</div><div class="paramtext">The general solution to the rank-deficient least squares problem is given by <m:math><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover><m:mo>+</m:mo><m:mi>x</m:mi></m:math>, where <m:math><m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover></m:math>&#160;is the minimal length least squares solution and <m:math><m:mi>x</m:mi></m:math>&#160;is any solution of the homogeneous system of equations <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>.</div><h3 class="standard"><a class="sec" name="background4" id="background4"/>2.4&#160;&#160;The Rank of a Matrix</h3>
<div class="paramtext">In theory the rank is <m:math><m:mi>r</m:mi></m:math>&#160;if <m:math><m:mi>n</m:mi><m:mo>-</m:mo><m:mi>r</m:mi></m:math>&#160;elements of the diagonal matrix <m:math><m:mi>D</m:mi></m:math>&#160;of the singular value decomposition are exactly zero.  In practice, due to rounding and/or experimental errors,  some of these elements have very small values which usually can and should be treated as zero.</div><div class="paramtext">For example, the following <m:math><m:mn>5</m:mn></m:math>&#160;by <m:math><m:mn>8</m:mn></m:math>&#160;matrix has rank <m:math><m:mn>3</m:mn></m:math>&#160;in exact arithmetic:

<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>22</m:mn></m:mtd>
   <m:mtd><m:mn>14</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>3</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mn>9</m:mn></m:mtd>
   <m:mtd><m:mn>9</m:mn></m:mtd>
   <m:mtd><m:mn>2</m:mn></m:mtd>
   <m:mtd><m:mn>4</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>10</m:mn></m:mtd>
   <m:mtd><m:mn>7</m:mn></m:mtd>
   <m:mtd><m:mn>13</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mn>8</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>6</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mn>5</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>2</m:mn></m:mtd>
   <m:mtd><m:mn>10</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mn>13</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>7</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mn>6</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>3</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>11</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mn>5</m:mn></m:mtd>
   <m:mtd><m:mn>5</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>7</m:mn></m:mtd>
   <m:mtd><m:mn>8</m:mn></m:mtd>
   <m:mtd><m:mn>3</m:mn></m:mtd>
   <m:mtd><m:mn>4</m:mn></m:mtd>
   <m:mtd><m:mn>4</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>2</m:mn></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>


On a computer with <m:math><m:mn>7</m:mn></m:math>&#160;decimal digits of precision the computed singular values were

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mn>3.5</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mn>1</m:mn></m:msup><m:mtext>, &#8195;</m:mtext> <m:mn>2.0</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mn>1</m:mn></m:msup><m:mtext>, &#8195;</m:mtext> <m:mn>2.0</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mn>1</m:mn></m:msup><m:mtext>, &#8195;</m:mtext> <m:mn>1.3</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>6</m:mn></m:mrow></m:msup><m:mtext>, &#8195;</m:mtext> <m:mn>5.5</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>7</m:mn></m:mrow></m:msup>
</m:math></td><td class="formula2"/></tr></table></div>

and the rank would be correctly taken to be <m:math><m:mn>3</m:mn></m:math>.</div><div class="paramtext">It is not, however, always certain that small computed singular values are really zero.  With the <m:math><m:mn>7</m:mn></m:math>&#160;by <m:math><m:mn>7</m:mn></m:math>&#160;Hilbert matrix, for example, where <m:math><m:msub><m:mi>a</m:mi><m:mrow><m:mi>i</m:mi><m:mi>j</m:mi></m:mrow></m:msub><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>/</m:mo><m:mfenced separators=""><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>j</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced></m:math>, the singular values are

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mn>1.7</m:mn><m:mtext>, &#8195;</m:mtext><m:mn>2.7</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mtext>, &#8195;</m:mtext><m:mn>2.1</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:msup><m:mtext>, &#8195;</m:mtext><m:mn>1.0</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>3</m:mn></m:mrow></m:msup><m:mtext>, &#8195;</m:mtext><m:mn>2.9</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>5</m:mn></m:mrow></m:msup><m:mtext>, &#8195;</m:mtext><m:mn>4.9</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>7</m:mn></m:mrow></m:msup><m:mtext>, &#8195;</m:mtext><m:mn>3.5</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>9</m:mn></m:mrow></m:msup><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

Here there is no clear cut-off between small (i.e., negligible) singular values and larger ones.  In fact, in exact arithmetic, the matrix is known to have full rank and none of its singular values is zero.  On a computer with <m:math><m:mn>7</m:mn></m:math>&#160;decimal digits of precision, the matrix is effectively singular,  but should its rank be taken to be <m:math><m:mn>6</m:mn></m:math>, or <m:math><m:mn>5</m:mn></m:math>, or <m:math><m:mn>4</m:mn></m:math>?</div><div class="paramtext">It is therefore impossible to give an infallible rule, but generally the rank can be taken to be the number of singular values which are neither zero nor very small compared with other singular values.  For example, if there is a sharp decrease in singular values from numbers of order unity to numbers of order <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>7</m:mn></m:mrow></m:msup></m:math>, then the latter will almost certainly be zero in a machine in which <m:math><m:mn>7</m:mn></m:math>&#160;significant decimal figures is the maximum accuracy.  Similarly for a least squares problem in which the data is known to about four significant figures and the largest singular value is of order unity then a singular value of order <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>4</m:mn></m:mrow></m:msup></m:math>&#160;or less should almost certainly be regarded as zero.</div><div class="paramtext">It should be emphasised that rank determination and least squares solutions can be sensitive to the scaling of the matrix.  If at all possible the units of measurement should be chosen so that the elements of the matrix have data errors of approximately equal magnitude.</div><h3 class="standard"><a class="sec" name="background5" id="background5"/>2.5&#160;&#160;Generalized Linear Least Squares Problems</h3>
<div class="paramtext">The simple type of linear least squares problem described in  <a class="sec" href="#background2">Section 2.2</a> can be generalized in various ways.
<ol class="listnumber"><li class="listnumber">Linear least squares problems with <b>equality constraints</b>:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtext>find &#8203;</m:mtext><m:mi>x</m:mi><m:mtext>&#8203; to minimize &#8203;</m:mtext><m:mi>S</m:mi><m:mo>=</m:mo><m:msup><m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>c</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mi>x</m:mi></m:mfenced><m:mn>2</m:mn></m:msub><m:mn>2</m:mn></m:msup><m:mtext>&#8195; subject to &#8195;</m:mtext><m:mi>B</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>d</m:mi><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:mi>A</m:mi></m:math>&#160;is <m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;is <m:math><m:mi>p</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>, with <m:math><m:mi>p</m:mi><m:mo>&#8804;</m:mo><m:mi>n</m:mi><m:mo>&#8804;</m:mo><m:mi>m</m:mi><m:mo>+</m:mo><m:mi>p</m:mi></m:math>.  The equations <m:math><m:mi>B</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>d</m:mi></m:math>&#160;may be regarded as a set of equality constraints on the problem of minimizing <m:math><m:mi>S</m:mi></m:math>.  Alternatively the problem may be regarded as solving an overdetermined system of equations

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:mi>A</m:mi></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mi>B</m:mi></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mi>x</m:mi><m:mo>=</m:mo><m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:mi>c</m:mi></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mi>d</m:mi></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where some of the equations (those involving <m:math><m:mi>B</m:mi></m:math>) are to be solved exactly, and the others (those involving <m:math><m:mi>A</m:mi></m:math>) are to be solved in a least squares sense.  The problem has a unique solution on the assumptions that <m:math><m:mi>B</m:mi></m:math>&#160;has full row rank <m:math><m:mi>p</m:mi></m:math>&#160;and the matrix <m:math>
<m:mfenced><m:mtable>
  <m:mtr>
   <m:mtd><m:mi>A</m:mi></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mi>B</m:mi></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
</m:math>&#160;has full column rank <m:math><m:mi>n</m:mi></m:math>.  (For linear least squares problems with <b>inequality constraints</b>,  refer to <a class="chap" href="../E04/e04conts.xml">Chapter E04</a>.)</li><li class="listnumber"><b>General Gauss&#8211;Markov linear model problems</b>:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtext>minimize &#8203;</m:mtext><m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>y</m:mi></m:mfenced><m:mn>2</m:mn></m:msub><m:mtext>&#8195; subject to &#8195;</m:mtext><m:mi>d</m:mi><m:mo>=</m:mo><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>B</m:mi><m:mi>y</m:mi><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:mi>A</m:mi></m:math>&#160;is <m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;and <m:math><m:mi>B</m:mi></m:math>&#160;is <m:math><m:mi>m</m:mi></m:math>&#160;by <m:math><m:mi>p</m:mi></m:math>, with <m:math><m:mi>n</m:mi><m:mo>&#8804;</m:mo><m:mi>m</m:mi><m:mo>&#8804;</m:mo><m:mi>n</m:mi><m:mo>+</m:mo><m:mi>p</m:mi></m:math>.  When <m:math><m:mi>B</m:mi><m:mo>=</m:mo><m:mi>I</m:mi></m:math>, the problem reduces to an ordinary linear least squares problem.  When <m:math><m:mi>B</m:mi></m:math>&#160;is square and nonsingular, it is equivalent to a  <b>weighted linear least squares problem</b>:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtext>find &#8203;</m:mtext><m:mi>x</m:mi><m:mtext>&#8203; to minimize &#8203;</m:mtext><m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:msup><m:mi>B</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mfenced separators=""><m:mi>d</m:mi><m:mo>-</m:mo><m:mi>A</m:mi><m:mi>x</m:mi></m:mfenced></m:mfenced><m:mn>2</m:mn></m:msub><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

The problem has a unique solution on the assumptions that <m:math><m:mi>A</m:mi></m:math>&#160;has full column rank <m:math><m:mi>n</m:mi></m:math>, and the matrix <m:math><m:mfenced separators=""><m:mi>A</m:mi><m:mo>,</m:mo><m:mi>B</m:mi></m:mfenced></m:math>&#160;has full row rank <m:math><m:mi>m</m:mi></m:math>.</li></ol>
</div><h3 class="standard"><a class="sec" name="background6" id="background6"/>2.6&#160;&#160;Calculating the Inverse of a Matrix</h3>
<div class="paramtext">The routines in this chapter can also be used to calculate the inverse of a square matrix <m:math><m:mi>A</m:mi></m:math>&#160;by solving the equation

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:mi>X</m:mi><m:mo>=</m:mo><m:mi>I</m:mi>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:mi>I</m:mi></m:math>&#160;is the identity matrix.  However, solving the equations  <m:math><m:mi>A</m:mi><m:mi>X</m:mi><m:mo>=</m:mo><m:mi>B</m:mi></m:math>&#160;by calculation of the inverse of the coefficient matrix  <m:math><m:mi>A</m:mi></m:math>, i.e., by <m:math><m:mi>X</m:mi><m:mo>=</m:mo><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:math>, is <b>definitely not recommended</b>.</div><div class="paramtext">Similar remarks apply to the calculation of the pseudo-inverse of a singular or rectangular matrix.</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 and General Purpose Routines</h3>
<div class="paramtext">Most of the routines in this chapter are categorised either as Black Box routines or general purpose routines.</div><div class="paramtext">Black Box routines solve the equations <m:math><m:mi>A</m:mi><m:msub><m:mi>x</m:mi><m:mi mathvariant="italic">i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>b</m:mi><m:mi mathvariant="italic">i</m:mi></m:msub></m:math>, for <m:math><m:mi mathvariant="italic">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>p</m:mi></m:math>, in a single call with the matrix <m:math><m:mi>A</m:mi></m:math>&#160;and the right-hand sides, <m:math><m:msub><m:mi>b</m:mi><m:mi>i</m:mi></m:msub></m:math>, being supplied as data.  These are the simplest routines to use and are suitable when all the right-hand sides are known in advance and do not occupy too much storage.</div><div class="paramtext">General purpose routines, in general, require a previous call to a routine in  <a class="chap" href="../F01/f01conts.xml">Chapters F01</a>, <a class="chap" href="../F03/f03conts.xml">F03</a> or <a class="chap" href="../F07/f07conts.xml">F07</a> to factorize the matrix <m:math><m:mi>A</m:mi></m:math>.  This factorization can then be used repeatedly to solve the equations for one or more right-hand sides which may be generated in the course of the computation.  The Black Box  routines simply call a factorization routine and then a general purpose routine  to solve the equations.</div><div class="paramtext">The routine <a class="rout" href="../F04/f04qaf.xml">F04QAF</a> which uses an iterative method for sparse systems of equations does not fit easily into this categorisation, but is classified as a general purpose routine in the decision trees and indexes.</div><h3 class="standard"><a class="sec" name="recomm_2" id="recomm_2"/>3.2&#160;&#160;Systems of Linear Equations</h3>
<div class="paramtext">Most of the routines in this chapter solve linear equations <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>b</m:mi></m:math>&#160;when <m:math><m:mi>A</m:mi></m:math>&#160;is <m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;and a unique solution is expected (see <a class="sec" href="#background1">Section 2.1</a>).  The matrix <m:math><m:mi>A</m:mi></m:math>&#160;may be &#8216;general&#8217; real or complex, or may have special structure or properties, e.g., it may be banded, tridiagonal, almost block-diagonal, sparse, symmetric, Hermitian,  positive definite (or various combinations of these).

</div><div class="paramtext">It must be emphasised that it is a waste of computer time and space to use an inappropriate routine, for example one for the complex case when the equations are real.  It is also unsatisfactory to use the special routines for a positive definite matrix if this property is not known in advance.</div><div class="paramtext">Routines are given for calculating the <b>approximate solution</b>, that is solving the linear equations just once, and also for obtaining the  <b>accurate solution</b> by successive iterative corrections of this first approximation using additional precision arithmetic, as described in <a class="sec" href="#background1">Section 2.1</a>.  The latter, of course, are more costly in terms of time and storage, since each correction involves the solution of <m:math><m:mi>n</m:mi></m:math>&#160;sets of linear equations and since the original <m:math><m:mi>A</m:mi></m:math>&#160;and its <m:math><m:mi>L</m:mi><m:mi>U</m:mi></m:math>&#160;decomposition must be stored together with the first and successively corrected approximations to the solution.  In practice the storage requirements for the &#8216;corrected&#8217; routines are about double those of the &#8216;approximate&#8217; routines, though the extra computer time may not be prohibitive since the same matrix and the same <m:math><m:mi>L</m:mi><m:mi>U</m:mi></m:math>&#160;decomposition is used in every linear equation solution.</div><div class="paramtext">A number of the Black Box routines in this chapter return estimates of the condition number and the forward error, along with the solution of the equations.  But for those routines that do not return a condition estimate two routines are provided &#8211; <a class="rout" href="../F04/f04ycf.xml">F04YCF</a> for real matrices,  <a class="rout" href="../F04/f04zcf.xml">F04ZCF</a> for complex matrices &#8211; which can return a cheap but reliable estimate of <m:math><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:msup><m:mi>A</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup></m:mfenced></m:math>, and hence an estimate of the <b>condition number</b>
<m:math><m:mi>&#954;</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced></m:math>&#160;(see  <a class="sec" href="#background1">Section 2.1</a>).  These routines can also be used in conjunction with most of the linear equation solving routines in <a class="chap" href="../F11/f11conts.xml">Chapter F11</a>: further advice is given in the routine documents.</div><div class="paramtext">Other routines for solving linear equation systems, computing inverse matrices, and estimating condition numbers can be found in <a class="chap" href="../F07/f07conts.xml">Chapter F07</a>,  which contains LAPACK software.</div><h3 class="standard"><a class="sec" name="recomm_3" id="recomm_3"/>3.3&#160;&#160;Linear Least Squares Problems</h3>
<div class="paramtext">The majority of the routines for solving linear least squares problems are to be found in <a class="chap" href="../F08/f08conts.xml">Chapter F08</a>.</div><div class="paramtext">For the case described in <a class="sec" href="#background2">Section 2.2</a>, when <m:math><m:mi>m</m:mi><m:mo>&#8805;</m:mo><m:mi>n</m:mi></m:math>&#160;and a unique least squares solution is expected, there are two routines for a general real <m:math><m:mi>A</m:mi></m:math>, one of which (<a class="rout" href="../F04/f04jgf.xml">F04JGF</a>) computes a first approximation and the other (<a class="rout" href="../F04/f04amf.xml">F04AMF</a>) computes iterative corrections.  If it transpires that <m:math><m:mrow><m:mi>rank</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced></m:mrow><m:mo>&lt;</m:mo><m:mi>n</m:mi></m:math>, so that the least squares solution is not unique, then <a class="rout" href="../F04/f04amf.xml">F04AMF</a> takes a failure exit, but <a class="rout" href="../F04/f04jgf.xml">F04JGF</a> proceeds to compute the <b>minimal length</b> solution by using the SVD (see below).</div><div class="paramtext">If <m:math><m:mi>A</m:mi></m:math>&#160;is expected to be of less than full rank then one of the  routines for calculating the minimal length solution may be used.</div><div class="paramtext">For <m:math><m:mi>m</m:mi><m:mo>&#8811;</m:mo><m:mi>n</m:mi></m:math>&#160;the use of the SVD is not significantly more expensive than the use of routines based upon the <m:math><m:mi>Q</m:mi><m:mi>R</m:mi></m:math>&#160;factorization.</div><div class="paramtext">Problems with linear <b>equality constraints</b> can be solved by
<a class="rout" href="../F08/f08zaf.xml">F08ZAF (DGGLSE)</a> (for real data) or by <a class="rout" href="../F08/f08znf.xml">F08ZNF (ZGGLSE)</a>  (for complex data),

provided that the problems are of full rank.  Problems with linear <b>inequality constraints</b> can be solved by <a class="rout" href="../E04/e04ncf.xml">E04NCF/E04NCA</a> in <a class="chap" href="../E04/e04conts.xml">Chapter E04</a>.</div><div class="paramtext">General Gauss&#8211;Markov linear model problems, as formulated in  <a class="sec" href="#background5">Section 2.5</a>, can be solved by
<a class="rout" href="../F08/f08zbf.xml">F08ZBF (DGGGLM)</a> (for real data) or by <a class="rout" href="../F08/f08zpf.xml">F08ZPF (ZGGGLM)</a>  (for complex data).
</div><h3 class="standard"><a class="sec" name="recomm_4" id="recomm_4"/>3.4&#160;&#160;Sparse Matrix Routines</h3>
<div class="paramtext">Routines specifically for sparse matrices are appropriate only when the number of nonzero elements is very small, less than, say, 10% of the <m:math><m:msup><m:mi>n</m:mi><m:mn>2</m:mn></m:msup></m:math>&#160;elements of <m:math><m:mi>A</m:mi></m:math>, and the matrix does not have a relatively small band width.</div><div class="paramtext"><a class="chap" href="../F11/f11conts.xml">Chapter F11</a> contains routines for both the direct and iterative solution of real sparse linear systems. There are two routines in <a class="chap" href="../F04/f04conts.xml">Chapter F04</a> for solving sparse linear equations  (<a class="rout" href="../F04/f04axf.xml">F04AXF</a> and <a class="rout" href="../F04/f04qaf.xml">F04QAF</a>).  <a class="rout" href="../F04/f04axf.xml">F04AXF</a> utilizes a factorization of the matrix  <m:math><m:mi>A</m:mi></m:math>&#160;obtained from <a class="rout" href="../F01/f01brf.xml">F01BRF</a> or <a class="rout" href="../F01/f01bsf.xml">F01BSF</a>, while  <a class="rout" href="../F04/f04qaf.xml">F04QAF</a> uses an iterative technique and requires a user-supplied function to compute matrix-vector products <m:math><m:mi>A</m:mi><m:mi>c</m:mi></m:math>&#160;and  <m:math><m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>c</m:mi></m:math>&#160;for any given vector <m:math><m:mi>c</m:mi></m:math>.</div><div class="paramtext"><a class="rout" href="../F04/f04qaf.xml">F04QAF</a> solves sparse least squares problems by an iterative technique, and also allows the solution of damped (regularised) least squares problems (see the routine document for details).</div><h2 class="standard"><a class="sec" name="dtree" id="dtree"/>4&#160;&#160;Decision Trees</h2>
<div class="paramtext">The name of the routine (if any) that should be used to factorize the matrix <m:math><m:mi>A</m:mi></m:math>&#160;is given in brackets after the name of the routine  for solving the equations.</div><h3 class="sec"><a name="blackbox-real" id="blackbox-real"/>Tree 1: Black Box routines for unique solution of <m:math><m:mi mathvariant="bold-italic">A</m:mi><m:mi mathvariant="bold-italic">x</m:mi><m:mo>=</m:mo><m:mi mathvariant="bold-italic">b</m:mi></m:math>&#160;(Real matrix)</h3>
<table class="dtree">
<tr>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;symmetric?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;positive definite?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;a band matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;tridiagonal?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04bgf.xml">F04BGF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07jaf.xml">F07JAF</a> or <a class="rout" href="../F07/f07jbf.xml">F07JBF</a> (see <a class="note" href="#note2">Note 2</a>)</td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<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="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../F04/f04bff.xml">F04BFF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07haf.xml">F07HAF</a> or <a class="rout" href="../F07/f07hbf.xml">F07HBF</a> (see <a class="note" href="#note2">Note 2</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">Is <m:math><m:mi>A</m:mi></m:math>&#160;a Toeplitz matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Are the equations the Yule&#8211;Walker equations?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04fef.xml">F04FEF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<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="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../F04/f04fff.xml">F04FFF</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">Do you require an accurate solution using iterative refinement?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04abf.xml">F04ABF</a> or <a class="rout" href="../F04/f04asf.xml">F04ASF</a> (see <a class="note" href="#note3">Note 3</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">Is one triangle of <m:math><m:mi>A</m:mi></m:math>&#160;stored as a linear array?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04bef.xml">F04BEF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07gaf.xml">F07GAF</a> or <a class="rout" href="../F07/f07gbf.xml">F07GBF</a> (see <a class="note" href="#note2">Note 2</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="../F04/f04bdf.xml">F04BDF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07faf.xml">F07FAF</a> or <a class="rout" href="../F07/f07fbf.xml">F07FBF</a> (see <a class="note" href="#note2">Note 2</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 one triangle of <m:math><m:mi>A</m:mi></m:math>&#160;stored as a linear array?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04bjf.xml">F04BJF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07paf.xml">F07PAF</a> or <a class="rout" href="../F07/f07pbf.xml">F07PBF</a> (see <a class="note" href="#note2">Note 2</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="../F04/f04bhf.xml">F04BHF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07maf.xml">F07MAF</a> or <a class="rout" href="../F07/f07mbf.xml">F07MBF</a> (see <a class="note" href="#note2">Note 2</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;a band matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;tridiagonal?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04bcf.xml">F04BCF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07caf.xml">F07CAF</a> or <a class="rout" href="../F07/f07cbf.xml">F07CBF</a> (see <a class="note" href="#note2">Note 2</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="../F04/f04bbf.xml">F04BBF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07baf.xml">F07BAF</a> or <a class="rout" href="../F07/f07bbf.xml">F07BBF</a> (see <a class="note" href="#note2">Note 2</a>)</td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Do you require an accurate solution using iterative refinement?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04aef.xml">F04AEF</a> or <a class="rout" href="../F04/f04atf.xml">F04ATF</a> (see <a class="note" href="#note3">Note 3</a>)</td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry"><a class="rout" href="../F04/f04baf.xml">F04BAF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07aaf.xml">F07AAF</a> or <a class="rout" href="../F07/f07abf.xml">F07ABF</a> (see <a class="note" href="#note2">Note 2</a>)</td></tr></table><h3 class="sec"><a name="blackbox-complex" id="blackbox-complex"/>Tree 2: Black Box routines for unique solution of <m:math><m:mi mathvariant="bold-italic">A</m:mi><m:mi mathvariant="bold-italic">x</m:mi><m:mo>=</m:mo><m:mi mathvariant="bold-italic">b</m:mi></m:math>&#160;(Complex matrix)</h3>
<table class="dtree">
<tr>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;Hermitian?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;positive definite?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;a band matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;bidiagonal?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">
	  <a class="rout" href="../F04/f04cgf.xml">F04CGF</a> (see <a class="note" href="#note1">Note 1</a>) or<br/>
	  <a class="rout" href="../F07/f07jnf.xml">F07JNF</a> or <a class="rout" href="../F07/f07jpf.xml">F07JPF</a> (see <a class="note" href="#note2">Note 2</a>)
	 </td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<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="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../F04/f04cff.xml">F04CFF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07hnf.xml">F07HNF</a> or <a class="rout" href="../F07/f07hpf.xml">F07HPF</a> (see <a class="note" href="#note2">Note 2</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">Is one triangle of <m:math><m:mi>A</m:mi></m:math>&#160;stored as a linear array?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04cef.xml">F04CEF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07gnf.xml">F07GNF</a> or <a class="rout" href="../F07/f07gpf.xml">F07GPF</a> (see <a class="note" href="#note2">Note 2</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="../F04/f04cdf.xml">F04CDF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07fnf.xml">F07FNF</a> or <a class="rout" href="../F07/f07fpf.xml">F07FPF</a> (see <a class="note" href="#note2">Note 2</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 one triangle of <m:math><m:mi>A</m:mi></m:math>&#160;stored as a linear array?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04cjf.xml">F04CJF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07pnf.xml">F07PNF</a> or <a class="rout" href="../F07/f07ppf.xml">F07PPF</a> (see <a class="note" href="#note2">Note 2</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="../F04/f04chf.xml">F04CHF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07mnf.xml">F07MNF</a> or <a class="rout" href="../F07/f07mpf.xml">F07MPF</a> (see <a class="note" href="#note2">Note 2</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;symmetric?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is one triangle of <m:math><m:mi>A</m:mi></m:math>&#160;stored as a linear array?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04djf.xml">F04DJF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07qnf.xml">F07QNF</a> or <a class="rout" href="../F07/f07qpf.xml">F07QPF</a> (see <a class="note" href="#note2">Note 2</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="../F04/f04dhf.xml">F04DHF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07nnf.xml">F07NNF</a> or <a class="rout" href="../F07/f07npf.xml">F07NPF</a> (see <a class="note" href="#note2">Note 2</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;a band matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;tridiagonal?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04ccf.xml">F04CCF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07cnf.xml">F07CNF</a> or <a class="rout" href="../F07/f07cpf.xml">F07CPF</a> (see <a class="note" href="#note2">Note 2</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="../F04/f04cbf.xml">F04CBF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07bnf.xml">F07BNF</a> or <a class="rout" href="../F07/f07bpf.xml">F07BPF</a> (see <a class="note" href="#note2">Note 2</a>)</td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry"><a class="rout" href="../F04/f04caf.xml">F04CAF</a> (see <a class="note" href="#note1">Note 1</a>) or <a class="rout" href="../F07/f07anf.xml">F07ANF</a> or <a class="rout" href="../F07/f07apf.xml">F07APF</a> (see <a class="note" href="#note2">Note 2</a>)</td></tr></table><h3 class="sec"><a name="realmatrix" id="realmatrix"/>Tree 3: General purpose routines for unique solution of <m:math><m:mi mathvariant="bold-italic">A</m:mi><m:mi mathvariant="bold-italic">x</m:mi><m:mo>=</m:mo><m:mi mathvariant="bold-italic">b</m:mi></m:math>&#160;(Real matrix)
</h3>
<table class="dtree">
<tr>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;a sparse matrix and not banded?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="chap" href="../F11/f11conts.xml">Chapter F11</a> or <a class="rout" href="../F04/f04axf.xml">F04AXF</a> (<a class="rout" href="../F01/f01brf.xml">F01BRF</a> or <a class="rout" href="../F01/f01bsf.xml">F01BSF</a>) or <a class="rout" href="../F04/f04qaf.xml">F04QAF</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;symmetric?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;positive definite?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;band matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;tridiagonal?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F07/f07jef.xml">F07JEF</a> (<a class="rout" href="../F07/f07jdf.xml">F07JDF</a>)</td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<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="dtnobar">|</td>
<td/>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;variable band width?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04mcf.xml">F04MCF</a> (<a class="rout" href="../F01/f01mcf.xml">F01MCF</a>)</td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<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="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../F07/f07hef.xml">F07HEF</a> (<a class="rout" href="../F07/f07hdf.xml">F07HDF</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">Is <m:math><m:mi>A</m:mi></m:math>&#160;a Toeplitz matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Are the equations the Yule&#8211;Walker equations?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04mef.xml">F04MEF</a></td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<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="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../F04/f04mff.xml">F04MFF</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">Is one triangle of <m:math><m:mi>A</m:mi></m:math>&#160;stored as a linear array?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F07/f07gef.xml">F07GEF</a> (<a class="rout" href="../F07/f07gdf.xml">F07GDF</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="../F07/f07fef.xml">F07FEF</a> (<a class="rout" href="../F07/f07fdf.xml">F07FDF</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 one triangle of <m:math><m:mi>A</m:mi></m:math>&#160;stored as a linear array?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F07/f07pef.xml">F07PEF</a> (<a class="rout" href="../F07/f07pdf.xml">F07PDF</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="../F07/f07mef.xml">F07MEF</a> (<a class="rout" href="../F07/f07mdf.xml">F07MDF</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;triangular?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;a band matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F07/f07vef.xml">F07VEF</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 <m:math><m:mi>A</m:mi></m:math>&#160;stored as a linear array?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F07/f07uef.xml">F07UEF</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="../F07/f07tef.xml">F07TEF</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;a band matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;tridiagonal?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04lef.xml">F04LEF</a> (<a class="rout" href="../F01/f01lef.xml">F01LEF</a>) or <a class="rout" href="../F07/f07cef.xml">F07CEF</a> (<a class="rout" href="../F07/f07cdf.xml">F07CDF</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 <m:math><m:mi>A</m:mi></m:math>&#160;almost block diagonal?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04lhf.xml">F04LHF</a> (<a class="rout" href="../F01/f01lhf.xml">F01LHF</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="../F07/f07bef.xml">F07BEF</a> (<a class="rout" href="../F07/f07bdf.xml">F07BDF</a>)</td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry"><a class="rout" href="../F07/f07aef.xml">F07AEF</a> (<a class="rout" href="../F07/f07adf.xml">F07ADF</a>)</td></tr></table><h3 class="sec"><a name="complexmatrix" id="complexmatrix"/>Tree 4: General purpose routines for unique solution of <m:math><m:mi mathvariant="bold-italic">A</m:mi><m:mi mathvariant="bold-italic">x</m:mi><m:mo>=</m:mo><m:mi mathvariant="bold-italic">b</m:mi></m:math>&#160;(Complex matrix)
</h3>
<table class="dtree">
<tr>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;a sparse matrix and not banded?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="chap" href="../F11/f11conts.xml">Chapter F11</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;Hermitian?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;positive definite?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;a band matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;tridiagonal?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F07/f07jsf.xml">F07JSF</a> (<a class="rout" href="../F07/f07jrf.xml">F07JRF</a>)</td></tr>
<tr>
<td class="dtnobar">|</td>
<td/>
<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="dtnobar">|</td>
<td/>
<td class="dtentry"><a class="rout" href="../F07/f07hsf.xml">F07HSF</a> (<a class="rout" href="../F07/f07hrf.xml">F07HRF</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">Is one triangle of <m:math><m:mi>A</m:mi></m:math>&#160;stored as a linear array?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F07/f07gsf.xml">F07GSF</a> (<a class="rout" href="../F07/f07grf.xml">F07GRF</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="../F07/f07fsf.xml">F07FSF</a> (<a class="rout" href="../F07/f07frf.xml">F07FRF</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 one triangle of <m:math><m:mi>A</m:mi></m:math>&#160;stored as a linear array?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F07/f07psf.xml">F07PSF</a> (<a class="rout" href="../F07/f07prf.xml">F07PRF</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="../F07/f07msf.xml">F07MSF</a> (<a class="rout" href="../F07/f07mrf.xml">F07MRF</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;symmetric?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is one triangle of <m:math><m:mi>A</m:mi></m:math>&#160;stored as a linear array?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F07/f07qsf.xml">F07QSF</a> (<a class="rout" href="../F07/f07qrf.xml">F07QRF</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="../F07/f07nsf.xml">F07NSF</a> (<a class="rout" href="../F07/f07nrf.xml">F07NRF</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;triangular?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;a band matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F07/f07vsf.xml">F07VSF</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 <m:math><m:mi>A</m:mi></m:math>&#160;stored as a linear array?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F07/f07usf.xml">F07USF</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="../F07/f07tsf.xml">F07TSF</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;a band matrix?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Is <m:math><m:mi>A</m:mi></m:math>&#160;tridiagonal?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F07/f07csf.xml">F07CSF</a> (<a class="rout" href="../F07/f07crf.xml">F07CRF</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="../F07/f07bsf.xml">F07BSF</a> (<a class="rout" href="../F07/f07brf.xml">F07BRF</a>)</td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry"><a class="rout" href="../F07/f07asf.xml">F07ASF</a> (<a class="rout" href="../F07/f07arf.xml">F07ARF</a>)</td></tr></table><h3 class="sec"><a name="tree3" id="tree3"/>Tree 5: General purpose routines for least squares and homogeneous equations (without constraints)
</h3>
<table class="dtree">
<tr>
<td class="dtentry">Is the problem <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F08/f08kaf.xml">F08KAF</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;sparse?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04qaf.xml">F04QAF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Is <m:math><m:mrow><m:mi>rank</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi>n</m:mi></m:math>?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry">Are storage and time more important than accuracy?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04jgf.xml">F04JGF</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="../F04/f04amf.xml">F04AMF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry">Is <m:math><m:mi>m</m:mi><m:mo>&gt;</m:mo><m:mi>n</m:mi></m:math>?</td>
<td class="dtnobar">_<br/>yes</td>
<td class="dtentry"><a class="rout" href="../F04/f04jgf.xml">F04JGF</a> or <a class="rout" href="../F08/f08kaf.xml">F08KAF</a></td></tr>
<tr>
<td class="dtnobar">no<br/>|</td>
<td/></tr>
<tr>
<td class="dtentry"><a class="rout" href="../F08/f08kaf.xml">F08KAF</a></td></tr></table><div class="paramtext"><b>Note:</b> there are also routines in <a class="chap" href="../F08/f08conts.xml">Chapter F08</a> for solving least squares problems..</div>
<div class="paramtext"><a name="note1" id="note1"/><b>Note 1:</b> also returns an estimate of the condition number and the forward error.</div><div class="paramtext"><a name="note2" id="note2"/><b>Note 2:</b> also returns an estimate of the condition number, the forward error and the backward error. Requires additional workspace.</div><div class="paramtext"><a name="note3" id="note3"/><b>Note 3:</b> for a single right-hand side only.</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,&#160;<span><i>A</i><i>x</i><span>&#160;=&#160;</span><i>b</i></span>,</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;general&#160;band&#160;matrix</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="../F04/f04cbf.xml">F04CBF</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;general&#160;matrix</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="../F04/f04caf.xml">F04CAF</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;general&#160;tridiagonal&#160;matrix</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="../F04/f04ccf.xml">F04CCF</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;Hermitian&#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;packed&#160;matrix&#160;format</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="../F04/f04cjf.xml">F04CJF</a></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;standard&#160;matrix&#160;format</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="../F04/f04chf.xml">F04CHF</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;Hermitian&#160;positive&#160;definite&#160;band&#160;matrix</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="../F04/f04cff.xml">F04CFF</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;Hermitian&#160;positive&#160;definite&#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;packed&#160;matrix&#160;format</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="../F04/f04cef.xml">F04CEF</a></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;standard&#160;matrix&#160;format</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="../F04/f04cdf.xml">F04CDF</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;Hermitian&#160;positive&#160;definite&#160;tridiagonal&#160;matrix</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="../F04/f04cgf.xml">F04CGF</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;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;packed&#160;matrix&#160;format</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="../F04/f04djf.xml">F04DJF</a></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;standard&#160;matrix&#160;format</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="../F04/f04dhf.xml">F04DHF</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;general&#160;band&#160;matrix</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="../F04/f04bbf.xml">F04BBF</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;general&#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;multiple&#160;right-hand&#160;sides</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;&#160;&#160;&#160;&#160;iterative&#160;refinement&#160;using&#160;additional&#160;precision</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="../F04/f04aef.xml">F04AEF</a></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;single&#160;right-hand&#160;side</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;&#160;&#160;&#160;&#160;iterative&#160;refinement&#160;using&#160;additional&#160;precision</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="../F04/f04atf.xml">F04ATF</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;general&#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;multiple&#160;right-hand&#160;sides,&#160;standard&#160;precision</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="../F04/f04baf.xml">F04BAF</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;general&#160;tridiagonal&#160;matrix</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="../F04/f04bcf.xml">F04BCF</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;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;packed&#160;matrix&#160;format</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="../F04/f04bjf.xml">F04BJF</a></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;standard&#160;matrix&#160;format</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="../F04/f04bhf.xml">F04BHF</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;symmetric&#160;positive&#160;definite&#160;band&#160;matrix</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="../F04/f04bff.xml">F04BFF</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;symmetric&#160;positive&#160;definite&#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;multiple&#160;right-hand&#160;sides</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;&#160;&#160;&#160;&#160;iterative&#160;refinement&#160;using&#160;additional&#160;precision</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="../F04/f04abf.xml">F04ABF</a></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;single&#160;right-hand&#160;side</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;&#160;&#160;&#160;&#160;iterative&#160;refinement&#160;using&#160;additional&#160;precision</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="../F04/f04asf.xml">F04ASF</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;symmetric&#160;positive&#160;definite&#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;multiple&#160;right-hand&#160;sides,&#160;standard&#160;precision</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="../F04/f04bdf.xml">F04BDF</a></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;packed&#160;matrix&#160;format</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="../F04/f04bef.xml">F04BEF</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;symmetric&#160;positive&#160;definite&#160;Toeplitz&#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;general&#160;right-hand&#160;side</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="../F04/f04fff.xml">F04FFF</a></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;Yule&#8211;Walker&#160;equations</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="../F04/f04fef.xml">F04FEF</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;symmetric&#160;positive&#160;definite&#160;tridiagonal&#160;matrix</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="../F04/f04bgf.xml">F04BGF</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;<span><i>A</i><i>x</i><span>&#160;=&#160;</span><i>b</i></span>,</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;almost&#160;block-diagonal&#160;matrix</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="../F04/f04lhf.xml">F04LHF</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;band&#160;symmetric&#160;positive&#160;definite&#160;matrix,&#160;variable&#160;bandwidth</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="../F04/f04mcf.xml">F04MCF</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;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;direct&#160;method</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="../F04/f04axf.xml">F04AXF</a></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;iterative&#160;method</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="../F04/f04qaf.xml">F04QAF</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;symmetric&#160;positive&#160;definite&#160;Toeplitz&#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;general&#160;right-hand&#160;side,&#160;update&#160;solution</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="../F04/f04mff.xml">F04MFF</a></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;Yule&#8211;Walker&#160;equations,&#160;update&#160;solution</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="../F04/f04mef.xml">F04MEF</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;tridiagonal&#160;matrix</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="../F04/f04lef.xml">F04LEF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>Least&#160;squares&#160;and&#160;Homogeneous&#160;Equations,</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,</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;<span><i>m</i><span>&#160;&#8805;&#160;</span><i>n</i></span>, rank <span><span/><span>&#160;=&#160;</span><i>n</i></span>&#160;or minimal solution</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="../F04/f04jgf.xml">F04JGF</a></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;rank&#160;<span><span/><span>&#160;=&#160;</span><i>n</i></span>, iterative refinement</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="../F04/f04amf.xml">F04AMF</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;matrix</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="../F04/f04qaf.xml">F04QAF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>Service&#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;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;norm&#160;and&#160;condition&#160;number&#160;estimation</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="../F04/f04zcf.xml">F04ZCF</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;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;covariance&#160;matrix&#160;for&#160;linear&#160;least&#160;squares&#160;problems</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="../F04/f04yaf.xml">F04YAF</a></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;norm&#160;and&#160;condition&#160;number&#160;estimation</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="../F04/f04ycf.xml">F04YCF</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="paramtext">None.</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#F04AAF">F04AAF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07aaf.xml">F07AAF (DGESV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04ACF">F04ACF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07haf.xml">F07HAF (DPBSV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04ADF">F04ADF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07anf.xml">F07ANF (ZGESV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04AFF">F04AFF</a></td><td class="libdoc" valign="top" align="center">25</td><td class="libdoc" valign="top"> No replacement.</td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04AGF">F04AGF</a></td><td class="libdoc" valign="top" align="center">25</td><td class="libdoc" valign="top"> No replacement.</td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04AHF">F04AHF</a></td><td class="libdoc" valign="top" align="center">25</td><td class="libdoc" valign="top"> No replacement.</td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04AJF">F04AJF</a></td><td class="libdoc" valign="top" align="center">25</td><td class="libdoc" valign="top"> No replacement.</td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04AKF">F04AKF</a></td><td class="libdoc" valign="top" align="center">17</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07asf.xml">F07ASF (ZGETRS)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04ALF">F04ALF</a></td><td class="libdoc" valign="top" align="center">17</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07hef.xml">F07HEF (DPBTRS)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04ANF">F04ANF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F06/f06eff.xml">F06EFF (DCOPY)</a>, <a class="rout" href="../F06/f06pjf.xml">F06PJF (DTRSV)</a> and <a class="rout" href="../F08/f08agf.xml">F08AGF (DORMQR)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04AQF">F04AQF</a></td><td class="libdoc" valign="top" align="center">16</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07gef.xml">F07GEF (DPPTRS)</a> and <a class="rout" href="../F07/f07pef.xml">F07PEF (DSPTRS)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04ARF">F04ARF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07aaf.xml">F07AAF (DGESV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04AWF">F04AWF</a></td><td class="libdoc" valign="top" align="center">17</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07fsf.xml">F07FSF (ZPOTRS)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04AYF">F04AYF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07aef.xml">F07AEF (DGETRS)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04AZF">F04AZF</a></td><td class="libdoc" valign="top" align="center">17</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07fef.xml">F07FEF (DPOTRS)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04EAF">F04EAF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07caf.xml">F07CAF (DGTSV)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04FAF">F04FAF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07jaf.xml">F07JAF (DPTSV)</a>, or <a class="rout" href="../F07/f07jdf.xml">F07JDF (DPTTRF)</a> and <a class="rout" href="../F07/f07jef.xml">F07JEF (DPTTRS)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04JAF">F04JAF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08kaf.xml">F08KAF (DGELSS)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04JDF">F04JDF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08kaf.xml">F08KAF (DGELSS)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04JLF">F04JLF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08zbf.xml">F08ZBF (DGGGLM)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04JMF">F04JMF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08zaf.xml">F08ZAF (DGGLSE)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04KLF">F04KLF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08zpf.xml">F08ZPF (ZGGGLM)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04KMF">F04KMF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../F08/f08znf.xml">F08ZNF (ZGGLSE)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04LDF">F04LDF</a></td><td class="libdoc" valign="top" align="center">18</td><td class="libdoc" valign="top"><a class="rout" href="../F07/f07bef.xml">F07BEF (DGBTRS)</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04MAF">F04MAF</a></td><td class="libdoc" valign="top" align="center">19</td><td class="libdoc" valign="top"><a class="rout" href="../F11/f11jcf.xml">F11JCF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04MBF">F04MBF</a></td><td class="libdoc" valign="top" align="center">19</td><td class="libdoc" valign="top"><a class="rout" href="../F11/f11gdf.xml">F11GDF</a>, <a class="rout" href="../F11/f11gef.xml">F11GEF</a> and <a class="rout" href="../F11/f11gff.xml">F11GFF</a> (or <a class="rout" href="../F11/f11jcf.xml">F11JCF</a> or <a class="rout" href="../F11/f11jef.xml">F11JEF</a>)</td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#F04NAF">F04NAF</a></td><td class="libdoc" valign="top" align="center">17</td><td class="libdoc" valign="top"><a class="rout" href="../F06/f06skf.xml">F06SKF (ZTBSV)</a> and <a class="rout" href="../F07/f07bsf.xml">F07BSF (ZGBTRS)</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="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="ref116" id="ref116"/>Lawson C L and Hanson R J (1974)  <i>Solving Least-squares Problems</i> Prentice&#8211;Hall </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="f04conts.xml">F04 Chapter Contents</a></div><div><a class="chapint" href="../../pdf/F04/f04intro.pdf">F04 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>