Applied Numerical Linear-Demmel
Applied Numerical Linear-Demmel
8
“This routine is important enough that i bas been stasarized as 0 Basic
Linear Algebra Srowtine, or BLAS, which shouldbe wailabieon all chines
[N67] We disens the BLAS at length in section 2061, ad documentation
fn sample implewentations may be found at NETLIB/blas. In particular,
see NETLIB e-bin/ epg pl/as/sarm2.f fora sample implementation
{hat Is propertles 1) and) but not 2). These sauple implementations are
Intended to be sarting points for Implementations specaled to particular
sehitetures (an ease problem than prodoing completely porte on, 38
quested In this problem), Ths, wen writing your own numerical software,
sou should think f competing aa building block that should bo avilable
Jina numeial brary oa each machine.
For another earful implementation of 2 0 (4
You ean extract test code fon NETLIB/blos/slatt co se f your imple
mentation Is cereal implementetios tuned in must be thoroughly tested
swell timed, with times eomnpared to the obvious algorithm above on those
ass whore both ru. See how close to satisfying the thre conditions you ean
cexne; the frequent use of the word “nearly” In eondtions (1), (2) aed (8)
‘hows where you may compromise n attaining one condition i onde to more
rary attain another. In pater, yoo might want t so how mach ease
the problem if you mit yourelf to machines running IEEE arthmote
Tint: Assume that the values ofthe over and undertow thresholds are
salable for your algorithm. Portabe software fr computing these vals
ailable (eo NETLIB ein netbget.pl/Inpoc tl sameh.),
QUESTION 1.20, (Basy: Mein) We will us » Matlab program to illustrate
how sensitive the rots of polosnial ean be to stall perturbations in the
ceicients. "The program i wile” HOMEPAGE, Matis polyp
Inston »
Palyplot takes an input polynomial specie by its roots a then ads
random perturbations t the polynalal eoalieats, ampules tbe peered
roots, nd pls sae. The tps re
1 vector of oats of the polyeial
{¢— masiminseative pertnrbation to make 10 each coteent of
the polyol,
‘m— numberof random polynomials vo generate, whose rots are
pote
1. (ay) he fist part of your assignment isto rn this program forthe
falowing inputs. In al eases coo high oh Ut ou ge 8 fly
‘dense pl ut don't hve co wait oo long. m — Te hare pecs
1000 ero. You may want to cisnge the aes of te lot if the graph
1s to stall oto large
oC}; = Ted 104, 165, 166, 107, 108,
# £(1:20};¢ = 169, el, 1013, Les,
2 F-24816... 1021 eto, 162, 108, Lot (la this ease, use
‘xi fet-) and srlloes(reale1) mag). )
[Aloo Uy sour ova exampie with comple conjugate rots. Which foots
2 (Aedium) The soond part of your ssignment sto modify the program
to compute the condition number e() foreach root. Tn other words,
relative petirbation of «in ach coeicient should change root) by
‘most about et), Modify the program to plot circles centered ar),
with od ee), and confirm that those cireks encloe the peeturbed
roots (at last wen is stall enough tat the Fneaization used to
erive the coniton ner acer). Yu shal tra i 8 few pls
with ices sad portrbeeigenvalies, and some explanation of what
sou observe
1. (Afedin) Inthe lst pt, atic that your foetal fre) “bows up if
‘v(e) — 0. Thisconaltion mans tate) is a mail tof pla) ~ 0,
‘We ean sll expect some accuracy in the commuted valve of multiple
root, however, el inthis part of tho question, we wil ak how sensitive
‘multiple root can be: Fist, write pla) — a) (2 — n) where
eG) = 0 and m sche mulkpicty ofthe root 1). Then compute the
‘m roots nearest (of the slightly perturbed polsnomil pz) ae,
land show that they die frm ri) by fe. So that if m — 2, for
instance, the rot ri) perturbed bye, whieh is much larger than
Cif kL Higher vale of m yield even larger perturbations. Ie is
‘roandrchineeyilon ane presents rowing etor in compu the
root, this menus an mtyple rote low al but 1th os Sgt
is0 Applied Noserical Linear Algebra
Question 121. (Median) Apply Algorithm 1.1, Beton, to fad the rots
af x2) — (2 2)" = 0, wher p(2) is evaluated using Horner’ rule. Use the
Matlab implementation ia HOMEPAGE/Matlab/bisce.m, or ese welte yout
‘own, Confirm thst changing the Input Interval lightly changes the eormpted
‘oot drastically. Movify the sgorthm to uso tbe eror bound dseussed inthe
text to sop biceting when the roundoff etor Inthe computed value of p(2)
es 0 largo hat its sign cannot be determined
Linear Equation Solving
2.1, Introduction
“This chapter discusses perturbation theory, lgoithns, and errr analysis for
solving the linear equation Az —b, "Tho algrthms are all variations on
Gaussian elimination. ‘They ar ell diet methods, beans inthe absence
of roundoff exor they would give the exact solution of Ar = b afer nite
rumber of steps. In entra, Chapter 8 dnesses iterate mets, which
‘amp a saqence 91,42, of eve better approsimateslitions of A
Tone stop iterating (eompating the ext 2.) whea is accurate enough
Depersdingon dhe mate A and the speed with which x eonverges to ~ A",
‘det method or an erative nuethod taay be faster or ture accurate. We
wil dsciss the relative merits of diet and Reraive methods at length in
‘Chapter 6. For now, we will just say that det methods are the methods at
sie when the user as no spectal krowhge about the source? of matrix A
fr when a solution Is requlved with guseanted stability nd In a guerantes
‘mount of te.
"The rst ofthis chapter is ongantze a follows, Section 2.2 dscusss per-
turbation theory for az —b; it forms the bas fr the practical error bain
in section 2, Section 2:3 derives the Gaussian elimination algorithm for dense
ratios, Section 2:4 analyzes the erors in Gaussian elimination nnd presets
practical ertor bounls. Section 2.5 shows how to improve the securaey of 8
‘olution computed by Guise elminstion, sing a simple sind inexpensive
iterative method, To get high speed from Gaussian elimination and other
Tinene algebra algorithms on contemporary comptes, eae mast be taken to
‘nyse the computation to reper the computer memory organizations this
ie diseussed in section 25. Finally, section 2-7 discusses faster variations of
‘Gaussian elimination for natiiees with spell popertes coamnoaly aes in
practice, such as symmetzy (A~ AP) or sparsity (when many ents of Aare
20)
a2 Applied Noserical Linear Algebra
Sections 22.1 and 2.5.1 discus ecent innovations upon which the sare
In the LAPACK trary depends.
There are 9 sacely of opm problems, which we shall mention 8 we gp
slong.
2.2. Perturbation Theory
Suppose Az = b and (A | 6A)2 — 0-4 Ab; our goal Isto ound the norm of
fies — sr, Wosimply subtract thes two equalities and rlve for A one way
to do this sto eke
(Ay sAyeey 82) = 04 a
- lar = 4
Tae TAT Ear Bb
ind rearrange to ge
fe AN -BAB 48) ey
‘aking norms aad using pat 1 of Lemna 1.735 well the Lange inequality
far vector norms, we get
[6 < FA (IGA + 1. 2)
(We have assumed that the vector norm and matrix noetn are consistent, af
defined in sesion 17. For example, any wetor orm and its induced maleix
‘oem wil do} We ean farther rearrange this inequality 10 get
Wel 4-1 i
ee aii) ta
“The quantity nA) = 4°] tbe conton mambo?” of the ate
A, because eases be eltve eange Ae inthe answer os «lie
ofthe rave cha Ht in he dt, (Toe repro, we nd Yo show
‘tat iequaly (22) Ian equal for som sonar coke fA an 8;
Ctiewist (4) woul ony be a per bound ete coon uma, See
veion 23) The quant mukipyng nA) wil be sal 54 aS re
ttl yelling sll poe bur on the ete err eh
“the upper bond depts on Se va) ch mak i sem hd 0
interpret satay te sn prvi, ane we nwt compte
ston and cn scien te und. Ween le derive
* hey mae atte hound tnt dos pedo 8 flaw
"Gas pt, sion mb with pct pon mai
inves inn te r,t wt
Linear Bavation Sosing 8
cua 21 Ul aay JABS UAL BL Then LX 1 ne tha
FOX ie inentibe, X= SEX", and XPS oe
Proof. ‘The sum 32%y Ni sid to converge i and only ft eons in
‘each component. Wert the fact (fre applving Lemma 1.4 to Example 1.6)
that fr any acer, there is constant sh that [gl & e- IX]. We then
a0t (Xl Se-| 83] Se- [so each component ofS: X" is doainted by
‘convergent goometrie series SANS and must converge. ‘Therefore Sy
Sty AT converges to same $ asim — oc, and (I = X)Sp = (F = XY +
KEKE eee) XH OT as no cy since [XI < JAP
‘Theeetore (/—X)8— J and 8 = (UX) ah
Ngee s Pees EE i ©
Solving out fst equation Baz + (4 + 3Atx = 4b for br yields
fr = (AY 6A) *(—6Ar +80)
= [AU + AA) ae 480)
= AMAA be + 80,
“Taking norms, ving both sides by 2 using ect 1 of Lemma 1.7 aod the
triangle inequality, a asin that 8 8 small enough so that JABAL =
4% fb <1, we get te desire bound
Mak gr acinar ay gat (reay HO
Wa [Salas [4-4 Lerma 2.1 impies thot 1} A-H8A
invertible, ae so A+ is invertible
"a sow the minimum equals pa, me constrict & A of oe ge
rch that As Ae singulr. Note that sine [4H ~ mayaa A,
Aber xs az seh ct fle = Land LAH = 4a > 0. Now ke
a= hs sols 1. Let 6A hr.
Ten
in
ala = may
Malla = meg it
wore the maximum i attained when =i ony nonzero multiple y, and A 8A
singular because
(by ay 0
ho
We have now seen thatthe distance to the nares ikposed problem equals
the reeiproeal of te eoudtion number fortwo problems: plyonia evalation
fant Tneer equation solving. This repeal relationship ls quite common In
‘numerical sls (70)
ere sa slightly diferent vay to do perturbation theory for Az = by we
wil need Ie to derive practieal erro bounds later in section 2.44. IF s any
‘eetor, wo can bound the difrence 8z = 2 ~~~ ~1b m folows. We let
5 = Abbe the residual of 2 the residual rs zo If = x. This lets us
wwite Sr = Ar, yielding the bound
[2 = 1A < LAD es)
"This simple bounds atesetive vo use in pete, sine Fs easy to compute,
sven an apprasinate slstion & Furthermore, thee is no apparent etd 10
fstlmate 6A nd 6. ta fet on two approaches ar very eloslyroated, 96
Shown by the next thor.
‘Tunoneat 2.2. Let r= Ab—0. Then there exits «6A such that Al — fh
and (At BA\E = be No 6A of saler norm and sting (A + BA} 6
ois. Ths, 6 i the smallest possible nclward exer (measure norm)
‘Tis is tre Jor any ceton nora end induced nor (or =p Jor wears
‘end Ie for matrices)
Linear Bavation Sosing 3
Prof, (A+ 6A = bi acd only 54-3 =b~ AB = —r, 0 l= IAB S
1S, implying Isl >. Wecomplte the proof ony for he we- nom
and is duced matrix norm. Choowe 5A = 347. We can ely verity that
54-8 ——+ nd la = et.
“Tos the ale [htt cul! yi an siping (A-44}8~ Band
= Abbie gen by Theorem 22, Appling ere nd (22) ith 8 0)
ie
vs art (EE) = 14-40
te ae ou (28.
‘All cu bounds depend te aby 10 etna te calito sander
ai EA“, We tar to this probe a sction 2.43. Coon aber
‘stats ae comput by LAPACK rons sith a goer,
2.2.1. Relative Perturbation Theory
In the list section we showed! how to bound the aor ofthe enor x = — 2
inthe approximate solution of Az ~&, Our bound on [zl ws proprdional
to the conition number (A) = AAI mes tenors and [8],
where sisis (A 6A)2 6:48
Tn many cose this bound ie quite satisfactory, but not always. Our gol in
this section isto show when i is tow pessimistic nnd to derive an alternative
perturbation theory that provides tighter bounds. We wll use this perturb
on theory late in seeton 2.1 to joni the error bounds eaapaby the
LAPACK subronties like gests
This seetion maybe skipped on a frst rvding
Here isan example whore the eeror bound ofthe last section is much to
pessimist,
EXAMPLE 2.1. Lat A= diag) (a dlgonal mates with entries any — 9
fad e22 = 1) and 6 ~ [91], whan > 1, Thon — A" = [1]. Any
roxsonabledret method will solve Az ~ 6 very seeuraely (sing two divisions
‘fag to gee ye the eonition number mA) — 7 may bo arbiter lange
Therefore cur error bound (2.3) may be arbitral
‘he retson that the condition number x(A) leads us to overestimate the
‘roe is that hound (2.2, from which ie comes, sume that 84 is bounded
in morn, but és otherise erktrry this ned to prow that bond (22)
i attainable i Question 23. In contest, the 64 eoresponding 1 Ue asl
rounding eerrs isnot arbiteary but has a special structure not expired by
is norm alone. We ean determine the salest 6A coresponting to for
‘ur prablem a follows: simple rounding erzor analysis shows that —
(Oia) (E+), wheee |] Se. Thus (oat au —b We may rowste this% Applied Noserical Linear Algebra
as (AF 6A} ~ b whese 6A ~ ding yay, S403). Then [A] can be as lege
tax; [eag| ~£7- Applying eror bound (23) with 3 0 yields
eee
ws <7() 9
In contest, the setual error stifies
Wel = e—ahe
[Lei 3 fore DL
= [Bei
Ha)
- (ie Saga
ae sete,
shih iv about 7 ies stale. ©
For this example, we can dscibe the structure ofthe actual A a flows
loo < dla, whore cba ny number. We wete this more suesnety es
[fal saa] e8)
(eset 11 for notation). We abo say that 6 i «small eomponentise
‘elaine pertrtnton in A. Since A ean often be me to satisfy bowl (2.65) in
pret, along with [6 < [l(a setion 2.51), we wil derive portrbation
{heey using thse bounds 0a 5 a 8.
‘We begin with equation (21:
Be Asa 4 8b)
[Now take absolute values, and vepetedly usw the tangle Inequality to got
lia] = |a-l(—sae +40)
AM" a+)
[Nel al +e)
ALD
‘Now using ny wotor norm (ke the ini
TTI [ll we go the bound
one. of Frobenius norm), where
[oe < ellAHCLA = + en
Linear Bavation Sosing eo
Asuming forthe moment that 8b = 0, we can weaken his bound to
I< ela ANE 18
Wel ya
te
“This eal us to die kom A) = 14-4 -[Al 99 the componente relate
canton numberof ors relative condition nub shor. I me
tes alo elle ue Rau coulon rrr 8) or Skea eon tunes
[aa 224 25, Fora pot that boul 21) and (2) ate ata soe
ueston 24
Teel at Toren 2.1 elated the conton number xl othe dance
fron othe nearest singular tate For ase Interpeaton of wont),
see 7, 206)
EXAMPLE 2.2. Consider our curler example with A ~ dingy 1) and 8 =
[ps1 Tes easy to conti that went A) — 1, sine [AMY] [A] 1. Indeed,
‘ken(A) = for any dlagoaat mat’ 4, eapturing ou intuition that a digoaal
‘tem of aquttions should be slble quite accurately. ©
ill ea)
More generally suppone Di ny nonsingular diagonal matrix and Bis an
arhitraryronsinglae matrix. Then
kealDB) = | KDB) (DBI
[1-Day
1B" 101
= mont Bh
‘This means that 1 DB 1s badly Sela, i. Bis welLenniionsd but DB
's badly conditioned (because D has widely varying diagonal ects), then
we should hope to get an aoeurate solution of (Di}2 ~b despite DB's ie
‘conditioning. This discus further In sections 244,251, and 2.2.
Finally inthe last sation we prove an error bound using only the
residual 7 AB
U6el|= LAME SHA“ es)
Whore we avo use che tingle Inequallty. In secon 24.4 we wil sce that
{his bound ean sometimes be mich smaller than the sinular bound (2.5), in
particular when Ais badly sealed. There i aso an analogue to Theerem 2.2
hist
“Tupone 2.3. ‘The smallest «> 0 such tha there exit 8A < eA ond a =
setifping (A5A2 ~ 86 sella the components relative backward
ferots mny be expressed in terms ofthe residual r~ Az ~1 as follows
compel
Ta* Applied Noserical Linear Algebra
or prof, see Question 25
LAPACK routines lke agesr: compute the componentwise backward ee
stlveeroe¢ (the LAPACK favable nin foe ¢ is BER).
2.3. Gaussian Elimination
"The base algorithm fr saving Ax = bls Gaussian elimination. To state it,
we fist aed to dene a permutation metre
DDeriutioy 2.1. A permutation mats P 4am identity matric with permuted
‘The most important properties of a permutation mtr are given by the
folloing emma.
Ln 2.2. Let P, Pa, and Py be nly permutation matrices and X be an
retyn matriz, Phen
1, PX is the seme 06 X with ts rows permuted. XP isthe same as X with,
‘ts clans permated
2 Per,
3, deur) = 1
A, Ph Pe i also a permutation matric
Por a prof, see Question 26.
[Now we ean state our overall algorithm for solving Az =.
Auconrrin 2.1 Solving Ax = using Ceusionelininetion
1, Paelorice A nla A= PLU, where
P= permutation mates,
1 = init liver tlangular matri (with ones on the agonal,
U = nonsinguar per triangular wai
2, Solve PLUS ~b for LU by prmting the entries of bs LU = Pb =
Pp,
8, Solve Le = P% for Us by forward substitution: Ux = L-*(P-).
A, Solve U2 = LH P-*8) for by back substation: 2 = 0-H" P%,
Wi wil derive the algorithm fo factorizing A = PLU i sever ways, We
begin by showing why the permutation mate P is newssay.
Linear Bavation Sosing 0
Darisrni0x 2.2. ‘The lealing by principal submatrix af A i ACL: j 19)
‘Tuwons 2. The folowing two sttements ore epeicalent
1. There rise @ unique unit lower triangular Land nonsinguer upper
triangular U such that A EU,
2, AU ading principal submatrices of A are nonsingular.
Proof. We first show (1) implies (2) A= LU may also be writen
Po Pee
An da
Lyn Ente
Tan Hain t Lai
where Ay is jby-jlening principal submatrix ane Lay and Ui. There
fore det Ag ~ esl) det Pan dey — 1° TE, Udon = 0 ince Ls
ni eongblar ad 1 i eianghl.
‘We prose that (2) imps (1) by induction on. Te is easy for by]
Imatioes @~ 1+. To prow it fr mby-n mates A, we me (ond unique
(0 T}sbye(a— 1) tingle matrices Feand U otigve (a I)by-1 vectors
Ad, ad unique nomena sear 7 sch that
oe ee
[By indvetion, unique nd U exist such Usa A= LI. Now let w= 1,
= CIV, sud ~8~ Ey, all of which are unique. The diagonal ens af
age nonateo by invetion, and = 0 sine 0 det) = de) -n-
"Ths LU factorization withowtpiving ean slo (welkenined) ron
singular matics such a the permutation mate
oro
por
roo
the I-by-t and 2by-2 eading pelapal minors of P are slagula. So we nod
to iatroducr permutations into Gaussian elinination
°
‘Tuvons 2.5. If As nonsingular, thn thre exit permatetions Py and Py
‘ami lower triangular matrix Ly ond 0 nonsingular upper trimgular mati
1 such that PAP, ~ LL. Only one of Py and Py is necessary.
(Note: PA reanders che rows of A, APY seoders the ents, end PAB,
reorders bthry Applied Noserical Linear Algebra
Proof As with many mates factolations, sles to understand block
2by.2 matics. More formally, we use induction on the dimersion n. Tt
eas) for I-by-l matrices Py = L— 1 and U— A. Assume that It
{tue for dipeasion » — 1. IFA is nonsingular, then It has 8 nowzero entry:
‘cone permtatlons Pf snd P% so thatthe (1-1) entry of PEAPE Is nonzero.
(Werte only one of Pf and PY sine nasingularky ples that each om and
ach column of has « nonzero entrs:)
[Now ae write the desired factorization and solve for the unknown eompo-
Tmt = [dele 309
[ad sot a | am
winre Azs nd Alas ae (n= I-bs4n =D
Solving forthe components ofthis 2-5-2 Bock factorization wo got wi =
f= 0, Ue = Aaa and Lay = Aa Snoe wry~ an. = 0, we ea soe for
Lay = Ba. Pilly anUia + Aaa — Aas itplics Aaa = Aza ~ Lal
We want 0 apply indvetion to Aga, but to do so we nat to heck that
det Any ~0: Since det PRAPS Edel AO and abo
1
arses
9) da [U2] 1-0
ees ee
“rh ent ex eates Aan tt Fhe
Satin nt ein es a
nae = [2 9][S wider]
[at] ote] [%! ote]
[A aral[S [6 a]
[alfa EEE NLS a]
sme ge the desired fctoriaton of
nan = (3 8le)aCal2 8)
aia f]C3F) »
Linear Bavation Sosing 41
"The next two corals state simple ways to choose Fy ad Po uarantce
that Guusianelanation wil succetd on a tonsngular tates
Conon 2.1. We cam chase PL 1 and Ps that ay i the largest entry
‘mabe value ct, lich imple = 38 has eis Sowded By
{i absolute ets. Moe general atte fof Ganon elimination, whe
te are computing te th cat of we rede the rows 30 that he largest
nur i he colt som the ogona ‘This ellod “Cause elimination
{Sih portal pst,” or GEPP for ator. GBPP guarantees that ll entree
Of are toned by me in aboie wave.
GEPP is the most common way to implement Gaussian elimination in
practice, We discus its numerical stability inthe nest section, Another more
‘expensive way to choose and Pe is given by the next corollary: Its slmost
owe use in praetic, although tere are race examples where GEPP fas but
the next method seen in computing an acute mse fee Question 21).
Wo dseas rity i in the next eon ml.
‘ConouaRy 2.2. We eam chose PY and Pl so that ayy he larest entry
‘absolute value ithe whole tatr More generally, a! step of Gasian
lamination, were we ore computing the ith column of Ly we render the rows
‘and colar stat the lyst entry in the atric ison the agonal. Ts
fall "Goasian elsnination with complete pivoting,” or GECP for shar.
‘The following algorithm embodies Theorem 25, perforng permutations,
‘computing the fst colunn of Za the frst row of, and updating Aza to get
Arg — Aza—IayUa. Wo wrote algorithm fst in conventional programming
Innguage notation snd then using Matlab notstion,
Aconrmit 2.2, LU fctrisation with pivoting
fort ton-1
‘apply permutation soa =O permute Land U 100)
7 Jor example, for CEPP, soap rows } andi of A and of L
tere [al the largest entry om (AU: m8
for CECP, swap rows j and tof A end of L,
tnd colamns kari ofA and of
tare laa the lagest entry im [AG sm) 17
/* compte colon sof (Lan 8 (210)) *7
fos Nt
y= anlaa
end for
7 eampute ow of U Win 60 240)) */
for sito2 Applied Noserical Linear Algebra
fend for
7 wplate Aug (0 9c Aaa = Aaa ~ Lata (210)) */
frit tion
fork =i 1100
= Hs
nd for
end jor
nu or
‘Note tht onc column fof 4 is used to compute cluma if it is never
‘ve gin. Similarly, cow i of A i never used agin afer commuting row fof
U, This bts ws overwrite Land U on top of Aas they are computed, 0 we
ree no exten spice to store thems; L oeties the (ret) lamer trang of A
(the ores on the cago of Leave not store expt), ad L aocuies the
Upper telnale of This simples the slgortha 10
Aucontmns 2.3. LU factorization with pivoting, oveneriting Land U on A
Jori=1ton=1
any permutations (re Algrthn 22 for details)
fojeiiiion
fy = ay/04
endfor
frp si.ion
fork ition
endfor
endfor
nd for
‘Using Matlab notation this further reduces to the following algorithm,
Auconernt 24. LU factorization with pivoting, oveeriting Land U on A
Jori=t ont
‘apply permatations (ste Agorithm 22 for details)
AUCH) = AU ET my /ALA)
AW Limé tin) =
AGH Lin pen) AGF Lim spe ait ten)
end for
Tn the bast tine of he algorithm, AGC 18) +AQi E41) he produce
ofan (0 byet sme (Ly) by aby) mate (iz), Whi yl
(oOybysa 4) mat
Linear Bavation Sosing as
‘We now rere th lgoritn fom scratch starting fom perhaps the mont
familie deserption of Gansian eliaiaation: Take each row and subizact
multiples of i from Ince rows to aro out te ents below the disgot.”
‘Translating this dicetly into nage yids
foct=1eon—1 {for ca row £*/
for j= F4 1 tom fF subkract a multiple of
ose | fren ow = */
fock=tton ft eolomansf ibeough m . */
fn — ayn Sow /* to aco out colon t
‘below the dingonal */
nd for
nd for
nd for
We wil now rake some improvercns o this algorithm, modifying unt
it becomes identical to Algorithm 2.3 (except for pivoting, which we omit).
First, we roomie that we ned not eampite the tr entre bel he ig
‘onal, beau re ow thy are ero. This shortens th loop to vied
foci=1t0n—1
frst 110m
fock=i 4 Tton
en = On~ Sou
cd for
end for
for
"The next performance improvement i 10 ompute $ outside the nee
Joop, sine tf constant within te Inner loop
fort=1ton-1
forj=i4ttom
he
end for
forj 4 tion
foc k=i+ Tton
= Hel
cd for
ead for
od foe
Finaly, we store the multiplier ie the subdiagonal ents ay that we
crginally serod out; they are notre for anything es. This yes Algo
then 2-8 (exept for posing),“4 Applied Noserical Linear Algebra
‘The operation count of L1 is dane by eepacng ops by sumations over
the same range, ad nor loops by tei operation counts:
a(S-25))
Fon .4ne—o% = 2a 00
The forward and back substitutions with L and U to compote the solution
cof Az — b ont Ofr2}, so overall solving Az ~ b with Gasian elnination
fants $n? O(n) operations. ere we have wed the fact at S22
sme 2) + Ofm). This Formula enough to get Ue high ont ten in
the operation cou.
There is moee to implementing Gaussian elimination than writing the
nested loops of Algorthin 22. Tadeed,dopendig on the computer, progean-
‘ning language, and matrix san, merely interchanging the Int two loops on j
ne can change the execution tne by ores of magnitude, We diss this
fat length in section 26
2.4. Error Analysis
Recall our two-step paradigm for obesining error bounds for the solution of
Arh
1. Analy roof errors to show thatthe rt of solving A = Bis the
‘eet soliton # of the pertrbed liner system (1+ 54) — 6 8h, where
[And bee sna. This a example of backward eor analy, a
A and ae eal the tached ero
2. Apply tho peeturbation theory of setlon 22 10 bound the error, fe
‘example by using bound (23) o (25)
We tne wo gl in is eto, Th fst i to stow how implement
Gonsin nonin rt ot token se sal
Tn portal, we nul! He ohnep 4h and anal ws Of). This a
stale necan eet toma then he mt odin he ents
Gf (ord) ot io the Boing pot fran rake ee (or a
{hav Unt ues we are eel abot ting Ea nel a Be
Stal We ates ts nh es ec
“nese ao dre patent eor bonds which re skaneoy
cir tocampio ad "ugh La, chet tho tres er I tn On nk
{ita bouts or [64D th we cn formal rove ae gral meh ger
‘inn th es enounare in prac, eee, pret er bss
{insaton 244) lyon theconpua dal” Asan bound 3),
Linear Bavation Sosing %
inne of bound (23). We ako nod 4 be able to estimate (A) inexpensively
ts s discus in sertion 2.43.
Unfortunatly, we do not have error bounds that lays sts our twin
sous of cheapness and tightness, that simultanoouly
1, cost» peslgble amount compared to solving Ar = & In tho ist place
{for example, that cost On) flops versus Gausian elimination's O)
ops) and
2 provide an ere bound eat Is always at lasts largo as the tue error
[and never tore than constant factor Inge (10 times large, 9)
“The practical bounds in section 2.44 will cst O{n?) but will on very rare
‘ceceslone provide eror bounds that are much too small of much to large.
‘The probblty of geting a bed exor bound so sina hat these bounds are
Widely used in pretice. Tho only truly guaranteed bounds use either iteeval
athmete, wry high reson arithmetic or both anlar several tes roe
expensive than just solving Az = b sc setion 13)
Te has in fac been conjectured that no Bound sitistying our twin goals of
popaess and tightness exist, but this remains an open probe
2.1. The Need for Pivoting
Lat us apoly HY atoruation witout pong to A= ("1 ue
decimal dg fating point arithmetic and se why we get the wrong answer
Note that a(A)~ [An [~~ 4, 50 ATs well condoned ad ths we
ould expect to be abl o solve Ar —b aceuratly
°
1
+ [rates |
J 930°)
= [gg ota |p ML= 101 caw — 104
om [ae ][ oe -['8 a]
but A= le :
Note thatthe original azz has been entirely lst” from he computation by
subtracting 108 from i We would have gotten the same 14 factors whet er
(ty Bad Dees 1,0, ~2, oe any umber such Ua ese 108) ~ 108. Since
the algorithm proces to work oly with Zan U, i wil ge he same answer
foe all these diferent az, wich correspond to Completely diferent A aid
s0 completely diferent 2 — ats thee i no way Io qunraate an seeurate
‘answer. This Is elledmumerical instability, sine L sad U are not the ext6% Applied Noserical Linear Algebra
factors of s matrix clove to A. (Anathee way to say this that JA — EAI 8
bout as large as A rather chan eA.)
Tat uss whist happens when we go on to solve Ax = [12)7 for using
this LU foctoriatlon, The coret answer Is ~ [11]?, Instead we get the
folloyng. Solving Ly ~ [1,2 gles yy ~ 1/1) ~ 1 and yp = (2108-1) ~
10 note that the valve 3 as boon Tet” by subtracting 10" fom it. Solving
Uz = y yds 4y — (109 (10%) = 1 and #4 ~ A4(1 —1)/10-9 — 0,
oxmpltey erroneous slo,
Another warning of the loss of accuracy eames rom comparing the con-
Aisin number af Ato the condition number of Fad Recall tht we
‘ansfo the problem of solving Av = B into solving two other systems with
Land U,s0 we donot wa the condition aumbers of oe to be auch target
than ths of A. But le, the condition number of Ais about 4, wheres the
endiion numbers of Zand are about 10
Ta the next section we wil show that ding GEPP nearly always eliminates
the Instability jst Ilustrsted, In the above example, GEPP woud have r=
‘ersed he order ofthe two aqutions before proceeding, The rede i Invited
to cone that in this case wo would got
fee ( as
sion 1] [or
sot :
[5 aa aon-y]=[0 1]
tint LY oon aie mente Dah Lad U rie wh
Sadia, a0 5. Tho conte wlton vet bss qe aur
2
er i the intstion behind our error anabss of LU deompoiion. If n=
tected quantities arsing inthe pede =U are very large compared 10
TAL, the information in eats of A wll gt “ot” wn thie large valves
tre subtest fom then. This it what Hnppened 9 az i the expe in
fection 21. If te latermdiate quantities in the product L-U were stead
comparable to tose ofA, we would expect a tiny backard ezor ALU inthe
{sctorization. Therefore, we want to bound the largest laterite quantiles
In the product £1. We will do ths by bounding the entries of tho matrix
|) [U1 (40 setion 1.1 for nattion).
(Our analysis analogous to the one we used for polynomial evaluation
In section 1.6. There we considered p = Sojait" and showed hat if | were
mmparable to the sum of absolote ales 5, Ja", then p woud! be earnputd
secortel
‘Mier prseating « general analysis of Gaussian elimination, we will use
51 to show that GEPP (or, more expeasively, GECP) will ep the eas of
|1)-|U|eomporuble co [A tn almost all praia! eveunstances,
Formal Error Analysis of Gaussian Elimination
Linear Bavation Sosing
Unfortunately, the best bounds on 6] that we can prove in genera are
still nh larger than Ue errors encountered in pence. ‘Thereor, the error
Funds tt we use ia peaetice wil be based a the ened sil rad
rund (2.8) (or bound (29) iste of the sigorous ut peste bound! in
this section,
Now supe that matrix A has alway been pivoted, 50 the notation is
siopler. Wersimplify Algoritha 22 to two equations, one for je with j = &
land one for jk, Let fist trace what Algrithin 2.2 does to ae when
JS K this clement i repeatedly updated by subtrseting Fue foe t— 1 10
JL and is aly assigned to us that
When j > ky as ain ts Lye subtract for = 1 eo k~ 1 ad then the
rest sum is divided by nye dase 0
ie SE ie
ty BE
"Todo the roundoff eror analysis of these to formulas, we use the rst
from Question 110 that a dot prodet computed in Dating point axthneie
satis
8( Sam) Yan 16) wi se
‘We opply this to the Formula For wp, sling
a= (om —F twat + ‘) are
wit fi SGD ad 6. Song raw
i = phpuctis + SET jwa(l +). snee by = 1
Shastawa + Fh stam
with al SG — te and Tg
= Shalima + Ba
where we ean bound x by
el = [QO berm 8) al Inala = net WD ie
fren ae Bat the alba st Spend ca th era una8 Applied Noserical Linear Algebra
Dain the see analysis forthe formula for fy yds
satay (02a 2)
with 6 < (=H, [6 Se, ad [6 Se, We salve for ay to 5
Seale + byte +4)
oe TT
ri
= Stine +S tsads wi 4
rar
with [6 ns, and so [Bl $ n(| [Ul a8 before
‘Altogether, we ean summarize this errr aalyle with the simple formula
A= 10 4 £ where |B < ne -|U]. Taking noes we get | < ne} (|
[10h tthe norm des nt depend on the signs ofthe matrix entries (tre for
the Frobenin,infins and one-norms but no te two-narm), we en simpy
this to [ES nell IU.
"Now we consider solving the rest of the problem: Lr — 8 via by —
tnd Us ~ y-_The rel of Question 1.11 shows that solving Ly = b by
forward stitution sels capt sltion jsatiniing (1 82.) — 8 with
[aE] < nel E). Similarly when sling Uz fj wo gee saisying (+ 6U}2 —
with 60] < nO
Combining these yes
b= Hane
= +60) +0 \2
= (LU 1A + 61 4 LUE
(A= Bau LU 4 S180 ye
(AY SA\E where 6A = —B 5 LAU SY ¢ 6180.
‘Now we combine our bounds on BSL, and JU and we the tangle inoquelty
to bound
[bal = | cau yaw 4 s1au
[B+ (280+ BE) + ara
JL 12 -[aU] + a4) - 12 + an 60
lb) + mel IO + ne O83 IU
‘nel
enn
Linear Bavation Sosing “9
‘Taking norms and ensuing I 1X] [= [I (rv as before forthe Frobe-
sia, infty, and acorns but nat the twos) we get [6A < Snel
Wwe
‘hus, to sae when Gaussian oinination jy backward stable, we must ask
when Sei [UI OCIA then the BSE nthe perturbation theory
bounds wll be Of) me wo dese (ate that A= 0).
"The main empire observation usted by decides of experience, stat
GEPP almost aways kes ILI IU ~ lll. GEPP guarantees tha each entey
fs bounded by Vin abolute ale, 0 weed consider only IU. We define
the pivot growth factor for GPP os fro ~ [he Alm [Ae
imax | 30 stability i equivalent to gor being smal or growing slow 089
fonetion of pati, gr sent alg no ks. To aero tieor
soemns to ben" or perhaps ven jut [20 (Soe igure 2.1.) This makes
‘GEDP the algorithm of cir for many probiens. Unfortunatly, ter nee
rare examples in which ger can be a large as 2!
PROPOSITION 2.1, GEPP quorantes that gee <2°-!, ‘This bound is tan
ble
Proof. The frst sep of GEPP updates de ~ aye fy tay where [1
and Ia = [ul e502 mi se So eo of the n= 1
‘ajr segs of GEPP eat double the sae of the ealing trix eee, and
wwe ge 2" as che overall bound. Se the example ia Question 2.14 vo se that
{i ataloabe.
Potting ll thee bounds ogee, we get
6A < Sterne Aly eu
singe [jc j +1) (00
section 46). Then we wll apply a stop of QR iteration impiety, i,
without computing Q oF maliplying by it explietly (xesetion 4.48),
This wil ree the cost of one QR iteration from Otn!) to O(n) and
the overall eos from Otn*) to Ofn') as desi
When Ais syrmetsic we will educe i to tridiagonal frm instead,
ducing the cost of singe QR version further to O(n). This isdseussd
In section 4.47 and Chapter &
2 Since complex eigenvalues of rel musics occur in conplex conjugate
‘is, we ean sift by 0; and simultane it tues out tht this
wal perait us to maintain real arithmetic (oe section 448). 1A is
Symmetee, al egenvals are ral, and this not an iso
'% Convergence oars when subiagonal entries of Agar “smal enough
‘To ap choose a precical ths, we use the notion of backward st
hay: Since pelea to Ay a silty transformation by an oe
‘ogo mates, we expect A, to have roundol ener af sie OA
14 poled Numerieal Linear Algebra
‘ty: Tetra signal ety f Asmar han OAL
inv ayn tl beat, so we tito ne Who
oper Heber ting yy ao wl abe Aa lok uot
tangle ace A ~ [ASA | whee Ay i yp ad Ay and
dla ne both Hosen. hehe sivas of Any and Aza may be
itu indopenenty tt te sieve of Wh altho aga
Socks ae st or ty the ath he fd
4.4.6. Hessenberg Reduction
Given a rol matrix 4, wo sok an orthogonal Q so that QUQ™ is upper
Hessenberg. ‘Tho algorithm i a simple variation of the iden se forthe QI
ecerponitin,
EXAMPLE 4.8, Woillstrat th gneral patter of Hessenberg reduction with
1 S:by-5 example, Rach Q, blow fm :by-5 Householder reflection, chose to
‘er out eatees #42 though min olor F nnd leaving entries 1 through
hn
1, Choose Qs 50
Qd-lorre ornare
Qj Jones the st row of Qi unchanged, and QF leaves the fist column
9f AGT unchanged, incuding the wero
2 Choe Qs 0
Q@ahi-|o F222] md e@agt-lor zee
Qs changes only the last cree ams of Ars ard QF loaves the rst t90
eolumns of QoQ unehanar neng the 9r
Ti wom och oe tino cath, racine wit he mr |
sc a a nw yh
{hp apayet tt ace bg! sti ev sgh eu the
TRAC at theo deaNonsymmetrie lgenvalive Problems 165
2 Choose Q 50
Qar=]o zz zz] wd A-Qagh-|o 2227
whic s upper Hlessenbeng. Altogether As ~ (4201): 1Q30203}
Qaghe
“The general slgorithm for Hesenberg reduction isa los,
AuconrTine 4.6. Ration to upper Hessenbeny form:
FQ in desir, set QF
fori=tin=2
a= Hlose( AQ)
PT 2uul 7° Q,= diag, P) °/
AGH Tetin) = Proales Limien)
Aen CF =m) = AM ess en) Py
FQ is desires
QUE Tm sen) = PF-QUEtemsem — #Q=Q-0/
ent f
ed for
‘As with the QR decomposition, one doesnot form P,explitly ut instead
mules by #—2uuf via metee-vector operations. The ws wetars ea ao
be stored below the subdgonal, inlar tothe QR decomposition. They ean
bo applid using Lael 3 BLAS, es deseibed in Question 3.17. This algorithm
iewalnble a the Matlab common! besa ofthe LAPACK rout sgabra.
"The nur of floating point operations Is easly counted to be Hse
(O(a), 0 Hs O(a! ifthe product @ = Qu-1-~-Q1 i eamputed as wl,
"The advantage of Hessenberg form under QR iteration feta costs only
6x? O(a) ps instead of O(n), snd ts oes preserved 80 that che mate
‘toms upper Hessenberg
Prorostniox 4.5. Hessenberg form is presero by QR eration
Proof. Itiseay toconfiem that the QR decomposition ofan upper Hessenberg
atic like Ayo yes an wpper Hessenberg @ (ine the jth eon of Q
‘61 linear combination of the ling jeolumns of A, ~ of). Then it is easy
Toone that RQ remaies upper Hsseabirg aud sing docs not change
this, ©
106 poled Numerieal Linear Algebra
DerinrnioN 4.5. A Hessenberg matric H is woredaced sf all subdiagonal re
Tseng to ae that His ede because yy — 0, then ts egealues
are thse of is leading -b4 Hesenborgsubmates aad is tralia (n—-b:
(m8) Hessenberg submatrix, s0 we nted consider onl unredvced tates.
4.4.7. Tridiagonal and Bidiagonal Reduction
IFAs symmetle, the Hessonborg redvtion proces leaves A symmeiie at
each step, 50 zor are erated in symmetie postions. ‘This means wo noed
‘work on only half the matrix, eucing the operation count to {n° O(n?) or
Fre + Of) to form Qu-ts.-Qi as wll Wo cll this algorthrn eridiaponat
‘eduction. We wil us this elzocthmn in Chapter 5, ‘This routine is avaible
ss LAPACK rostine ssytra
Looking shed it to our dscusion of computing the SVD in section 5:4
‘we real from scetion 3.2: tht the eigenvalues ofthe symmetric matric ATA
tar the squares ofthe singular values of A Our eventual SUD algihin. will,
tse this fact, so wo woul like to ind form for A wiih implies that APA is
tegiagol. We wll choose Ao be upper bidiaponal, or nonzero only on the
Aingonal and firs soperngonal. This, we want to compte orthogonal r=
Islets anl Vsueh that QAY is bidiagonal. The agorthn, cll itingmat
retion, is very sail Hessenberg and eiiagolrevetion,
EXAMPLE LD, eve i 8 bys example of diagonal redetion, wih ills
teats the general pater:
1 Gian Qys0
aa=|2 22 2|aivionmasqun=|2 222
1 2 Householder relleton, and Vs a Housholdereeletion that
leaves the fit column of Qh unchanged
2. Chom Q 0
Gea] 2522) andvisorime Ar =a] 2 2 22Nonsymmetse igenvalve Problems 16
Qa's. Houseolderseflection that eaves the fst row of Ay ochanged
Ug Houser retin that verte st to ols of Qa
change
3. Choose Qu s0
eda =] 9 FE 8) aad Vs = 1s at As = Qe
Qs's 4 Householder reflection that leaves the fist two sows of Ay ut
hanged. ©
In genera fA sry then. oe got artogona mations Q
fand VV" Vang sich that QV — A upper bingo
Nove that aA VEATQFQAV = VIATAY, so a7. hs the some
ciggnvalves as ATA Le. Abas the same singular vals 9 A
"The cont of this bidagonal eedveton i $x? | O(e!) Hops pus enather
42 O{n®) flops to compute Q and V. This routine salable as LAPACK
routiveagebsa,
1eQe
44.
QR Iteration with Implicit Shifts
le this setion we stow how to implement QR iteration dheply on an upper
Hessesherg mtr. The implementation will be mpi the sense that we do
ot expltlyeompuce the QR factorization ofa mati H but thee cousteuct
@ implicy as n product of Givens rotations and olber simple rthogonal
tines, ‘The impli Q theonan described beso shows thst thi impiety
constructed Qs the @ we want. Then woshow how 1 incorporates sale shit
1, which is necessary to seeclerate convergence, To retain real arithmetic in
the presence of complex esate, we then show how todo. double shi,
combine two conscitive QR iterations with complex conjugate sits ¢ are
the rest ter this double she is mgin ea, Finally, we seuss strategies or
loosing sits @ nd 7 to prove rebae quadratic convergence. However,
there hae been recent scart of are situation where cornergenee dors not
occur (25, Gt, 0 Bading completely eelible ad fas implementation of QR
eration renin an open probles,
Implicit Q Theorem
(Our eventual implementation of QR eration will depend oa the folowing
theorem
‘Turowsst 4.9. lmplit Q theorem. Suppose that QTAQ =H ie warned
upper Hessendeg. ‘hen eons 2 through of Q ere determined wuigely
(ap 20 sins) Oy the fet ean of Q.
1s Apolial Numerical Linear Algebra
"This dhorem implies that to compute Aygn = QFAQ from A, in the QR
gost, wll ed oly 10
1. compute the fst column of Q (hie is parallel to the First eturnn of
‘vf al so ean be poten jst by nortan thin enon set)
2, chm other columns of Qs $0 Qe is orthogonal and As i unredoeed
Hesenbers
Ten by sho implicit Q tore, we know that we wil ive compte
‘Ay corey bast Qs unig up i, which do nae mater (Sets
dont mater beeine changing te ign of i ote of , he sane
fs caning Ay — ou! — Qf wo (QS), where 8, ~ Hag H-
‘Then Aer (SURMQLSD +o — (RQ, + of), whl ma artiognal
start a ot change the sg of clans nd ows of 441)
Prof ofthe inp Q teoren. Sapp that Q°AQ Mal VEAV — Coe
tnretsend upper Tester, Ql ae orgoa, a! he Bs cols
aad V are oq Let (1X), denote the heli of X. We wish stow
(0), 2) tora > J,orequvaenty that W'= VQ ~ dag tl,
Since W— V7Q, we aot GW’ — GUTQ = VEAQ — VIQH — WHT
Now GHW = WI inpia GW), = (CW), — WWM, — TH hgAW)y
aaa = GUN Eh bal, Sitoe Wa = U0) and Cs
pp Heswen ber, we cn i inveton on show cat (Wao in
entre 1 ttn te, W is per nanglt Sine Wf ab tonal,
iedagonal = cag(tt-- 21).
QR Algorithm
"Tosco ow to use the implet @ teorem to eompute fom Ay =A, we we
a bty-5 example
EXAMPLE AIO. 1. Choose
a 1 50 a1 =OFAQ,
We discus tow to ose ¢; and below; for now they may be any
Givens rotation. The in position (81) felled & bulge sind moat to
be gotten Hd of to restore Hesaners fom,Nonsymmetrie lgenvalive Problems
2. Choose
=| a
3 Choowe
nd
Ads
wo QA =
oa
,
"The bulge has how chased fom (42) 10 (
4, Choone
1
1
a= zt
and
Ae QaaQe
+
3)
10 Apolied Numerical
rear Alger
sow are back 10 uppee Hessenberg frm
Altogeties QFAG is upper Hessen, where
pans
0 the frst elu of Q is fn, 03- 01%, which bythe impli @ theorem
has uniquely termine the other ens of @ (up to signs). We noe chore
the first eolumn of Q to be proportional to the fist ealunn of A~ of, [ax
240), This meas Q i the same asin the QR decomposition of
Ano, 0s desi. ©
‘he cst for an by. matic 6? + O(n}.
Implicit Double Shift QR. Algorithm.
‘This section desertbes how to alntan real arithmetic by shiing by @ and
tthe se ie, This essential for an eficient practical implementation but
‘ot for 9 mathamstial understanding of te algorithm and may be skipped
‘on fist reins
"The results of shifting by o and @ in sucession are
Ayal = Qumt,
Ay = RiQh bel oA, = QTAQr,
Aral = Qift,
Ay = MaQr4at soa, = QTAQs = QFOP AQ IQ
Leanna 4.5. We ean choose Q, and Qe s0
(2) Q1Q ie rat
(2) Aus therefore reat,
(8) the first column of Qua i sy to compute
Proof See Quits = A, ~BE = RiQ + (2-2), we get
QiQehakey = QUA Hoo) Ri
= QiRiQuhes + (0 —2}Q.Re
(a= ody = 01) + (6 ~7(Ao = of)
A} —20Ra)Ao + oP = Mt.
‘Thus (@sQa) lta) i the QRD ofthe rel mateix M and 90 Qa, 8 well
1 Raft, can be chose real. This snes thay — (Qs 3)” (Qi) also
reNonsymmetrie lgenvalive Problems im
"The fest enluan of Q,Qo 8 proportional to the st column of 432A +
lo, whieh s
4h + aye) —2(Re)an + [oP
taylan +en2~2(R0))
o
"The rest ofthe columns of QQ are computed imply using the implelt
thorens, The process i ll ealled “bulge cheng,” but now the bulge ie
by? Instead by,
EXAMPLE LIL, Here fs 8 6-y-6 example of bulge easing.
1. Choow QF —[ | where the fist colunn of QF is given ws above,
aa PEE tit|amtasatan [1 PE Ets
‘We see that there is 2 2by-2 blue nite by pls sig.
2, Choowe «Householder relleetion QZ, whieh afets only rows 23, and 4
fF, zeroing out enti (1) and (11) of Ay (ths means chat QE
is che entity matrix ouside rows and ents 2 throogh 4)
Qt and As
and the 2-2 bulge hasbeen “chased one column
Choose a Homer mitection QF, whieh afots only rows Sand 5
of QE Ap, zeroing out enteles (4,2) and (5,2) of Ay (this means chat QE
im poled Numerieal Linear Algebra
5s the identity ouside rows ad alumns 8 through 3
A=
4. Chon Howsholder releton Qf whieh aets only wows 4,5, rd 8
of QF Ay, zeroing ot ent (53) and (0,3) oy (hs ear tat QE
Js th entity mtr out rows and columns ehough
An = QPAQ
GAs
‘Choosing a Shift for the QR Algorithas
‘To completly specify one Herston of ether snl shift o double shift Hes-
senbeeg QR iteration, we nerd to chore the sito (and). eal from the
fd of ection 4A tat a resonable choice of sae si, one that resulted
In agmpeotc quadrate ccvergece to a rel cleat, Was @ un, the
Boom Fight entry of A, ‘The generalization for double shifting fs to ie the
‘reins wich that means and are che eigervalins ofthe ota 2-by-
Deorer of i [6 | This wll leu conver to eter two real
cigs nth bom 29-2 corer o ingl 2-b-2 blk wth complex
‘onuate eigenvalues. When we are ne to convergence, we expect ty.
{sa posh an) obs 0 tht the esas ofthis 2-y-2
are ano approximations for elgnvales of. tne one ea sw tha tis
choice kas to quali convergeoe anyimptticall” ‘his means tat once
Gerad (ad ponly days) mall enough, fs magaltde wil square atNonsymmetse igenvalve Problems is
‘ach sep and quickly approch zero, In practic, this works so well hat
sverag only two QM iterations per cggavalue ate needed for convergence for
‘not all ates,
In practice, the QR iteration with the Frans shift ean fall 1 converge
lied, ess
oot
100
010
bchngy). So the practical lgorith in use for deeds ol an esexpiona
SInI” every 10 shifts if convergence had nt accord Stl, Un ets of
tatios where that aor dl not converge were discovered only eecently
[8,6 mates in small aighborbood of
bono
bn od
bolo
‘wher is few thousand times machine epsilon, fom such ase. So another
osceptioal shit" was recently ned to the algorithm to pach this cae
But i still an open problon 0 find shit strategy that guncantos fast.
‘eonvergece forall mato
4.5. Other Nonsymmetric Eigenvalue Problems
5.1. Regular Matrix Pencils and Weierstrass Canonical Form
‘he stead eigewalve problem asks for which sans = the matris A ~ =1
Is Singur; thes sears are the eigenvalues. his notion generalizes in several
DevINITION 16, A— AB, ahere A and Bore m-byn matries i called @
rate pene, or just pci More i om indeterminae, not particule,
rnerical wae
Derixrriow 4.7. IfA end B ave squere and det(A ~ AB) isnot identically
2470, the pncit AB i ated regu Otherwise 1 allot singular. When
ANB is repulr, (A) = det(A XB) ig called the earactrsle polyno
of A~AB ond th eienvatus of A~ Et are defied to be
(1) he vont of 18) =0,
(2) 2 (ath mtptity » — dep) $f dtp) You might also like