Computer Sciences Department
|
|
- Kerrie Hall
- 6 years ago
- Views:
Transcription
1 Computer Sciences Deprtment Computing the Singulr Vlue Decomposition of 3 x 3 mtrices with miniml brnching nd elementry floting point opertions lek Mcdms ndrew Selle Rsmus Tmstorf Joseph Tern Eftychios Sifkis Technicl Report #69 My
2 Computing the Singulr Vlue Decomposition of 3 3 mtrices with miniml brnching nd elementry floting point opertions lek Mcdms, ndrew Selle Rsmus Tmstorf Joseph Tern, Eftychios Sifkis 3, Wlt Disney nimtion Studios University of Cliforni, Los ngeles 3 University of Wisconsin, Mdison bstrct numericl method for the computtion of the Singulr Vlue Decomposition of 3 3 mtrices is presented The proposed methodology robustly hndles rnk-deficient mtrices nd gurntees orthonormlity of the computed rottionl fctors The lgorithm is tilored to the chrcteristics of SIMD or vector processors In prticulr, it does not require ny explicit brnching beyond simple conditionl ssignments (s in the C++ ternry opertor?:, or the SSE4 instruction VBLENDPS), enbling trivil dt-level prllelism for ny number of opertions Furthermore, no trigonometric or other expensive opertions re required; the only floting point opertions utilized re ddition, multipliction, nd n inexct (yet fst) reciprocl squre root which is brodly vilble on current SIMD/vector rchitectures The performnce observed pproches the limit of mking the 3 3 SVD memory-bound (s opposed to CPU-bound) opertion on current SMP pltforms Keywords: singulr vlue decomposition, Jcobi eigenvlue lgorithm Method overview Let be rel-vlued, 3 3 mtrix fctoriztion of s UΣV T is gurnteed to exist, where U nd V re 3 3 rel orthogonl mtrices nd Σ is 3 3 digonl mtrix with rel nd nonnegtive digonl entries Since the mtrix product UΣV T remins invrint if the sme permuttion is pplied to the columns of U,V nd to the digonl entries of Σ, common convention is to choose Σ so tht its digonl entries pper in non-incresing order The exct convention followed in our method is slightly different, specificlly: The orthogonl fctors U nd V will be true rottion mtrices by construction (ie det(u) det(v) ) This is contrsted to the possibility of U or V hving determinnt of, which corresponds to rottion combined with reflection The digonl entries of Σ will be sorted in decresing order of mgnitude, but will not necessrily be non-negtive (relxing the non-negtivity constrint is necessry to llow U nd V to be true rottions, since the determinnt of could be either positive or negtive) More specificlly, the singulr vlue with the smllest mgnitude (σ 3, or Σ 33) will hve the sme sign s det(), while the two lrger singulr vlues σ, σ will be non-negtive These conventions re motivted by pplictions in grphics which require the orthogonl mtrices U nd V to correspond to rel 3D sptil rottions In ny cse, different conventions cn be enforced s post process with simple mnipultions such s negting nd/or permuting singulr vlues nd vectors The lgorithm first determines the fctor V by computing the eigennlysis of the mtrix T VΣ V T which is symmetric nd positive semi-definite This is ccomplished vi modified Jcobi itertion where the Jcobi fctors re pproximted using inexpensive, elementry rithmetic opertions s described in section Since the symmetric eigennlysis lso produces Σ, nd consequently Σ itself, the remining fctor U cn theoreticlly be obtined s U VΣ ; however this process is not pplicble when (nd s result, Σ) is singulr, nd cn lso led to substntil loss of orthogonlity in U for n ill-conditioned, yet nonsingulr, mtrix nother possibility is to form V UΣ nd observe tht this mtrix contins the columns of U, ech scled by the respective digonl entry of Σ The Grm-Schmidt process could generte U s the orthonorml bsis for V, yet this method would still suffer from instbility in the cse of ner-zero singulr vlues Our pproch is bsed on the QR fctoriztion of the mtrix V, using Givens rottions With proper ttention to some specil cses, s described in section 4, the Givens QR procedure is gurnteed to produce fctor Q( U) which is exctly orthogonl by construction, while the upper-tringulr fctor R will be shown to be in fct digonl nd identicl to Σ up to sign flips of the digonl entries The novel contribution of our pproch lies in the computtion of the Jcobi/Givens rottions without the use of expensive rithmetic such s trigonometric functions, squre roots or even division; the only necessry opertions re ddition, multipliction nd n inexct reciprocl squre root function (which is vilble in mny rchitectures nd is often fster not only thn squre root, but stndrd division s well) The method is robust for ny rel mtrix, nd converges to given ccurcy within fixed smll number of itertions Symmetric eigennlysis The first step in computing the decomposition UΣV T is to compute the eigennlysis of the symmetric, positive semidefinite mtrix S T VΣ V T This will be performed by vrint of the Jcobi eigenvlue lgorithm [Golub nd vn Lon 989] Jcobi itertion We provide summry presenttion of the clssicl Jcobi eigenvlue lgorithm; for more detiled exposition the reder is referred to [Golub nd vn Lon 989] The Jcobi process constructs sequence of similrity trnsforms S (k+) [Q (k) ] T S (k) Q (k) Ech mtrix Q (k) is constructed s Givens rottion, of the form
3 c s Q(p, q, θ) s c C row p row q where c cos(θ) nd s sin(θ) The objective of every conjugtion with Given mtrix Q (k) Q(p, q, θ) is to bring the next iterte S (k+) closer to digonl form, by eliminting the off-digonl entries s (k) pq nd s (k) qp cn be shown tht X i j (ie by enforcing tht s (k+) pq [s (k+) ij ] X i j [s (k) ij ] [s (k) pq ] s (k+) qp ) It Therefore, fter ech Jcobi itertion, the sum of squred offdigonl entries of S is reduced by the sum of squres of the two off-digonl nnihilted entries There is nturl choice of the entries to be eliminted tht cn esily seen to generte convergent process: if we nnihilte the mximum off-digonl entry of n 3 3 we re gurnteed to nnihilte t lest /3 of the offdigonl sum-of-squres (in fct, t ech itertion fter the first, this reduction will be t lest / of the previous sum of squres, since previous itertions leve only one other non-zero off-digonl pir) The Jcobi itertion rpidly drives the itertes S (k) to digonl form For 3 3 mtrices, 5 itertions re typiclly sufficient to digonlize S to within single-precision roundoff error lthough the previous rgument suggests t lest liner convergence, the order becomes in fct qudrtic once S (k) hs been brought somewht close to digonl form dditionlly, it cn be shown tht the sme symptotic order of convergence is ttined even if the off-digonl elements to be eliminted re selected in fixed, cyclic order, ie (p, q) (, ), (, 3), (, 3), (, ), (, 3), This llevites the need for conditionl execution bsed on the mgnitude of the off-digonl entries Note: Cyclic Jcobi requires tht we lwys pick θ < π/4 to ensure convergence, n option tht is lwys possible s illustrted next The rest of this section ddresses the computtion of the trigonometric fctors c cos(θ) nd s sin(θ) Once the indices (p, q) of the off-digonl pir to be nnihilted hve been selected, the vlues of c nd s depend only on the submtrix t the intersection of the p-th row nd q-th column (note tht s pq s qp due to symmetry): «spp s pq s pq s qq Thus, the determintion of c nd s is equivlent to the problem of digonlizing symmetric mtrix The clssicl Givens digonliztion Let be symmetric mtrix We seek trigonometric fctors c cos(θ) nd s sin(θ) such tht the result of the conjugtion: B Q T Q c s s c «««c s s c «c + cs + s cs( ) + (c s ) cs( ) + (c s ) s cs + c is digonl mtrix Therefore, we need to enforce tht b b cs( ) + (c s ) If, we cn simply select θ π/4 (or equivlently, c s / ) Otherwise, the previous condition cn be rewritten s: cs c s cos θ sin θ cos θ sin θ tn θ tn θ tn(θ) () () From eqution () we hve θ rctn(/( )) If the rc-tngent function returns vlue in the intervl ( π/, π/), this expression will gurntee θ < π/4 s required for convergence of Cyclic Jcobi Nturlly, the use of (forwrd nd inverse) trigonometric functions will significntly increse the cost of this computtion n lterntive technique is described in [Golub nd vn Lon 989] where the qudrtic eqution () is solved to yield tn θ directly, from which the sine nd cosine re computed lgebriclly This pproch still requires minimum of two reciprocls, one squre root nd one exct reciprocl-of-squre-root in ddition to ny multiply/dd opertions (n extr reciprocl plus squre root will be needed if brnching instructions re to be voided) Our proposed optimiztion quickly computes n pproximte form of the Givens rottion, where inccurcy my be introduced both in the ngle computtion, s well s constnt scling of the rottion mtrix However, the nture of this pproximtion is such tht the Jcobi procedure is only impcted by miniml decelertion, while the ccurcy of the converged result is not compromised Our methodology requires only multiply/dd opertions, plus single inexpensive, inexct reciprocl-of-squre-root evlution (even lrge reltive errors re well cceptble) No brnching is required, with the exception of conditionl ssignments dditionl computtionl svings rise from the compct representtion of rottions s quternions, insted of explicit mtrices 3 pproximting the trigonometric fctors In this section, we introduce first pproximtion to the trigonometric fctors c, s in the Givens mtrices, which does not require evluting trigonometric functions or solving qudrtic Our pproch stems from n symptotic pproximtion when the rottion ngle θ is smll Eqution () suggests tht this would be the cse for exmple when the Jcobi itertion is close to convergence nd Σ does not hve repeted singulr vlues; nevertheless, our process is designed to gurntee resonble progress regrdless of ny such conditions Let us temporrily ssume tht θ is smll Under this ssumption, we cn pproximte tn(θ) tn θ In fct, let us denote with
4 φ the ngle tht stisfies the eqution tn(θ) tn φ s n exct identity; we cn then equivlently stte tht when θ is smll, we will hve φ θ We summrize these pproximtions, in conjunction with eqution () s follows: 8 sin(*tn(tn(*t)/)-*t)/sin(*t) /tn(*t) tn(θ) tn φ θ tn(θ) (3) 6 4 This expression cn be rewritten to provide the following expression for cos(φ) nd sin(φ) (which, in turn, pproximte the trigonometric fctors c cos(θ) nd s sin(θ), respectively): sin φ cos φ 8 < : sin φ ω cos φ ω( ) ω / p + ( ) (4) /6 /8 3 /6 /4 Figure : pproximting the trigonometric Givens fctors using tn(θ) tn θ (or by setting fixed ngle θ π/4)the offdigonl mgnitude reduction frction b / is plotted on the verticl xis, s function of the optiml Givens ngle Wht is the qulity of this pproximtion, however, specificlly for our purposes of generting digonl mtrix B Q T Q? This cn be quntified by looking t the off-digonl element b generted fter the conjugtion with these pproximte Givens rottions: Eq(3) b b cos φ sin φ( ) + (cos φ sin φ) sin(φ) + cos(φ) Eq() sin(φ) tn(θ) + cos(φ) sin(φ) cos(θ) + cos(φ) sin(θ) sin(θ) sin(φ θ) sin(θ) sin( rctn(tn(θ)/) θ) sin(θ) (5) Eqution (5) provides concise expression for the reduction of the mgnitude of the off-digonl element, s function of the optiml Givens rottion ngle (which is, in turn, function of the mtrix entries) Figure (solid line) illustrtes the mgnitude reduction frction s function of the ngle θ We observe tht for smll vlues of θ the qulity of the pproximtion is excellent, effectively leding to nnihiltion of the off-digonl element However, for lrger vlues of θ, the reduction becomes smller, nd we ctully obtin no reduction t ll for vlues θ π/4 The poor performnce of the previous pproximtion when θ π/4 will be ddressed by considering yet nother choice for the Givens ngle φ Eqution (4) revels tht this pproximte φ my lie outside the intervl ( π/4, π/4), which in contrst could hve been gurnteed for the optiml ngle θ This restriction ws importnt in ensuring convergence of the Cyclic Jcobi method Thus, we consider the possibility of truncting the pproximte vlue to the vlue φ π/4, t the very lest in the cse when the computed vlue lies outside tht intervl For this fixed choice of the Givens ngle, the off-digonl element b fter the conjugtion becomes: b b cos π 4 sin π 4 ( ) + (cos π 4 sin π 4 ) tn(θ) tn(θ) This reduction frction is lso plotted in figure (dshed line) Note tht both mgnitude reduction frctions re even, nd periodic (T π/) functions, so it is sufficient to study them in the intervl [, π/4] Notbly, if we were ble to pick the best of the two proposed pproximtions (in terms of the mgnitude reduction they produce) we see tht reduction frction significntly smller thn cn be gurnteed In fct, it is possible to formlize this selection between the two pproximtions; from equtions (3,7) we cn solve for the intersection point of the two curves in figure s θ rctn()/ (we omit the relevnt trigonometric mnipultions) The mgnitude reduction rtio b / t the intersection point is equl to / tn(θ ) 5 Thus, by selecting the best of the two pproximtions we re gurnteed t lest 5% reduction in the mgnitude of the off-digonl element Finlly, the choice bout which pproximtion is the best one to use cn be mde without resorting to the obvious ngle criterion (θ < θ ), by observing tht the fixed ngle φ π/4 should be selected only when it yields mgnitude reduction by fctor no lrger thn 5: b ( ) These results suggest the following lgorithm (6) (7)
5 lgorithm Non-trigonometric pproximtion of the Givens ngle : function PPROXGIVENS(,, ) Returns (c, s) : b [ < ( ) ] b is boolen 3: ω / p + ( ) 4: s b?ω : 5 5 sin(π/4) 5: c b?ω( ): 5 5 cos(π/4) 6: return (c, s) 7: end function 4 pproximte Givens rottion using quternions 3 3 rottion mtrix cn be equivlently encoded s quternion (, b, c, d) (cos(θ/), sin(θ/)v), where θ is the ngle of rottion, nd v (v x, v y, v z) is the normlized xis of rottion In prticulr, 3 3 Givens rottion with (p, q) (, ), ie rottion of the top-leftmost submtrix, hs the mtrix cos θ sin θ sin θ cos θ nd the equivlent quternion representtion (cos(θ/),,, sin(θ/)) The dded benefit of this representtion is tht the quternion does not need to be normlized, ie the quternion (γ cos(θ/),,, γ sin(θ/)), where γ R, is just s vlid s representtion of this rottion This suggests tht we could mimic the symptotic pproximtion tn(θ) tn θ of the previous section to obtin tn(θ) 4 tn(θ/) This suggests the following expression for the pproximte Givens ngle φ: perform this lst conjugtion, since we do not expect to obtin the mtrix Σ from the solution of the symmetric eigenproblem, but insted compute Σ directly from the Givens QR fctoriztion of V UΣ (the product V cn be computed using the oncenormlized quternion corresponding to mtrix V) In prctice, we do hve motive to perform some normliztion of the Givens quternion, to void the risk of overflow or underflow fter lrge number of Jcobi itertions We typiclly never perform more thn 5- Jcobi itertions, so even if we scle the quternion to within, sy, fctor of wy from normlized quternion, ny risk of overflow or underflow would be eliminted We found tht nturl (nd very inexpensive) wy to perform this normliztion is to compute the sclefctor ω in eqution (9) using the inexct Reciprocl-Squre-Root function tht is built-in nd very efficient on most modern processors For exmple the SSE RSQRTPS instruction yields reltive error of t most % while hving ltency comprble to x-3x of stndrd pcked multiply or dd (which is much less thn n exct x87 squre root, or even reciprocl computtion) For resons lredy explined, the ccurcy of the symmetric eigennlysis is in no wy ffected by the inccurcy of this opertion, nd even higher reltive error would not mtter, s long s overflow nd underflow re verted For the purposes of evluting the mgnitude reduction fctor of the off-digonl element, it is pproprite to ssume exct normliztion, since ny residul scling would simply ffect the entire mtrix nd would be corrected once t the end of the process Once gin, we hve: Eq(8) b sin(φ θ) b sin(θ) sin(4 rctn(tn(θ)/4) θ) sin(θ) () tn(θ) Consequently, ( ) sin φ cos φ 4 tn(φ/) θ tn(θ) (8) 8 >< sin(φ/)ω cos(φ/)ω( ) (9) >: ω / q +[( )] 5 sin(4*tn(tn(*t)/4)-*t)/sin(*t) /tn(*t) Thus, we cn represent this rottion with the quternion -5 (ω( ),,, ω ) () We note tht this quternion representtion is eqully cceptble nd ccurte, regrdless of the vlue of the scle fctor ω In fct, even without ny scling t ll, the quternion (,,, ) from theoreticl stndpoint would be perfectly ccurte representtion of this rottion The quternions of subsequent Jcobi itertions cn be multiplictively combined without normliztion, nd even the conjugtion Q T Q cn be computed using un-normlized quternions, yielding result tht is identicl to using explicit orthogonl mtrices, up to globl scling of the resulting mtrix This scling would need to be corrected just once, t the end of the sequence of Jcobi itertions, by normlizing just once the quternion tht combines ll Jcobi rottions, nd repeting the conjugtion one lst time In our cse, we would not even - /6 /8 3 /6 /4 Figure : pproximting the trigonometric Givens fctors using tn(θ) 4 tn(θ/) (or by setting fixed ngle θ π/4) The off-digonl mgnitude reduction frction b / is plotted on the verticl xis, s function of the optiml Givens ngle Figure compres the off-digonl mgnitude reduction frction obtined by the quternion pproximtion of eqution 9 with the previously discussed fixed choice of φ π/4 Equting expressions (7) nd () we obtin tht the two curves intersect t θ rctn(4 tn(π/8))/ 5388 (this is the leftmost intersection in figure ), while the off-digonl mgnitude reduction
6 frction t this point is cot(π/8)/ Therefore, by choosing the best option between the pproximte Givens quternion (), or the fixed ngle φ π/4, we re gurnteed mgnitude reduction of bout 6%, slightly less thn the pproximtion of the previous section Nevertheless, this is strictly the worst-cse scenrio, nd both pproximtions become much more ccurte fter just few Jcobi itertions once the mtrix is brought closer to digonl form s in section 3 the choice whether to use the symptotic pproximtion, or the fixed ngle φ π/4 cn be mde without checking ngles or trigonometric quntities; the fixed ngle should be used when it chieves better residul reduction thn the mximum vlue cot(π/8)/4 6355: b cot(π/8) 4 (+ ) [( )] (3+ ) The finl lgorithm becomes: + 4 lgorithm Computtion of pproximte Givens quternion : const γ 3 + : const c cos(π/8) 3: const s sin(π/8) 4: function PPROXGIVENSQUTERNION(,, ) 5: c h ( ) c h cos(θ/) 6: s h s h sin(θ/) 7: b [γs h < c h] b is boolen 8: ω RSQRT(c h + s h) RSQRT(x) / x 9: c h b?ωc h :c : s h b?ωs h :s : return (c h,,, s h ) returns quternion : end function Note tht lgorithm corresponds to Jcobi rottion with (p, q) (, ) In order to rotte nother pir, the inputs nd the ordering of the quternion elements re djusted ccordingly We finlly ddress one implementtion detil: it my be more efficient (from n implementtion stndpoint) to compute the elements of the ctul rottion mtrix Q before performing the ctul conjugtion, rther thn using the quternion itself The (unscled) corresponding rottion mtrix is: Q unscled (c c h s h s h c h s h c h c h s h c h+s h cos φ sin φ sin φ cos φ 3 Sorting the singulr vlues (c h+s h)q () Once the orthogonl fctor V hs been computed, we cn obtin n expression for the product of U nd Σ s B : UΣ UΣV T V V Note tht the lst expression is the one ctully used to evlute B Since B UΣ, this mtrix is simply the result of scling ech column of the orthogonl fctor U with the respective singulr vlue (ie the respective digonl element of Σ) Consequently, the mgnitude of ech singulr vlue in Σ cn be computed by simply evluting the -norm of the respective column of B We previously stted tht our lgorithm will be required to produce digonl mtrix Σ where the singulr vlues long the digonl re sorted in decresing order of mgnitude This ordering is not merely n rbitrry convention, but will lso benefit the QR fctoriztion explined lter in section 4 We shll enforce this property by reordering the columns of B in decresing order of their -norm (which will induce the sme ordering in the digonl entries of Σ, s discussed) nd lso pply the sme permuttion to the columns of V t the sme time In order to prove tht such trnsformtion is llowed, consider the individul columns of B [b b b 3] nd V [v v v 3] respectively Since BV T, we hve: 3X b iv T i i Thus, if the sme permuttion is pplied to the columns of mtrices B nd V, the mtrix reconstructed s their product remins unffected Note tht it is lso possible to simultneously negte corresponding pir of columns b i nd v i without ffecting the vlidity of the decomposition We cn therefore sort the singulr vlues by swpping pirs of columns (b i, b j) long with their counterprts (v i, v j) in the fshion of bubblesort method, until the columns of B pper in decresing order of their -norm Note tht simply swpping two columns of V will flip the sign of its determinnt, violting the property tht V is true rottion mtrix; insted, we lso negte one of the two columns being swpped (both for V nd the respective column in B) which will keep V s true rottion The entire process is summrized in the following pseudocode: lgorithm 3 Singulr vlue sort in decresing mgnitude order : procedure CONDSWP(c, X, Y ) c is boolen : Z X Z is temporry vrible 3: X c?y :X 4: Y c?z:y 5: end procedure 6: procedure CONDNEGSWP(c, X, Y ) c is boolen 7: Z X Z is temporry vrible 8: X c?y :X 9: Y c?z:y : end procedure : procedure SORTSINGULRVLUES(b, b, b 3, v, v, v 3) : ρ b, ρ b, ρ 3 b 3 3: c [ρ < ρ ] c is boolen 4: CONDNEGSWP(c, b, b ); CONDNEGSWP(c, v, v ) 5: CONDSWP(c, ρ, ρ ) 6: c [ρ < ρ 3] 7: CONDNEGSWP(c, b, b 3); CONDNEGSWP(c, v, v 3) 8: CONDSWP(c, ρ, ρ 3) 9: c [ρ < ρ 3] : CONDNEGSWP(c, b, b 3); CONDNEGSWP(c, v, v 3) : end procedure Lstly, we recll tht in section the rottion mtrix V ws in fct constructed s quternion q (s, x, y, z) For the purposes of the current section, we could either convert this representtion to n explicit 3 3 mtrix, or simply compute the mtrix B V by rotting ech row vector of with the conjugte quternion q However, if we need to produce V in quternion form t the end of the SVD lgorithm, it would be inconvenient to convert bck nd forth between mtrix nd quternion representtions only so tht the previously defined procedure CONDNEGSWP could be
7 pplied to mtrix representtion of V Fortuntely, this opertion cn lso be expressed by simple quternion In prticulr, note tht function cll CONDNEGSWP(true, v, v ) is equivlent to replcing V with VR, where which is rottion mtrix, with corresponding (un-normlized) quternion q R (,,, ) In the cse we wnt to mke the cll to CONDNEGSWP conditionl on the vrible c, the permuttion quternion is simply q R (,,, c), ssuming tht c tkes binry vlue of either or The quternion corresponding to the product VR will then simply be q q R (which, notbly, requires only 4 dditions or subtrctions) The sme logic cn be followed to emulte the ction of CONDNEGSWP on other pirs of columns of V, while operting purely on its quternion representtion 4 Computtion of the fctors U nd Σ We previously constructed the mtrix B V nd explined tht it is equl to the product UΣ of the two remining unknown components of the SVD In the lst phse of our lgorithm we will compute the individul fctors U nd Σ from the mtrix B 4 Extrcting U nd Σ vi QR decomposition The mtrix B UΣ is essentilly column scling of U by the respective digonl entries of Σ Thus, seemingly strightforwrd method for computing the orthogonl mtrix U would be to simply rescle ech column vector so tht it hs unit norm However, this procedure cnnot be used in the cse of zero singulr vlue; moreover, even when singulr vlue is nonzero yet orders of mgnitude smller thn the other vlues, this normliztion my produce mtrix U tht is fr from orthogonl Intuitively, this loss of orthogonlity is due in prt to the fct tht, when column of U with very smll entries is multiplied with lrge number to convert this column to unit vector, ny numericl errors will be gretly mplified These issues re excerbted in the cse where more thn one of the singulr vlues is equl to zero Our pproch gurntees the orthogonlity of the computed mtrix U nd is bsed on the QR fctoriztion of B using Givens rottions We strt by showing the following lemm, for generl dimension of the SVD (ie potentilly lrger thn the 3 3 cse): Lemm Let U be n orthonorml n n mtrix nd Σ digonl mtrix of the sme dimensions Let QR UΣ be the (not necessrily unique) QR-fctoriztion of the product UΣ, where Q is orthogonl nd R is upper tringulr If the nonzero digonl elements of Σ pper before ny zero entries (ie if Σ hs k nonzero entries nd [Σ] ii, i k, while [Σ] ii, k + i n), then the following sttements hold true: If Q [q q q n ], U [u u u n], r ij : [R] ij, nd Σ dig(σ, σ,, σ n), the following sttements re true when i [, k] : q i ±u i r ii ±σ i (with the sme sign s the identity bove) r ij for ny j i The fctor R is in fct digonl Proof The i-th column of the mtrix eqution UΣ QR is written s follows: ix σ iu i r ki q k k We will prove the combintion of the 3 properties by induction on i For i, we hve: σ u r q σ u r u σ r r ±σ nd, from the first eqution, we lso hve q ±u (with the sme sign s in the identity r ±σ ) lso, let j We hve: σ ju j r kj q k k u T (σ ju j) u T σ ju T u j! r kj q k k r kj u T q k k Since j i, we hve u T u j lso, we previously showed tht q ±u, thus u T q k ±δ k (δ ij is the Kronecker delt) Combining these results with the lst eqution we get: r kj (±δ k ) k ±r j For the induction step i i + we hve: σ i+u i+ Xi+ r k,i+ q k k ix r k,i+ q k k {z } (induction) r i+,i+q i+ +r i+,i+q i+ Tking the -norm of this eqution yields, s before, r i+,i+ ±σ i+ nd q i+ ±u i+ Similrly, for j i + we hve σ ju j r kj q k k u T i+ (σ ju j) u T i+ σ ju T i+u j which completes our proof! r kj q k k r kj u T i+q k k r kj (±δ i+,k ) k ±r i+,j
8 ccording to the properties proven in Prt, the mtrix R hs the structure «±σ D B R, where C ˆR ±σ k nd ˆR is n upper tringulr mtrix of size (n k) (n k) Therefore, the system UΣ QR is written s D UΣ Q ˆR «Since σ k+ σ n, the lst (n k) columns of this mtrix eqution re written s: Q ˆR «The mtrix Q is nonsingulr, thus the lst eqution implies tht ˆR, suggesting tht R is purely digonl mtrix D This lemm indictes tht the QR decomposition cn be used to fctorize B into n orthogonl mtrix (tken s the fctor U) nd digonl mtrix which will ply the role of Σ The condition tht nonzero singulr vlues need to precede those equl to zero (we chieve this in our cse by the sorting process in section 3) is bsolutely essentil Consider the counter exmple of system UΣ QR with the following vlues The fctoriztion on the right is perfectly vlid QR decomposition, yet R is neither digonl, nor does it pproximte Σ in ny wy By performing strict sort, rther thn simple seprtion of zero/nonzero singulr vlues, our methodology is robust to situtions where singulr vlue (respectively, the norm of column of B) is nonzero, yet much smller thn the mgnitude of some other, lrger singulr vlue Finlly, we note tht this generl theory does not gurntee ny prticulr sign for the digonl elements in the fctor R; the convention presented in section will be consequence of the methodology (Givens rottions) which we employ to compute the QR decomposition 4 Givens QR fctoriztion We shll use the method of Givens rottions to compute the QR fctoriztion, due to the simplicity of its fundmentl opertions nd the fct it gurntees to produce true rottion mtrix Q In contrst, Grm-Schmidt procedure would require significnt ttention to produce true rottion mtrix, especilly in the presence of smll (or zero) singulr vlues The Householder scheme would lso be n option, lbeit one tht requires more complex steps, nd cre needs to be tken due to the fct tht it opertes by constructing orthogonl reflections rther thn true rottions For generl n n mtrix B, the method of Givens rottions constructs the tringulr fctor R by nnihilting the elements below the digonl one-by-one, in column-mjor lexicogrphicl order, ie (, ), (3, ),, (n, ), (, ), (3, ),, (n, n ) The (i, j) element is nnihilted by left-multiplying the result of the previous opertions with Givens mtrix Q(i, j, θ ij) T, s follows: Q(n, n-, θ n,n-) T Q(3,, θ 3) T Q(,, θ ) T B R Q T B R B QR where Q Q(,, θ )Q(3,, θ 3) Q(n, n-, θ n,n-) Due to the specific order in which the elements below the digonl of B re being nnihilted, every Givens rottion in this sequence will not chnge ny of the zeroes tht were introduced by the Givens rottions pplied before it Schemticlly, when the Givens rottion intended to nnihilte element (q, p) is redy to be pplied, the following trnsformtion tkes plce : Q(p, q, θ pq) T q,q+ n qq q,q+ qn q+,q+ q+,n p,q+ p,n pq p,q+ p,n p+,q p+,q+ p+,n nq n,q+ nn q,q+ n qq q,q+ qn q+,q+ q+,n p,q+ p,n p,q+ p,n p+,q p+,q+ p+,n nq n,q+ nn C C s seen in the lst eqution, only rows p nd q re ffected, nd only from the q-th column onwrds We cn lso see tht this Givens rottion will succeed in nnihilting the element pq if n only if ««cos θpq sin θ pq qq qq sin θ pq cos θ pq pq This property cn be enforced by simply selecting: cos θ pq qq pq p, sin θ pq p qq + pq qq + pq «(3) We lso observe tht fter pplying this rottion, the sign of qq p qq + pq will be non-negtive s consequence, if the Givens rottions re constructed in this fshion, t the end of the sequence of rottions ll digonl elements of the resulting mtrix R, with the exception of the very lst one, will be non-negtive This property stisfies the lst convention we hd dopted in section for the sign of the digonl elements of Σ
9 specil cse tht needs to be ddressed occurs when both of qq nd pq re either zero, or extremely smll In this cse, the normliztion required to obtin the trigonometric fctors cos θ pq nd sin θ pq cn led to division by zero (or significnt loss of ccurcy, t the very lest) We detect this cse by checking if qq + pq < ɛ for specified threshold ɛ (in the sme order of mgnitude s our tolernce for errors in the singulr vlues) When this specil cse is detected, we set insted: cos θ pq signum( qq), sin θ pq These vlues will still gurntee tht qq nd tht, ultimtely, the first n singulr vlues in Σ will be non-negtive 43 Quternion implementtion of Givens QR We conclude by illustrting methodology tht genertes the Givens rottions directly in quternion form; we would utilize this pproch if, for the purposes of given ppliction, it is preferble to compute the rottions U nd V s quternions lthough it is certinly possible to convert the 3 3 rottion mtrix U to quternion s post-process, it is preferble to construct the rottions s quternions in the first plce Doing so will void the explicit mtrix-to-quternion conversion, procedure tht needs to consider number of different cses, nd is not optimlly structured for ggressive SSE optimiztions We will describe the methodology in the context of the first mtrix Q(,, θ ) from the sequence of Givens rottions used to compute the QR fctoriztion; the remining rottions will be constructed in n nlogous fshion The mtrix representtion of this rottion is : Q(,, cos θ sin θ sin θ cos θ where we dropped the subscripts in the ngle θ for simplicity In order for the opertion Q(,, θ) T B to nnihilte element b the following condition must hold, bsed on eqution (3) : sin θ b + cos θ b or, more generlly, for the Givens rottion designed to nnihilte element b pq we will require : sin θ + cos θ (4) where denotes the Pivot element on the digonl (this is element b qq on the mtrix being rotted), nd is the mtrix entry to be eliminted (or, b pq) The sme rottion cn lterntively be represented by n (unnormlized) quternion q : q (c h,,, s h ) (γ cos θ,,, γ sin θ ) where γ is n rbitrry scling fctor From eqution (4) we get: sin θ cos θ tn θ tn θ (5) tn θ Eqution (5) is essentilly qudrtic eqution on tn θ The two solutions of this qudrtic re: «sh c h tn θ ± p + (6) Since the quternion scle fctor γ is irrelevnt, we re free to simply choose c h nd s h ± p + (with either sign) Regrdless of the sign chosen in the formul for s h, in theory both of these vlues will generte Givens rottion tht successfully nnihiltes the intended mtrix entry However, we need to py ttention to the following issues: One of the choices for s h my be prone to ctstrophic cncelltion nd loss of ccurcy For exmple, if >, the opertion p ± + will lose ccurcy, s it is subtrcting the finite precision representtions of ner-identicl quntities We need to ensure tht fter the Givens rottion, the resulting Pivot element qq is non-negtive, per our convention in section With simple cse study (which will be omitted here, in the interest of terseness) the best choices for c h nd s h re determined to be: If <, then c h s h + If > then c h + s h q + q + q «+ + q «+ + For the cse > it my be initilly uncler how these vlues relte to the solution of eqution (5) However, we know tht one of the dmissible solutions is: s h + p + c h ( + p + )( + p + ) ( + p + ) ( + p + ) + p + from which the formuls for the cse > re derived Finlly, we need to estblish tht fter the constructed Givens rottion hs been pplied, the vlue of qq will be positive Noting tht s h γ sin(θ/) nd c h γ cos(θ/), we define: c : c h s h γ (cos θ sin θ ) γ cos θ s : s h c h γ sin θ cos θ γ sin θ Thus, we cn obtin the sine nd cosine of of the Givens ngle thet by normlizing: cos θ c s p, sin θ p c + s c + s With the ssistnce of these formuls, we cn verify tht the vlues chosen for c h, s h, either for > or < will ultimtely yield (omitting the necessry, yet tedious lgebric reductions): cos θ p, sin θ p + +
10 s consequence qq cos θ + sin θ p + In contrst, some of the roots of eqution (5) which were not used would hve produced cos θ p / +, nd sin θ p / + These vlues would hve lso eliminted element pq, but would hve produced nonpositive digonl element qq insted s in the Givens Jcobi procedure of section, eqution () cn be used to obtin (un-normlized) version of the corresponding 3 3 rottion mtrix, if such representtion of the Givens rottion is desired The entire procedure is summrized in lgorithm 4; note tht the dditionl checks in lines 3,4 of the pseudocode re designed to sfegurd ginst division by (ner-)zero when both elements nd re extremely smll The threshold vlue ɛ is set to our tolernce for the mgnitude of the elements remining below the digonl of R fter the Givens procedure is concluded lgorithm 4 Computtion Givens quternion for QR fctoriztion : function QRGIVENSQUTERNION(, ) : ρ p + 3: s h [ρ > ɛ]? : 4: c h + mx(ρ, ɛ) 5: b [ < ] b is boolen 6: CONDSWP(b, s h, c h ) CONDSWP defined in lg 3 7: ω RSQRT(c h + s h) RSQRT(x) / x 8: c h ωc h 9: s h ωs h : return (c h,,, s h ) returns quternion : end function Note The quternion representtion of the rottionl fctors U nd V hs limited our need for n exct squre root (or reciprocl squre root) opertion However, such n exct normliztion will be needed t lest once, t the end of the SVD lgorithm to remove ny ccumulted scling In ddition, lgorithm 4 clls for n exct squre root in line For these purposes, we found it sufficient to improve the ccurcy of RSQRTPS by performing one itertion of Newton s method for the eqution f(y) y x (the solution of this eqution is exctly / x), s detiled in [Lomont 3] The resulting, more ccurte versions of the squre root function (nd its reciprocl) re summrized in pseudocode s follows: lgorithm 5 Improved ccurcy SQRT nd RSQRT : function CCURTERSQRT(x) : y SQRT(x) 3: y y `3 xy ) 4: return y 5: end function 6: function CCURTESQRT(x) 7: return x CCURTERSQRT(x) 8: end function code on the computtion of 4 67M decompositions of mtrices with uniformly rndom elements, normlized such tht the Frobenius norm of ech input mtrix is equl to one For the purposes of this benchmrk, we fixed the number of Jcobi sweeps (using our pproximte, quternion-bsed formultion) to constnt number of 4 itertions Nturlly, vrious degrees of ccurcy cn be obtined by using different count of Jcobi itertions; however, for our 67M uniformly rndom, unit-normlized mtrices, this number of itertions resulted in: The mximum mgnitude mong off-digonl entries fter the symmetric eigennlysis ws 4 999% percentile of input mtrices chieved mximum off-digonl mgnitude of less thn 5 The verge mximum off-digonl mgnitude cross ll input mtrices ws 3 6 This level of ccurcy ws deemed well pproprite for the purposes of the ccompnying submission [Mcdms et l ] 5 Performnce nd sclbility Figure 3 illustrtes the totl runtime of our SVD lgorithm on the smple input of 4 67M rndom mtrices (of course, since our lgorithm hs completely fixed control flow, computtion time is input-independent) We generlly observed ner-liner speedup between single core nd -core performnce Observed devitions include: Speedup We observed n dditionl 5% performnce boost when moving from -core/-thred to -core/4-thred setup, leverging the hyperthreding cpbility of the processor We ttribute this dditionl ccelertion to the hiding of instruction ltency of our dense, explicitly vectorized code chieved in the hyperthreding setting Executions with just single core per socket tke dvntge of the frequency boost of single-threded runs, ntive in the Nehlem rchitecture Time (s) Speedup Time (s) 5 Results nd performnce ct ct 4c4t 6c6t 8c8t ct ct c4t We hve implemented nd tested SIMD, multithreded version of our lgorithm, using explicit SSE intrinsics The following performnce mesurements were cptured on -core/4-thred (hyperthreding enbled) 66GHz Intel Xeon X565 server, using the Intel C++ compiler for Linux, version 3 We benchmrked our Figure 3: Execution times, nd speedup reltive to the singlethred bseline performnce of our SVD lgorithm, on dul socket Intel Xeon X565 server Benchmrk includes totl of 4 decompositions McNt denotes n M-core, N-thred execution
11 5 Comprison with other eigennlysis methods Figure 4 provides comprison between our method, nd populr lterntives for solving vrints of eigenvlue problems The methods being compred include: Our method, with ll the necessry computtion overhed required to compute the rottionl fctors of the SVD in quternion form Explicitly SIMD vectorized Our method, with the SVD fctors being computed only in mtrix (not quternion) form (Note tht [Mcdms et l ] requires slightly more expensive vrint of these two options, requiring both quternion representtion of the rottion R UV T, s well s n explicit mtrix form of V itself) Explicitly SIMD vectorized The symmetric eigennlysis component only of our method constnt four modified Jcobi sweeps re used Explicitly SIMD vectorized The symmetric eigennlysis component only of the Polr Decomposition in [Rivers nd Jmes 7] No wrm strts hve been used; the number of Jcobi sweeps is fixed to three, which produces n verge ccurcy comprble to 4 sweeps of our modified Jcobi procedure Sclr implementtion only (multithreding used without vectoriztion) Computtion of eigenvlues of symmetric 3 3 mtrix, using closed-form solution [Smith 96] Sclr implementtion only quternion-bsed implementtion of the Jcobi procedure for the 3 3 symmetric eigennlysis ( Method Complete SVD computtion with rottions in quternion form (our method, 4 wide SIMD) Complete SVD computtion with rottions in mtrix form (our method, 4 wide SIMD) Symmetric eigennlysis only (our method, 4 wide SIMD) Symmetric eigennlysis only ([Rivers nd Jmes 7], sclr) Closed form eigenvlue computtion only (sclr) Computtion of digonlizing quternion (sclr) Time per decomposition (ns) core, thred core, 4thred Figure 4: Comprison of vrious lgorithm for 3 3 eigennlysis tsks Single threded nd -core/4-thred times re given, normlized to the time required for every individul decomposition Note tht some of the methods my not be directly comprble; refer to the text for discussion of differences nd ssumptions It should be noted tht these performnce numbers cnnot be tken s bsolute nd definitive mesures of the superiority of n individul lgorithm, since number of fctors hve to be considered before ccepting these figures s commensurte Nmely: Mny vrints only ddress the symmetric eigennlysis problem, insted of the entire SVD (note tht for our lgorithm we need not only the polr decomposition, but the fctor V of the SVD s well) In order to llow for more fir comprison with these methods, we conducted comprisons with prefix of our method, tht stops when the symmetric eigennlysis hs been computed Insted of relying on published performnce figures, we rern the best implementtions of these techniques we could find, with the sme mchine/compiler/optimiztion settings used for our code lso, we multithreded mny of these lgorithms to give them the sme benefit of prllel execution (including the ltency-hiding fetures of hyperthreding, when vilble) For some of these lterntive lgorithms (or prts thereof) we hve resonble expecttion of SIMD potentil When compring our pproch to these methods, one should normlize to the sme vector width Note however tht this SIMD potentil my often NOT pply to the entire SVD process, but only frction of it (eg the symmetric eigennlysis) Stopping criteri Some lterntive lgorithms iterte until certin criterion hs been stisfied (eg the mximum offdigonl element hs been reduced below certin threshold) Insted, in our pproch we chose to implement fixed number of Jcobi sweeps The reson for this choice is tht when using SSE/SIMD the itertion cnnot be conveniently stopped for only some out of the decompositions tht re pcked into n SIMD sequence We previously explined why our choice of 4 sweeps is resonble one Perhps the most importnt differentiting fctor is the following: When ttempting to implement lterntive SVD methods s prt of n end-to-end system s [Mcdms et l ], we relized tht certin lterntives were simply not cceptble for the purposes of specific pplictions simple exmple is the FstLSM-type decomposition [Rivers nd Jmes 7], which computes the fctor S of F RS using Jcobi symmetric eigennlysis, nd then forms R s R FS The wy S is constructed, it is lwys positive definite mtrix; thus, in the presence of inversion where often det(f) <, the produced polr decomposition will produce fctor R tht contins reflection (ie det(r) ) In cses with ner-zero singulr vlues, the produced fctor R my severely lck orthogonlity s well See [Mcdms et l ] for further discussion of this issue References GOLUB, G, ND VN LON, C 989 Mtrix Computtions The John Hopkins University Press LOMONT, C 3 Fst inverse squre root Purdue University, MCDMS,, ZHU, Y, SELLE,, EMPEY, M, TMSTORF, R, TERN, J, ND SIFKIS, E Efficient elsticity for chrcter skinning with contct nd collisions CM Trns Grph RIVERS,, ND JMES, D 7 FstLSM: fst lttice shpe mtching for robust rel-time deformtion CM Trns Grph (SIGGRPH Proc) 6, 3 SMITH, O K 96 Eigenvlues of symmetric 3x3 mtrix Commun CM 4 (pril), 68
Math 1B, lecture 4: Error bounds for numerical methods
Mth B, lecture 4: Error bounds for numericl methods Nthn Pflueger 4 September 0 Introduction The five numericl methods descried in the previous lecture ll operte by the sme principle: they pproximte the
More informationNumerical Linear Algebra Assignment 008
Numericl Liner Algebr Assignment 008 Nguyen Qun B Hong Students t Fculty of Mth nd Computer Science, Ho Chi Minh University of Science, Vietnm emil. nguyenqunbhong@gmil.com blog. http://hongnguyenqunb.wordpress.com
More informationHow do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?
XII. LINEAR ALGEBRA: SOLVING SYSTEMS OF EQUATIONS Tody we re going to tlk bout solving systems of liner equtions. These re problems tht give couple of equtions with couple of unknowns, like: 6 2 3 7 4
More informationHere we study square linear systems and properties of their coefficient matrices as they relate to the solution set of the linear system.
Section 24 Nonsingulr Liner Systems Here we study squre liner systems nd properties of their coefficient mtrices s they relte to the solution set of the liner system Let A be n n Then we know from previous
More informationp-adic Egyptian Fractions
p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction
More informationChapter 4 Contravariance, Covariance, and Spacetime Diagrams
Chpter 4 Contrvrince, Covrince, nd Spcetime Digrms 4. The Components of Vector in Skewed Coordintes We hve seen in Chpter 3; figure 3.9, tht in order to show inertil motion tht is consistent with the Lorentz
More informationLecture 14: Quadrature
Lecture 14: Qudrture This lecture is concerned with the evlution of integrls fx)dx 1) over finite intervl [, b] The integrnd fx) is ssumed to be rel-vlues nd smooth The pproximtion of n integrl by numericl
More informationThe Regulated and Riemann Integrals
Chpter 1 The Regulted nd Riemnn Integrls 1.1 Introduction We will consider severl different pproches to defining the definite integrl f(x) dx of function f(x). These definitions will ll ssign the sme vlue
More informationLecture Note 9: Orthogonal Reduction
MATH : Computtionl Methods of Liner Algebr 1 The Row Echelon Form Lecture Note 9: Orthogonl Reduction Our trget is to solve the norml eution: Xinyi Zeng Deprtment of Mthemticl Sciences, UTEP A t Ax = A
More informationLecture 19: Continuous Least Squares Approximation
Lecture 19: Continuous Lest Squres Approximtion 33 Continuous lest squres pproximtion We begn 31 with the problem of pproximting some f C[, b] with polynomil p P n t the discrete points x, x 1,, x m for
More informationAbstract inner product spaces
WEEK 4 Abstrct inner product spces Definition An inner product spce is vector spce V over the rel field R equipped with rule for multiplying vectors, such tht the product of two vectors is sclr, nd the
More informationChapter 3 Polynomials
Dr M DRAIEF As described in the introduction of Chpter 1, pplictions of solving liner equtions rise in number of different settings In prticulr, we will in this chpter focus on the problem of modelling
More informationMath 520 Final Exam Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008
Mth 520 Finl Exm Topic Outline Sections 1 3 (Xio/Dums/Liw) Spring 2008 The finl exm will be held on Tuesdy, My 13, 2-5pm in 117 McMilln Wht will be covered The finl exm will cover the mteril from ll of
More informationTHE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS.
THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS RADON ROSBOROUGH https://intuitiveexplntionscom/picrd-lindelof-theorem/ This document is proof of the existence-uniqueness theorem
More information5.7 Improper Integrals
458 pplictions of definite integrls 5.7 Improper Integrls In Section 5.4, we computed the work required to lift pylod of mss m from the surfce of moon of mss nd rdius R to height H bove the surfce of the
More informationDuality # Second iteration for HW problem. Recall our LP example problem we have been working on, in equality form, is given below.
Dulity #. Second itertion for HW problem Recll our LP emple problem we hve been working on, in equlity form, is given below.,,,, 8 m F which, when written in slightly different form, is 8 F Recll tht we
More information1 Online Learning and Regret Minimization
2.997 Decision-Mking in Lrge-Scle Systems My 10 MIT, Spring 2004 Hndout #29 Lecture Note 24 1 Online Lerning nd Regret Minimiztion In this lecture, we consider the problem of sequentil decision mking in
More informationA REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007
A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H Thoms Shores Deprtment of Mthemtics University of Nebrsk Spring 2007 Contents Rtes of Chnge nd Derivtives 1 Dierentils 4 Are nd Integrls 5 Multivrite Clculus
More informationReview of Calculus, cont d
Jim Lmbers MAT 460 Fll Semester 2009-10 Lecture 3 Notes These notes correspond to Section 1.1 in the text. Review of Clculus, cont d Riemnn Sums nd the Definite Integrl There re mny cses in which some
More informationMatrices, Moments and Quadrature, cont d
Jim Lmbers MAT 285 Summer Session 2015-16 Lecture 2 Notes Mtrices, Moments nd Qudrture, cont d We hve described how Jcobi mtrices cn be used to compute nodes nd weights for Gussin qudrture rules for generl
More informationMath& 152 Section Integration by Parts
Mth& 5 Section 7. - Integrtion by Prts Integrtion by prts is rule tht trnsforms the integrl of the product of two functions into other (idelly simpler) integrls. Recll from Clculus I tht given two differentible
More informationHW3, Math 307. CSUF. Spring 2007.
HW, Mth 7. CSUF. Spring 7. Nsser M. Abbsi Spring 7 Compiled on November 5, 8 t 8:8m public Contents Section.6, problem Section.6, problem Section.6, problem 5 Section.6, problem 7 6 5 Section.6, problem
More informationTheoretical foundations of Gaussian quadrature
Theoreticl foundtions of Gussin qudrture 1 Inner product vector spce Definition 1. A vector spce (or liner spce) is set V = {u, v, w,...} in which the following two opertions re defined: (A) Addition of
More informationNUMERICAL INTEGRATION. The inverse process to differentiation in calculus is integration. Mathematically, integration is represented by.
NUMERICAL INTEGRATION 1 Introduction The inverse process to differentition in clculus is integrtion. Mthemticlly, integrtion is represented by f(x) dx which stnds for the integrl of the function f(x) with
More informationChapter 14. Matrix Representations of Linear Transformations
Chpter 4 Mtrix Representtions of Liner Trnsformtions When considering the Het Stte Evolution, we found tht we could describe this process using multipliction by mtrix. This ws nice becuse computers cn
More informationMath 270A: Numerical Linear Algebra
Mth 70A: Numericl Liner Algebr Instructor: Michel Holst Fll Qurter 014 Homework Assignment #3 Due Give to TA t lest few dys before finl if you wnt feedbck. Exercise 3.1. (The Bsic Liner Method for Liner
More informationQuadratic Forms. Quadratic Forms
Qudrtic Forms Recll the Simon & Blume excerpt from n erlier lecture which sid tht the min tsk of clculus is to pproximte nonliner functions with liner functions. It s ctully more ccurte to sy tht we pproximte
More information1 Orthogonalisation in finite precision arithmetic
1 Orthogonlistion in finite precision rithmetic We investigte the differences nd similrities between the following four wys to compute the QR-decomposition of given rectngulr mtrix A C m n in Mtlb: (CGS)
More informationARITHMETIC OPERATIONS. The real numbers have the following properties: a b c ab ac
REVIEW OF ALGEBRA Here we review the bsic rules nd procedures of lgebr tht you need to know in order to be successful in clculus. ARITHMETIC OPERATIONS The rel numbers hve the following properties: b b
More informationBest Approximation in the 2-norm
Jim Lmbers MAT 77 Fll Semester 1-11 Lecture 1 Notes These notes correspond to Sections 9. nd 9.3 in the text. Best Approximtion in the -norm Suppose tht we wish to obtin function f n (x) tht is liner combintion
More informationMatrix Solution to Linear Equations and Markov Chains
Trding Systems nd Methods, Fifth Edition By Perry J. Kufmn Copyright 2005, 2013 by Perry J. Kufmn APPENDIX 2 Mtrix Solution to Liner Equtions nd Mrkov Chins DIRECT SOLUTION AND CONVERGENCE METHOD Before
More information12 TRANSFORMING BIVARIATE DENSITY FUNCTIONS
1 TRANSFORMING BIVARIATE DENSITY FUNCTIONS Hving seen how to trnsform the probbility density functions ssocited with single rndom vrible, the next logicl step is to see how to trnsform bivrite probbility
More informationN 0 completions on partial matrices
N 0 completions on prtil mtrices C. Jordán C. Mendes Arújo Jun R. Torregros Instituto de Mtemátic Multidisciplinr / Centro de Mtemátic Universidd Politécnic de Vlenci / Universidde do Minho Cmino de Ver
More informationCMDA 4604: Intermediate Topics in Mathematical Modeling Lecture 19: Interpolation and Quadrature
CMDA 4604: Intermedite Topics in Mthemticl Modeling Lecture 19: Interpoltion nd Qudrture In this lecture we mke brief diversion into the res of interpoltion nd qudrture. Given function f C[, b], we sy
More informationProperties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives
Block #6: Properties of Integrls, Indefinite Integrls Gols: Definition of the Definite Integrl Integrl Clcultions using Antiderivtives Properties of Integrls The Indefinite Integrl 1 Riemnn Sums - 1 Riemnn
More information7.2 The Definite Integral
7.2 The Definite Integrl the definite integrl In the previous section, it ws found tht if function f is continuous nd nonnegtive, then the re under the grph of f on [, b] is given by F (b) F (), where
More informationHow do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?
XII. LINEAR ALGEBRA: SOLVING SYSTEMS OF EQUATIONS Tody we re going to tlk out solving systems of liner equtions. These re prolems tht give couple of equtions with couple of unknowns, like: 6= x + x 7=
More informationNatural examples of rings are the ring of integers, a ring of polynomials in one variable, the ring
More generlly, we define ring to be non-empty set R hving two binry opertions (we ll think of these s ddition nd multipliction) which is n Abelin group under + (we ll denote the dditive identity by 0),
More information13.3 CLASSICAL STRAIGHTEDGE AND COMPASS CONSTRUCTIONS
33 CLASSICAL STRAIGHTEDGE AND COMPASS CONSTRUCTIONS As simple ppliction of the results we hve obtined on lgebric extensions, nd in prticulr on the multiplictivity of extension degrees, we cn nswer (in
More informationSUMMER KNOWHOW STUDY AND LEARNING CENTRE
SUMMER KNOWHOW STUDY AND LEARNING CENTRE Indices & Logrithms 2 Contents Indices.2 Frctionl Indices.4 Logrithms 6 Exponentil equtions. Simplifying Surds 13 Opertions on Surds..16 Scientific Nottion..18
More informationState space systems analysis (continued) Stability. A. Definitions A system is said to be Asymptotically Stable (AS) when it satisfies
Stte spce systems nlysis (continued) Stbility A. Definitions A system is sid to be Asymptoticlly Stble (AS) when it stisfies ut () = 0, t > 0 lim xt () 0. t A system is AS if nd only if the impulse response
More informationNumerical Integration
Chpter 5 Numericl Integrtion Numericl integrtion is the study of how the numericl vlue of n integrl cn be found. Methods of function pproximtion discussed in Chpter??, i.e., function pproximtion vi the
More informationMAA 4212 Improper Integrals
Notes by Dvid Groisser, Copyright c 1995; revised 2002, 2009, 2014 MAA 4212 Improper Integrls The Riemnn integrl, while perfectly well-defined, is too restrictive for mny purposes; there re functions which
More informationBernoulli Numbers Jeff Morton
Bernoulli Numbers Jeff Morton. We re interested in the opertor e t k d k t k, which is to sy k tk. Applying this to some function f E to get e t f d k k tk d k f f + d k k tk dk f, we note tht since f
More informationRecitation 3: More Applications of the Derivative
Mth 1c TA: Pdric Brtlett Recittion 3: More Applictions of the Derivtive Week 3 Cltech 2012 1 Rndom Question Question 1 A grph consists of the following: A set V of vertices. A set E of edges where ech
More informationThe First Fundamental Theorem of Calculus. If f(x) is continuous on [a, b] and F (x) is any antiderivative. f(x) dx = F (b) F (a).
The Fundmentl Theorems of Clculus Mth 4, Section 0, Spring 009 We now know enough bout definite integrls to give precise formultions of the Fundmentl Theorems of Clculus. We will lso look t some bsic emples
More informationW. We shall do so one by one, starting with I 1, and we shall do it greedily, trying
Vitli covers 1 Definition. A Vitli cover of set E R is set V of closed intervls with positive length so tht, for every δ > 0 nd every x E, there is some I V with λ(i ) < δ nd x I. 2 Lemm (Vitli covering)
More informationBest Approximation. Chapter The General Case
Chpter 4 Best Approximtion 4.1 The Generl Cse In the previous chpter, we hve seen how n interpolting polynomil cn be used s n pproximtion to given function. We now wnt to find the best pproximtion to given
More informationPhysics 116C Solution of inhomogeneous ordinary differential equations using Green s functions
Physics 6C Solution of inhomogeneous ordinry differentil equtions using Green s functions Peter Young November 5, 29 Homogeneous Equtions We hve studied, especilly in long HW problem, second order liner
More informationReview of basic calculus
Review of bsic clculus This brief review reclls some of the most importnt concepts, definitions, nd theorems from bsic clculus. It is not intended to tech bsic clculus from scrtch. If ny of the items below
More informationThe Algebra (al-jabr) of Matrices
Section : Mtri lgebr nd Clculus Wshkewicz College of Engineering he lgebr (l-jbr) of Mtrices lgebr s brnch of mthemtics is much broder thn elementry lgebr ll of us studied in our high school dys. In sense
More informationMath 8 Winter 2015 Applications of Integration
Mth 8 Winter 205 Applictions of Integrtion Here re few importnt pplictions of integrtion. The pplictions you my see on n exm in this course include only the Net Chnge Theorem (which is relly just the Fundmentl
More informationMATH34032: Green s Functions, Integral Equations and the Calculus of Variations 1
MATH34032: Green s Functions, Integrl Equtions nd the Clculus of Vritions 1 Section 1 Function spces nd opertors Here we gives some brief detils nd definitions, prticulrly relting to opertors. For further
More informationLecture 1. Functional series. Pointwise and uniform convergence.
1 Introduction. Lecture 1. Functionl series. Pointwise nd uniform convergence. In this course we study mongst other things Fourier series. The Fourier series for periodic function f(x) with period 2π is
More informationA recursive construction of efficiently decodable list-disjunct matrices
CSE 709: Compressed Sensing nd Group Testing. Prt I Lecturers: Hung Q. Ngo nd Atri Rudr SUNY t Bufflo, Fll 2011 Lst updte: October 13, 2011 A recursive construction of efficiently decodble list-disjunct
More informationNumerical Integration
Chpter 1 Numericl Integrtion Numericl differentition methods compute pproximtions to the derivtive of function from known vlues of the function. Numericl integrtion uses the sme informtion to compute numericl
More informationMORE FUNCTION GRAPHING; OPTIMIZATION. (Last edited October 28, 2013 at 11:09pm.)
MORE FUNCTION GRAPHING; OPTIMIZATION FRI, OCT 25, 203 (Lst edited October 28, 203 t :09pm.) Exercise. Let n be n rbitrry positive integer. Give n exmple of function with exctly n verticl symptotes. Give
More informationDiscrete Least-squares Approximations
Discrete Lest-squres Approximtions Given set of dt points (x, y ), (x, y ),, (x m, y m ), norml nd useful prctice in mny pplictions in sttistics, engineering nd other pplied sciences is to construct curve
More informationImproper Integrals, and Differential Equations
Improper Integrls, nd Differentil Equtions October 22, 204 5.3 Improper Integrls Previously, we discussed how integrls correspond to res. More specificlly, we sid tht for function f(x), the region creted
More informationExam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1
Exm, Mthemtics 471, Section ETY6 6:5 pm 7:4 pm, Mrch 1, 16, IH-115 Instructor: Attil Máté 1 17 copies 1. ) Stte the usul sufficient condition for the fixed-point itertion to converge when solving the eqution
More informationLecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.
Lecture 3 3 Solving liner equtions In this lecture we will discuss lgorithms for solving systems of liner equtions Multiplictive identity Let us restrict ourselves to considering squre mtrices since one
More informationLINEAR ALGEBRA AND MATRICES. n ij. is called the main diagonal or principal diagonal of A. A column vector is a matrix that has only one column.
PART 1 LINEAR ALGEBRA AND MATRICES Generl Nottions Mtri (denoted by cpitl boldfce letter) A is n m n mtri. 11 1... 1 n 1... n A ij...... m1 m... mn ij denotes the component t row i nd column j of A. If
More informationChapter 6 Techniques of Integration
MA Techniques of Integrtion Asst.Prof.Dr.Suprnee Liswdi Chpter 6 Techniques of Integrtion Recll: Some importnt integrls tht we hve lernt so fr. Tle of Integrls n+ n d = + C n + e d = e + C ( n ) d = ln
More informationPart IB Numerical Analysis
Prt IB Numericl Anlysis Theorems with proof Bsed on lectures by G. Moore Notes tken by Dexter Chu Lent 2016 These notes re not endorsed by the lecturers, nd I hve modified them (often significntly) fter
More informationP 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0)
1 Tylor polynomils In Section 3.5, we discussed how to pproximte function f(x) round point in terms of its first derivtive f (x) evluted t, tht is using the liner pproximtion f() + f ()(x ). We clled this
More informationStuff You Need to Know From Calculus
Stuff You Need to Know From Clculus For the first time in the semester, the stuff we re doing is finlly going to look like clculus (with vector slnt, of course). This mens tht in order to succeed, you
More informationNumerical Analysis: Trapezoidal and Simpson s Rule
nd Simpson s Mthemticl question we re interested in numericlly nswering How to we evlute I = f (x) dx? Clculus tells us tht if F(x) is the ntiderivtive of function f (x) on the intervl [, b], then I =
More informationECO 317 Economics of Uncertainty Fall Term 2007 Notes for lectures 4. Stochastic Dominance
Generl structure ECO 37 Economics of Uncertinty Fll Term 007 Notes for lectures 4. Stochstic Dominnce Here we suppose tht the consequences re welth mounts denoted by W, which cn tke on ny vlue between
More informationAPPROXIMATE INTEGRATION
APPROXIMATE INTEGRATION. Introduction We hve seen tht there re functions whose nti-derivtives cnnot be expressed in closed form. For these resons ny definite integrl involving these integrnds cnnot be
More informationMarkscheme May 2016 Mathematics Standard level Paper 1
M6/5/MATME/SP/ENG/TZ/XX/M Mrkscheme My 06 Mthemtics Stndrd level Pper 7 pges M6/5/MATME/SP/ENG/TZ/XX/M This mrkscheme is the property of the Interntionl Bcclurete nd must not be reproduced or distributed
More information13: Diffusion in 2 Energy Groups
3: Diffusion in Energy Groups B. Rouben McMster University Course EP 4D3/6D3 Nucler Rector Anlysis (Rector Physics) 5 Sept.-Dec. 5 September Contents We study the diffusion eqution in two energy groups
More informationSection 6.1 INTRO to LAPLACE TRANSFORMS
Section 6. INTRO to LAPLACE TRANSFORMS Key terms: Improper Integrl; diverge, converge A A f(t)dt lim f(t)dt Piecewise Continuous Function; jump discontinuity Function of Exponentil Order Lplce Trnsform
More informationGeometric Sequences. Geometric Sequence a sequence whose consecutive terms have a common ratio.
Geometric Sequences Geometric Sequence sequence whose consecutive terms hve common rtio. Geometric Sequence A sequence is geometric if the rtios of consecutive terms re the sme. 2 3 4... 2 3 The number
More informationApplicable Analysis and Discrete Mathematics available online at
Applicble Anlysis nd Discrete Mthemtics vilble online t http://pefmth.etf.rs Appl. Anl. Discrete Mth. 4 (2010), 23 31. doi:10.2298/aadm100201012k NUMERICAL ANALYSIS MEETS NUMBER THEORY: USING ROOTFINDING
More informationThings to Memorize: A Partial List. January 27, 2017
Things to Memorize: A Prtil List Jnury 27, 2017 Chpter 2 Vectors - Bsic Fcts A vector hs mgnitude (lso clled size/length/norm) nd direction. It does not hve fixed position, so the sme vector cn e moved
More informationGoals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite
Unit #8 : The Integrl Gols: Determine how to clculte the re described by function. Define the definite integrl. Eplore the reltionship between the definite integrl nd re. Eplore wys to estimte the definite
More informationEngineering Analysis ENG 3420 Fall Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00
Engineering Anlysis ENG 3420 Fll 2009 Dn C. Mrinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00 Lecture 13 Lst time: Problem solving in preprtion for the quiz Liner Algebr Concepts Vector Spces,
More informationHow can we approximate the area of a region in the plane? What is an interpretation of the area under the graph of a velocity function?
Mth 125 Summry Here re some thoughts I ws hving while considering wht to put on the first midterm. The core of your studying should be the ssigned homework problems: mke sure you relly understnd those
More informationIntegral points on the rational curve
Integrl points on the rtionl curve y x bx c x ;, b, c integers. Konstntine Zeltor Mthemtics University of Wisconsin - Mrinette 750 W. Byshore Street Mrinette, WI 5443-453 Also: Konstntine Zeltor P.O. Box
More informationUNIFORM CONVERGENCE. Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3
UNIFORM CONVERGENCE Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3 Suppose f n : Ω R or f n : Ω C is sequence of rel or complex functions, nd f n f s n in some sense. Furthermore,
More informationSufficient condition on noise correlations for scalable quantum computing
Sufficient condition on noise correltions for sclble quntum computing John Presill, 2 Februry 202 Is quntum computing sclble? The ccurcy threshold theorem for quntum computtion estblishes tht sclbility
More informationThe Islamic University of Gaza Faculty of Engineering Civil Engineering Department. Numerical Analysis ECIV Chapter 11
The Islmic University of Gz Fculty of Engineering Civil Engineering Deprtment Numericl Anlysis ECIV 6 Chpter Specil Mtrices nd Guss-Siedel Associte Prof Mzen Abultyef Civil Engineering Deprtment, The Islmic
More informationOverview of Calculus I
Overview of Clculus I Prof. Jim Swift Northern Arizon University There re three key concepts in clculus: The limit, the derivtive, nd the integrl. You need to understnd the definitions of these three things,
More informationWe partition C into n small arcs by forming a partition of [a, b] by picking s i as follows: a = s 0 < s 1 < < s n = b.
Mth 255 - Vector lculus II Notes 4.2 Pth nd Line Integrls We begin with discussion of pth integrls (the book clls them sclr line integrls). We will do this for function of two vribles, but these ides cn
More information1. Gauss-Jacobi quadrature and Legendre polynomials. p(t)w(t)dt, p {p(x 0 ),...p(x n )} p(t)w(t)dt = w k p(x k ),
1. Guss-Jcobi qudrture nd Legendre polynomils Simpson s rule for evluting n integrl f(t)dt gives the correct nswer with error of bout O(n 4 ) (with constnt tht depends on f, in prticulr, it depends on
More informationEE263 homework 8 solutions
EE263 Prof S Boyd EE263 homework 8 solutions 37 FIR filter with smll feedbck Consider cscde of 00 one-smple delys: u z z y () Express this s liner dynmicl system x(t + ) = Ax(t) + Bu(t), y(t) = Cx(t) +
More informationNew data structures to reduce data size and search time
New dt structures to reduce dt size nd serch time Tsuneo Kuwbr Deprtment of Informtion Sciences, Fculty of Science, Kngw University, Hirtsuk-shi, Jpn FIT2018 1D-1, No2, pp1-4 Copyright (c)2018 by The Institute
More informationSummary Information and Formulae MTH109 College Algebra
Generl Formuls Summry Informtion nd Formule MTH109 College Algebr Temperture: F = 9 5 C + 32 nd C = 5 ( 9 F 32 ) F = degrees Fhrenheit C = degrees Celsius Simple Interest: I = Pr t I = Interest erned (chrged)
More informationf(x) dx, If one of these two conditions is not met, we call the integral improper. Our usual definition for the value for the definite integral
Improper Integrls Every time tht we hve evluted definite integrl such s f(x) dx, we hve mde two implicit ssumptions bout the integrl:. The intervl [, b] is finite, nd. f(x) is continuous on [, b]. If one
More informationAdvanced Calculus: MATH 410 Notes on Integrals and Integrability Professor David Levermore 17 October 2004
Advnced Clculus: MATH 410 Notes on Integrls nd Integrbility Professor Dvid Levermore 17 October 2004 1. Definite Integrls In this section we revisit the definite integrl tht you were introduced to when
More informationMAT 168: Calculus II with Analytic Geometry. James V. Lambers
MAT 68: Clculus II with Anlytic Geometry Jmes V. Lmbers Februry 7, Contents Integrls 5. Introduction............................ 5.. Differentil Clculus nd Quotient Formuls...... 5.. Integrl Clculus nd
More informationStudent Activity 3: Single Factor ANOVA
MATH 40 Student Activity 3: Single Fctor ANOVA Some Bsic Concepts In designed experiment, two or more tretments, or combintions of tretments, is pplied to experimentl units The number of tretments, whether
More information20 MATHEMATICS POLYNOMIALS
0 MATHEMATICS POLYNOMIALS.1 Introduction In Clss IX, you hve studied polynomils in one vrible nd their degrees. Recll tht if p(x) is polynomil in x, the highest power of x in p(x) is clled the degree of
More informationAcceptance Sampling by Attributes
Introduction Acceptnce Smpling by Attributes Acceptnce smpling is concerned with inspection nd decision mking regrding products. Three spects of smpling re importnt: o Involves rndom smpling of n entire
More informationNOTES ON HILBERT SPACE
NOTES ON HILBERT SPACE 1 DEFINITION: by Prof C-I Tn Deprtment of Physics Brown University A Hilbert spce is n inner product spce which, s metric spce, is complete We will not present n exhustive mthemticl
More informationODE: Existence and Uniqueness of a Solution
Mth 22 Fll 213 Jerry Kzdn ODE: Existence nd Uniqueness of Solution The Fundmentl Theorem of Clculus tells us how to solve the ordinry differentil eqution (ODE) du = f(t) dt with initil condition u() =
More informationUnit #9 : Definite Integral Properties; Fundamental Theorem of Calculus
Unit #9 : Definite Integrl Properties; Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl
More information2. VECTORS AND MATRICES IN 3 DIMENSIONS
2 VECTORS AND MATRICES IN 3 DIMENSIONS 21 Extending the Theory of 2-dimensionl Vectors x A point in 3-dimensionl spce cn e represented y column vector of the form y z z-xis y-xis z x y x-xis Most of the
More informationOrthogonal Polynomials and Least-Squares Approximations to Functions
Chpter Orthogonl Polynomils nd Lest-Squres Approximtions to Functions **4/5/3 ET. Discrete Lest-Squres Approximtions Given set of dt points (x,y ), (x,y ),..., (x m,y m ), norml nd useful prctice in mny
More informationPhysics 201 Lab 3: Measurement of Earth s local gravitational field I Data Acquisition and Preliminary Analysis Dr. Timothy C. Black Summer I, 2018
Physics 201 Lb 3: Mesurement of Erth s locl grvittionl field I Dt Acquisition nd Preliminry Anlysis Dr. Timothy C. Blck Summer I, 2018 Theoreticl Discussion Grvity is one of the four known fundmentl forces.
More information