Turinys. Turinys: Kurso tikslai. Olga Štikonienė. privalumus ir trūkumus); Tiesines algebros uždaviniai

Size: px
Start display at page:

Download "Turinys. Turinys: Kurso tikslai. Olga Štikonienė. privalumus ir trūkumus); Tiesines algebros uždaviniai"

Transcription

1 Turinys Tiesinių lygčių sistemų sprendimas Olga Štikonienė Diferencialinių lygčių ir skaičiavimo matematikos katedra, MIF VU Istorinė apžvalga TLS sprendimas 3 4 Tiesinių lygčių sistemų sprendimas / 58 Tiesinių lygčių sistemų sprendimas / 58 Kurso tikslai Turinys: Įvertinti skirtingus skaitinius sprendimo metodus (žinant jų privalumus ir trūkumus); Įgyti galimybę skaitiškai spręsti taikomuosius uždavinius Sandas: Supažindinama su skaitiniais metodais sprendžiant įvairaus tipo tiesinės algebros uždavinius Pateikiami teoriniai tokių uždavinių stabilumo ir konvergavimo analizės pagrindai Supažindinama su aprioriniais ir aposterioriniais paklaidos nustatymo būdais Mokoma kaip įveikti skaičiavimo metu iškylančius įvairius sunkumus Tiesinių lygčių sistemų sprendimas 3 / 58 Tiesines algebros uždaviniai Tiesinių lygčių sistemų sprendimas Tikrinių reikšmių uždavinys Atvirkštinių ir pseudoatvirkštinių matricų radimas Matricinių daugianarių ir matricinių lygčių sprendimas Tiesinių lygčių sistemų tiesioginiai sprendimo metodai Tiesinių lygčių sistemų iteraciniai sprendimo metodai 3 Tiesinių lygčių sistemų variaciniai sprendimo metodai Tiesinių lygčių sistemų sprendimas 4 / 58 Literatūra Ten surprises from numerical linear algebra VBūda, RČiegis Skaičiuojamoji matematika, Vilnius: TEV, 997 BKvedaras, MSapagovas Skaičiavimo metodai, V: Mintis, LN Trefethen, D Baw Numerical Linear Algebra, SIAM, JW Demmel Applied Numerical Linear Algebra, SIAM, E Suli and D F Mayers An Introduction to Numerical Analysis, Cambridge University Press, 3 6 CDMeyer Matrix Analysis and Applied Linear Algebra, SIAM, 7 JHMathews, KDFink Numerical methods Using MATLAB, Prentice Hall, AQuarteroni, FSaleri and P Gervasio Scientific Computing with MATLAB and Octave Springer, 9 AQuarteroni, RSacco, FSaleri Numerical Mathematics, Springer, wwwjohndcookcom/blog////ten-surprises-from-numerical-linear-algebra/ Here are ten things about numerical linear algebra that you may find surprising if you re not familiar with the field Numerical linear algebra applies very advanced mathematics to solve problems that can be stated with high school mathematics Practical applications often require solving enormous systems of equations, millions or even billions of variables 3 The heart of Google is an enormous linear algebra problem PageRank is essentially an eigenvalue problem 4 The efficiency of solving very large systems of equations has benefited at least as much from advances in algorithms as from Moore s law 5 Many practical problems optimization, differential equations, signal processing, etc boil down to solving linear systems, even when the original problems are non-linear Finite element software, for example, spends nearly all its time solving linear equations 6 A system of a million equations can sometimes be solved on an ordinary PC in under a millisecond, depending on the structure of the equations 7 Iterative methods, methods that in theory require an infinite number of steps to solve a problem, are often faster and more accurate than direct methods, methods that in theory produce an exact answer in a finite number of steps 8 There are many theorems bounding the error in solutions produced on real computers That is, the theorems don t just bound the error from hypothetical calculations carried out in exact arithmetic but bound the error from arithmetic as carried out in floating point arithmetic on computer hardware 9 It is hardly ever necessary to compute the inverse of a matrix There is remarkably mature software for numerical linear algebra Brilliant people have worked on this software for many years Tiesinių lygčių sistemų sprendimas 5 / 58 Tiesinių lygčių sistemų sprendimas 6 / 58 p(x) = a 4 x 4 + a 3 x 3 + a x + a x + a q(x) = d 5 x 5 + d 4 x 4 + d 3 x 3 + d x + d x + d Here are three more examples of problems that can be solved in principle by a finite sequence of elementary operations, like rootfinding for p (i) Linear equations: solve a system of n linear equations in n unknowns (ii) Linear programming: minimize a linear function of n variables subject to m linear constraints (iii) Traveling salesman problem: find the shortest tour between n cities And here are five that, like rootfinding for q, cannot generally be solved in this manner (iv) Find an eigenvalue of an n n matrix (v) Minimize a function of several variables (vi) Evaluate an integral (vii) Solve an ordinary differential equation (ODE) (viii) Solve a partial differential equation (PDE) Tiesinių lygčių sistemų sprendimas 7 / 58 Tiesinių lygčių sistemų sprendimas 8 / 58

2 Istorinė apžvalga Gene Golub / History of Numerical Linear Algebra Istorinė apžvalga Top Ten Algorithms in Science (Dongarra and Sullivan, ) Numerical analysis motivated the development of the earliest computers Ballistics Solution of PDE s Data Analysis Early pioneers included: J von Neumann A M Turing In the beginning von Neumann & Goldstine (947): Numerical Inversion of Matrices of High Order Tiesinių lygčių sistemų sprendimas 9 / 58 Metropolis Algorithm (Monte Carlo method) (946) Simplex Method for Linear Programming (947) 3 Krylov Subspace Iteration Methods (95) 4 The Decompositional Approach to Matrix Computations (95) 5 The Fortran Optimizing Compiler (957) 6 QR Algorithm for Computing Eigenvalues (959-6) 7 Quicksort Algorithm for Sorting (96) 8 Fast Fourier Transform (965) 9 Integer Relation Detection Algorithm (977) Fast Multipole Method (987) Red: Algorithms within the exclusive domain of numerical linear algebra (NLA) research Blue: Algorithms strongly (though not exclusively) connected to NLA research Tiesinių lygčių sistemų sprendimas / 58 Istorinė apžvalga Stability and Well-Posedness: Algorithm vs Problem Istorinė apžvalga A Little Bit About Gaussian Elimination Fundamentally important to distinguish between the conditioning of the problem and the stability of the algorithm Even if an algorithm is stable, not all problems can be solved using it Making the problem well-posed responsibility of modeller Making the algorithm stable responsibility of numerical analyst A good algorithm is one for which a small change in the input of a well-posed problem causes a small change in the output Computational efficiency Theoretically solving a problem is NOT equivalent that it could be solved with computer because of the computational efficiency! In general, an O(n 4 ) algorithm is unacceptable! Not off to a good start: The famous statistician Hotelling derived bounds so pessimistic that he recommended not to use it for large problems But there s a happy end: Goldstine and von Neumann s analysis of the Cholesky method for fixed point arithmetic Wilkinson s complete round-off error analysis of Gaussian Elimination in 96 Those developments were turning points for GE and it has become one of the most commonly used algorithms Tiesinių lygčių sistemų sprendimas / 58 Tiesinių lygčių sistemų sprendimas / 58 Taikymai TLS sprendimas TLS sprendimas Tiesinė lygčių sistema Žaliavos Žal norma, gaminant batų pora Žal sanaudos tipai Batai Basutės Aulinukai dienai S S 9 S Tegul kasdien gaminama x porų batų, x porų basučių ir x 3 porų aulinukų 5x + 3x + 4x 3 = 7 x + x + x 3 = 9 3x + x + x 3 = 6 a x + a x + + a n x n = b a x + a x + + a n x n = b a n x + a n x + + a nn x n = b n, Lygčių sistema patogu užrašyti matriciniu pavidalu a a a n Ax = b arba a a a n a n a n a nn x x x n = b b b n Atsakymas: x =, x = 3, x 3 = Tiesinių lygčių sistemų sprendimas 3 / 58 Tiesinių lygčių sistemų sprendimas 4 / 58 TLS sprendimas Matricų atskiri atvejai (žymėjimai) TLS sprendimas Juostinės matricos įstrižaininė matrica D = d d d 33 d 44 apatinė trikampė matrica a L = a a a 3 a 3 a 33 a 4 a 4 a 43 a 44 vienetinė matrica AI = IA = A I = viršutinė trikampė matrica U = a a a 3 a 4 a a 3 a 4 a 33 a 34 a 44 Juostinės matricos išskyrus juostas prie pagrindinės įstrižaines visi kiti elementai yra nuliniai Triįstrižainė matrica trys nenulinės įstrižainės a a T = a a a 3 a 3 a 33 a 34 a 43 a 44 Tiesinių lygčių sistemų sprendimas 5 / 58 Tiesinių lygčių sistemų sprendimas 6 / 58

3 Tiesiniu lygc iu sistemu sprendimas - mažos matricos Blogai salygotas uždavinys Blogai sąlygotas uždavinys Graffinis sprendimas Gra det A,, Kai lygc iu sistemoje nedaug galima lengvai išspresti: Grafinis sprendimas; det A = x x = 3 Kramerio metodas; Kintamuju eliminavimas Graffinis sprendimas Gra Sprendinių nėra x x 3 x x 3 Graffinis Gra pertvarkome Vienintelis sprendinys sprendimas x x 3 x 3 x x = 3,x det A Be galogra daug sprendinių Graf finis sprendimas det A x + x = 3 x x = x x = 3 Sprendiniu ne ra Vienintelis sprendinys A = x x = 3 x x = 3 = 3; A = 6x 3x = 9 a x + a x = b a x + a x = b = ; A = 6 3 det A = = Tiesiniu lygc iu sistemu sprendimas =, b a b a Krypc iu koeficientai beveik lygus aa aa Kas atsitinka, kai TLS determinantas yra mažas? Be galo daug sprendiniu Analize ( x = aa x + x = aa x + 6 3, 7 / 58 a a a a det A = - tiesiškai priklausoma sistema Dalyba iš mažo skaic iaus : didele apvalinimo paklaida Reikšminiu skaitmenu praradimas Tiesiniu lygc iu sistemu sprendimas 8 / 58 Grafinis sprendimas: 3 lygtys Tiesiniu lygc iu sistemu (TLS) sprendimas Sistemos Ax = b vienintelis sprendinys egzistuoja, jei det A 6= Kramerio taisykle : det Ai xi = det A Pavyzdys: kompiuteriui, atliekanc iam operaciju/sec, 9 operaciju/sec (ty giga reikalinga: flops), reikalinga: = 3 3x y z x + 3y z = x+y z = 5 Graffinis sprendimas: Gra sprendimas: 3 lygtys MATLAB: xx=-::; yy=-::; [x,y]=meshgrid(xx,yy);»»» xx=-::; yy=-::; [x,y]=meshgrid(xx,yy); z=3*x-*y+3; z=-*x+3*y-; z3=x+y-5; surf(x,y,z); f( ) h hold ld on; surf(x,y,z); f( ) surf(x,y,z3); f( 3)»» z=3*x-*y+3; z=-*x+3*y-; z3=x+y-5;» surf(x,y,z); hold on; surf(x,y,z); surf(x,y,z3); n = 5 sec, n = 5 valandu, n = 34 metu, n = 34 min, n = 43 metai, n = metai, skaic iuojant determinantus pagal apibre žima (arba skleidžiant eilute) Alternatyva Tiesioginiai sprendimo metodai; Iteraciniai metodai Tiesiniu lygc iu sistemu sprendimas 9 / 58 Tiesiniu lygc iu sistemu sprendimas / 58 Tiesiniu lygc iu sistemu (TLS) sprendimas Tiesiniu lygc iu sistemu (TLS) sprendimas TLS Ax = b sprendimo metodu apžvalga Tiesioginiai metodai Iteraciniai metodai (< 4 nežinomuju) Tikslus sprendinys gaunamas per baigtini žingsniu skaic iu (< 7 nežinomuju) Randamas apytikslis sprendinys bet kokiu norimu tikslumu TLS Ax = b sprendimo metodu apžvalga Pasirinkimas tarp tiesioginiu ir iteraciniu metodu gali priklausyti nuo keliu faktoriu: teorinis metodo efektyvumas, Gauso; Jakobio; matricos tipas, Skaidos; Zeidelio; atminties laikymo reikalavimai, Choleckio; Relaksacijos; kompiuteriu architektu ra Perkelties Mišrusis; Variaciniai metodai (> 7 nežinomuju) Tiesiniu lygc iu sistemu sprendimas / 58 Nuoseklus nežinomuju šalinimas; (< 4 nežinomuju) Tikslus sprendinys gaunamas per baigtini žingsniu skaic iu Tiesioginiai metodai Skaidos metodai Axi = bi, i =,, m Choleckio metodas - taikomas, kai matrica A simetrine ir teigiamai apibre žta Perkelties algoritmas - sprendžia TLS su triistrižaine matrica Tiesiniu lygc iu sistemu sprendimas / 58 TLS Ax = b tiesioginiai sprendimo metodai Tiesiniu lygc iu sistemu sprendimas Sistemos matricos pertvarkymas i viršutine trikampe matrica a a an a a an a a n a a an A= U = an an ann a nn Sprendinys randamas iš pertvarkytosios sistemos Pirmoji lygtis yra pagrindine lygtis, a yra pagrindinis elementas (iš jo dalijama visa lygtis) ir tt (a ii ) Paprastas : a ii 6= 3 / 58 Tiesiniu lygc iu sistemu sprendimas 4 / 58

4 Gauso metodo esmė Tiesioginis metodas (nėra iteracijų) Tiesioginė eiga: Elementų po pagrindine įstrižaine nuoseklus šalinimas stulpeliuose; Suvedimas į viršutinę trikampę matrica Atbulinė eiga: Gaunamas sprendinys x = (x, x,, x n ) Ekvivalentieji pertvarkiai: Lygtis dauginama iš skaičiaus, nelygaus nuliui; Dvi lygtys keičiamos vietomis; Lygtis, padauginta iš skaičiaus, pridedama prie kitos lygties Gauso metodo algoritmas Tiesioginė eiga Su visais j : j =,, n su visais k : k = j +,, n j-aji lygtis dauginama iš a kj /a jj ir atimama iš k-osios lygties Gauname viršutinę trikampę matrica Atbulinė eiga ) apskaičiuojame x n : x n = b (n ) n /a (n ) nn ) įstatome x n į (n )-ajį lygtį ir randame x n ; 3) analogiškai kartojame ) ir apskaičiuojame x n, x n 3, x Tiesinių lygčių sistemų sprendimas 5 / 58 Tiesinių lygčių sistemų sprendimas 6 / 58 - analizė (Ax = b) Jei a ir l i := ai a, l G =, L l := I G := l n l n Akivaizdu, kad po pirmojo kintamojo eliminavimo: a a a n A () a a n = L A =, b() = L b a n a nn Ekvivalenti sistema A () x = b () Tiesinių lygčių sistemų sprendimas 7 / 58 Tiesinių lygčių sistemų sprendimas 8 / 58 Analogiškai po antro GM žingsnio A () x = b (), čia A () = L A (), b = L b (), a a a 3 a n A () a a 3 a n = a 33 a 3n, L = l 3, a n3 a nn l n b () = { b, b, b 3,, b n} Tiesinių lygčių sistemų sprendimas 9 / 58 - analizė ( Ax = b) Jei a k kk G k = ir l ik := ak ik a k kk, l k+,k, L k = l nk l k+,k l nk Po kojo kintamojo eliminavimo: a a a 3 a n A (k) = L k A (k ) a (k ) kk a (k ) kn = a (k) k+,k+ a (k), k+,n a (k) n,k+ a (k) n,n Ekvivalenti sistema A (k) x = b (k) Tiesinių lygčių sistemų sprendimas 3 / 58 Po n žingsnio gausime A (n ) x = b (n ), A (n ) = L n A (n ), b (n ) = L n b (n ), a a a 3 a n a A (n ) a 3 a n = a 33 a 3n, L n =, a (n ) nn ln,n b (n ) = {b, b, b 3,, bn n } Gauname u u u n u u n Ux = d u nn x x x n = d d d n Pavyzdys - Pažymėkime l kj = akj a jj l = l 3 = l 4 = 6 ( lygtis) l ( lygtis) (3 lygtis) l 3 ( lygtis) (4 lygtis) l 4 ( lygtis) Tiesinių lygčių sistemų sprendimas 3 / 58 Tiesinių lygčių sistemų sprendimas 3 / 58

5 Pavyzdys - kintamųjų šalinimas l 3 = / l 4 = (3 lygtis) l 3 ( lygtis) (4 lygtis) l 4 ( lygtis) Tiesinių lygčių sistemų sprendimas 33 / 58 Pavyzdys - kintamųjų šalinimas ir atbulinė eiga x 4 = 33 7 = 33 7, x 3 =4x 4 = 4 35, 5 x = x 3 = 8 35, x = x 3 3x 4 = 3 7 l 43 = 4 (4 lygtis) l 43 (3 lygtis) Sprendinys X = 33/7 4/35 8/35 3/7 Tiesinių lygčių sistemų sprendimas 34 / 58 Gauso metodo skaičiavimo apimtis Gauso metodo skaiciavimo apimtis Svarbi, kai matricos yra dideles Computational work estimate: one floating-point operation (flop) is one multiplication (or division) and possibly addition (or subtraction) as in y = a x + b, where a, x, b and y are computer representations of real scalars Tiesioginė eiga O( 3 n3 ) aritmetinių veiksmų; Atbulinė eiga O( n ) aritmetinių veiksmų Tiesinių lygčių sistemų sprendimas 35 / 58 Išorinis ciklas Vidinis ciklas +/ / j k veiksmai veiksmai, n (n )n (n )(n + ) 3, n (n )(n ) (n )n j j +, n (n j)(n j + ) (n j)(n j + ) n n, n 3 Tiesiogines eigos bendroji skaiciavimo apimtis = n 3 /3 + O(n ) aritmetiniu operaciju Atbulines eigos bendroji skaiciavimo apimtis = n + O(n) aritmetiniu operaciju Tiesinių lygčių sistemų sprendimas 36 / 58 Skaičiavimo operacijų apimtis Apvalinimo paklaidos Slankaus kablelio operacijų skaičius Gauso metodui n n Ties Atbul Bendras 3 3 % eiga eiga veiksmų sk Ties eiga , 58% , 53% 6, , , , 85% Augant n sparčiai didėja skaičiavimo laikas Daugiausiai veiksmų reikalauja tiesioginė eiga Metodo efektyvumas labiausiai priklauso nuo tiesioginės eigos Didelė dalis skaičiavimų su 3 n3 operacijų Svarbu paklaida didėja Didelėms sistemoms (virš lygčių), apvalinimo paklaida gali būti pakankamai didelė Blogai salygoti uždaviniai maži koeficientų pokyčiai lemia didelius sprendinių pokyčius Apvalinimo paklaidų analizė ypač svarbi blogai salygotiems uždaviniams Tiesinių lygčių sistemų sprendimas 37 / 58 Tiesinių lygčių sistemų sprendimas 38 / 58 Determinantas Pagrindinio elemento parinkimas Skaičiuojamas naudojant Gauso metoda: a a a 3 a n a a a 3 a n a a a 3 a n A = a 3 a 3 a 33 a 3n U = ã ã 3 ã n ã 33 ã 3n a n a n a n3 a nn ã nn det A = det U = a ã ã nn Gauso metodo galimi sunkumai Dalyba iš nulio Apvalinimo paklaidos Blogai salygoti uždaviniai Pagrindinio elemento parinkimas nereikalingas, jei Išpildyta pagrindinės įstrižainės vyravimo salyga a ii > n j=,j i a ji, i =,, n Matrica A yra simetrinė ir teigiamai apibrėžta A T = A, x (Ax, x) = x T Ax > Tiesinių lygčių sistemų sprendimas 39 / 58 Tiesinių lygčių sistemų sprendimas 4 / 58

6 Pagrindinio elemento parinkimo būdai Pagrindinio elemento parinkimas iš stulpelio elementų Pagrindinio elemento parinkimas iš stulpelio elementų: Pagrindinis elementas parenkamas iš stulpelio elementų Šios dvi lygtis sukeičiamos vietomis iš eilutes elementų: Pagrindinis elementas parenkamas iš pertvarkomos eilutes elementų Sukeičiamos vietomis matricos A stulpeliai ir įsimenama naujoji nežinomųjų tvarka 3 pagal lygties koeficientų modulių suma: Kiekvienoje lygtyje randamas didžiausiai koeficientas, iš jo padalijama atitinkama lygtis Lygtys sukeičiamos vietomis, pernumeruojami nežinomieji Pertvarkant k-aj a eilutę, randama kita lygtis, kurioje koeficientas prie x k yra didžiausias; pažymėkime šios lygties numerį m; šiuo atveju pagrindinis elementas yra a mk = max kin a ik Šios dvi lygtys sukeičiamos vietomis, ir m-osios lygties koeficientas prie x k tampa pagrindiniu elementu iš jo dalijami eilutės elementai Tiesinių lygčių sistemų sprendimas 4 / 58 Tiesinių lygčių sistemų sprendimas 4 / 58 Pagrindinio elemento parinkimas iš stulpelio elementų - pavyzdys I Pagrindinio elemento parinkimas iš stulpelio elementų - pavyzdys II x +x 3 + 3x 4 = x +x +x 3 3x 4 = x +x 3 + 4x 4 = 6x +x +x 3 + 4x 4 = Keičiamos ir 4 eilutės /3 7/3 7/3 4 /3 5/3 7/3 5/6 5/6 f = /6 f 3 = f 4 = /6 ( lygtis) ( lygtis) f (3 lygtis) ( lygtis) f 3 (4 lygtis) ( lygtis) f 4 Tiesinių lygčių sistemų sprendimas 43 / 58 Tiesinių lygčių sistemų sprendimas 44 / 58 Pagrindinio elemento parinkimas iš stulpelio elementų - pavyzdys III Pagrindinio elemento parinkimas iš stulpelio elementų - pavyzdys IV 6 4 7/3 7/3 7/3 4 /3 5/3 7/ /3 7/3 7/3 5/6 5 33/4 5/7 5/6 5/6 keitimų nėra f 3 = 3/7 f 4 = /7 (3 lygtis) ( lygtis) f 3 (4 lygtis) ( lygtis) f /3 7/3 7/3 5 5/6 5/7 33/4 x 4 = 33 7, x 3 = ( 5 7 x 4) = 4 35, x = ( x x 3) 3 7 = 8 35, x = ( 4x 4 x 3 x ) 6 = 3 7 keičiamos 3 ir 4 eilutės f 43 = Sprendinys X = Tiesinių lygčių sistemų sprendimas 45 / 58 Tiesinių lygčių sistemų sprendimas 46 / 58 Pagrindinio elemento parinkimas iš eilutės elementų Pagrindinio elemento parinkimas pagal lygties koeficientų modulių suma Kiekvienoje lygtyje randamas didžiausiai koeficientas ir iš jo padalijama atitinkama lygtis: Pertvarkant k-aj a eilutę, didžiausias jos koeficientas (pažymėkime jo numerį m) yra a km = max a kj kjn Radus pagrindinį elementa, pernumeruojami abu nežinomieji x k ir x m ; įsimenama naujoji nežinomųjų tvarka a imi = max kjn a ij, k i j, a ij = a ij a imi, k i, j n Lygtys sukeičiamos vietomis taip, kad k-aja lygtimi taptų ta (pažymėkime jos numerį m), kurios koeficientų modulių suma yra mažiausia: n n min a ij = a mj kin j=k j=k 3 Nežinomieji pernumeruojami taip, kad nežinomasis su didžiausiuoju koeficientu būtu x k Tiesinių lygčių sistemų sprendimas 47 / 58 Tiesinių lygčių sistemų sprendimas 48 / 58

7 Pavyzdys (R Čiegio, V Būdos vadov 68 p ) Kiekviena lygtis dalijama iš atitinkamo didžiausiojo koeficiento: Σ a ij,, 5,, 5,,, 5,, 4,, 6 5 Antra lygtis (mažiaus koef modulių suma) sukeičiama su pirmaj a vietomis: x x x 3 - pagrindinis elementas,, 5,,, 4, 3 Pernumeruojami nežinomieji ir atliekamas Gauso metodo tiesioginės eigos žingsnis: x x x 3 x x x 3,, 5,, 4,,,, 5, 99, 4, 96, 98 4 Analogiškai nustatomas kitas pagrinsinis elementas: x x x 3 Σ a ij,, 5, 44, 98,, 44, 48, 98, Tiesinių lygčių sistemų sprendimas 49 / 58 Tiesinių lygčių sistemų sprendimas 5 / 58 5 x x x 3 x x x 3,, 5, 44, 4 Tikslumas,, 398, 9 x, 3, 3,, 5, 44, 37 Triįstrižainė matrica trys nenulinės įstrižainės Juostinių matricų atskiras atvejis Saugojama 3 n elementų vietoje n n b c a b c a i b i c i a n b n c n a n b n x x x i x n x n = d d d i d n d n Tiesinių lygčių sistemų sprendimas 5 / 58 Tiesinių lygčių sistemų sprendimas 5 / 58 Perkelties metodas Perkelties metodas bx cx d ax bx cx d 3 ax bx cx d i i i i i i i anxn bnxn cnxn dn ax n n bx n n dn c d c d x x ; pažymėkime C, D ; b b b b c d ad c d ad x x3 ; C, D ac b ac b ac b ac b ck Ck, k,3,, n; ac k k b k dk akdk D k, k,3,, n ac k k bk xn Dn, x C x D, k n,,, k k k k Tiesinių lygčių sistemų sprendimas 53 / 58 Perkelties metodo algoritmas Thomas algorithm, tridiagonal matrix algorithm (angl) Tiesioginė eiga Atbulinė eiga C = c, D = d ; b b c k C k =, k =, 3, n ; a k C k + b k D k = d k a k D k a k C k + b k, k =, 3, n x n = D n ; x k = C k x k+ + D k, k = n, n, Tiesinių lygčių sistemų sprendimas 54 / 58 Perkelties metodo pakankama konvergavimo salyga Pavyzdys Pagrindinės įstrižainės vyravimo salyga Jei b i a i + c i, i =,, n ir bent su vienu i galioja griežta nelygybė, tai dalyba iš nulio ar labai mažo skaičiaus perkelties metodo eigoje negalima Perkelties metodu išspręsime sistema x x = x +x x 3 = x +x 3 = Sprendimas: Tiesioginė eiga C = =, D = ; C = + = 3, D = + = 3 3 ; D 3 = = Atbulinė eiga x 3 =, x = C x 3 + D =, x = C x + D = Tiesinių lygčių sistemų sprendimas 55 / 58 Tiesinių lygčių sistemų sprendimas 56 / 58

8 Perkelties metodo skaičiavimo apimtis Perkelties metodas: Skaičiavimo apimtis C = c, D = d ; b b c k C k =, k =, 3, n ; a k C k + b k D k = d k a k D k a k C k + b k, k =, 3, n x n = D n ; x k = C k x k+ + D k, k = n, n, Pirmojo etapo bendroji skaičiavimo apimtis = 6n 5 Antrojo etapo bendroji skaičiavimo apimtis = n Tiesioginė eiga Daugybų / Dalybų: +4(n )+3 = 4n 3; Sudėčių / Atimčių (n ) + = n Atbulinė eiga Daugybų n ; Sudėčių n Iš viso proporcinga 8n, kai n : O( 3 n3 ) aritmetinių operacijų; Perkelties metodas: O(8n) aritmetinių operacijų Perkelties metodas n kartu greičiau nei sprendžia triįstrižaines lygčių sistemos Tiesinių lygčių sistemų sprendimas 57 / 58 Tiesinių lygčių sistemų sprendimas 58 / 58

Vango algoritmo analizė

Vango algoritmo analizė VILNIAUS GEDIMINO TECHNIKOS UNIVERSITETAS 2017 m. balandžio 18 d. Problemos formulavimas Nagrinėkime lygtį u t = i 2 u, t [0, T ], x Ω x 2 u t=0 = u 0 (x). (1) Problema Realybėje Ω (, ), kas verčia įvesti

More information

Kurso tikslai. 1 Įgyti galimybę skaitiškai spręsti taikomuosius uždavinius; 2 Įvertinti skirtingus skaitinius sprendimo metodus (žinant jų

Kurso tikslai. 1 Įgyti galimybę skaitiškai spręsti taikomuosius uždavinius; 2 Įvertinti skirtingus skaitinius sprendimo metodus (žinant jų Kurso tikslai Skaitiniai metodai Kompiuterių aritmetika ir algoritmai Olga Štikonienė Diferencialinių lygčių ir skaičiavimo matematikos katedra, MIF VU 01-0-05 Skaitiniai metodai (MIF VU) Komp.aritmetika

More information

1 Kompiuterių aritmetika ir algoritmai. 2 Tiesinių lygčių sistemų sprendimo metodai: 3 Duomenų aproksimacija: 4 Tikrinių reikšmių uždavinys.

1 Kompiuterių aritmetika ir algoritmai. 2 Tiesinių lygčių sistemų sprendimo metodai: 3 Duomenų aproksimacija: 4 Tikrinių reikšmių uždavinys. Skaitiniai metodai Skaitiniai metodai Kompiuterių aritmetika ir algoritmai Olga Štikonienė Diferencialinių lygčių ir skaičiavimo matematikos katedra, MIF VU 24-2-4 Skaitiniai metodai randa matematinių

More information

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 0

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 0 CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 0 GENE H GOLUB 1 What is Numerical Analysis? In the 1973 edition of the Webster s New Collegiate Dictionary, numerical analysis is defined to be the

More information

SOLVING LINEAR SYSTEMS

SOLVING LINEAR SYSTEMS SOLVING LINEAR SYSTEMS We want to solve the linear system a, x + + a,n x n = b a n, x + + a n,n x n = b n This will be done by the method used in beginning algebra, by successively eliminating unknowns

More information

Lecture 1 Numerical methods: principles, algorithms and applications: an introduction

Lecture 1 Numerical methods: principles, algorithms and applications: an introduction Lecture 1 Numerical methods: principles, algorithms and applications: an introduction Weinan E 1,2 and Tiejun Li 2 1 Department of Mathematics, Princeton University, weinan@princeton.edu 2 School of Mathematical

More information

Direct Methods for Solving Linear Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le

Direct Methods for Solving Linear Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le Direct Methods for Solving Linear Systems Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le 1 Overview General Linear Systems Gaussian Elimination Triangular Systems The LU Factorization

More information

1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i )

1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i ) Direct Methods for Linear Systems Chapter Direct Methods for Solving Linear Systems Per-Olof Persson persson@berkeleyedu Department of Mathematics University of California, Berkeley Math 18A Numerical

More information

LU Factorization. LU Decomposition. LU Decomposition. LU Decomposition: Motivation A = LU

LU Factorization. LU Decomposition. LU Decomposition. LU Decomposition: Motivation A = LU LU Factorization To further improve the efficiency of solving linear systems Factorizations of matrix A : LU and QR LU Factorization Methods: Using basic Gaussian Elimination (GE) Factorization of Tridiagonal

More information

Fundamentals of Engineering Analysis (650163)

Fundamentals of Engineering Analysis (650163) Philadelphia University Faculty of Engineering Communications and Electronics Engineering Fundamentals of Engineering Analysis (6563) Part Dr. Omar R Daoud Matrices: Introduction DEFINITION A matrix is

More information

Computational Linear Algebra

Computational Linear Algebra Computational Linear Algebra PD Dr. rer. nat. habil. Ralf Peter Mundani Computation in Engineering / BGU Scientific Computing in Computer Science / INF Winter Term 2017/18 Part 2: Direct Methods PD Dr.

More information

AMS526: Numerical Analysis I (Numerical Linear Algebra)

AMS526: Numerical Analysis I (Numerical Linear Algebra) AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 1: Course Overview & Matrix-Vector Multiplication Xiangmin Jiao SUNY Stony Brook Xiangmin Jiao Numerical Analysis I 1 / 20 Outline 1 Course

More information

Linear System of Equations

Linear System of Equations Linear System of Equations Linear systems are perhaps the most widely applied numerical procedures when real-world situation are to be simulated. Example: computing the forces in a TRUSS. F F 5. 77F F.

More information

COURSE Numerical methods for solving linear systems. Practical solving of many problems eventually leads to solving linear systems.

COURSE Numerical methods for solving linear systems. Practical solving of many problems eventually leads to solving linear systems. COURSE 9 4 Numerical methods for solving linear systems Practical solving of many problems eventually leads to solving linear systems Classification of the methods: - direct methods - with low number of

More information

Matrix decompositions

Matrix decompositions Matrix decompositions How can we solve Ax = b? 1 Linear algebra Typical linear system of equations : x 1 x +x = x 1 +x +9x = 0 x 1 +x x = The variables x 1, x, and x only appear as linear terms (no powers

More information

Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in. NUMERICAL ANALYSIS Spring 2015

Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in. NUMERICAL ANALYSIS Spring 2015 Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in NUMERICAL ANALYSIS Spring 2015 Instructions: Do exactly two problems from Part A AND two

More information

Linear System of Equations

Linear System of Equations Linear System of Equations Linear systems are perhaps the most widely applied numerical procedures when real-world situation are to be simulated. Example: computing the forces in a TRUSS. F F 5. 77F F.

More information

Dense LU factorization and its error analysis

Dense LU factorization and its error analysis Dense LU factorization and its error analysis Laura Grigori INRIA and LJLL, UPMC February 2016 Plan Basis of floating point arithmetic and stability analysis Notation, results, proofs taken from [N.J.Higham,

More information

MATH20602 Numerical Analysis 1

MATH20602 Numerical Analysis 1 M\cr NA Manchester Numerical Analysis MATH20602 Numerical Analysis 1 Martin Lotz School of Mathematics The University of Manchester Manchester, January 27, 2014 Outline General Course Information Introduction

More information

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences) AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences) Lecture 1: Course Overview; Matrix Multiplication Xiangmin Jiao Stony Brook University Xiangmin Jiao Numerical

More information

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 6

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 6 CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 6 GENE H GOLUB Issues with Floating-point Arithmetic We conclude our discussion of floating-point arithmetic by highlighting two issues that frequently

More information

OUTLINE 1. Introduction 1.1 Notation 1.2 Special matrices 2. Gaussian Elimination 2.1 Vector and matrix norms 2.2 Finite precision arithmetic 2.3 Fact

OUTLINE 1. Introduction 1.1 Notation 1.2 Special matrices 2. Gaussian Elimination 2.1 Vector and matrix norms 2.2 Finite precision arithmetic 2.3 Fact Computational Linear Algebra Course: (MATH: 6800, CSCI: 6800) Semester: Fall 1998 Instructors: { Joseph E. Flaherty, aherje@cs.rpi.edu { Franklin T. Luk, luk@cs.rpi.edu { Wesley Turner, turnerw@cs.rpi.edu

More information

Numerical Linear Algebra

Numerical Linear Algebra Numerical Linear Algebra The two principal problems in linear algebra are: Linear system Given an n n matrix A and an n-vector b, determine x IR n such that A x = b Eigenvalue problem Given an n n matrix

More information

The Solution of Linear Systems AX = B

The Solution of Linear Systems AX = B Chapter 2 The Solution of Linear Systems AX = B 21 Upper-triangular Linear Systems We will now develop the back-substitution algorithm, which is useful for solving a linear system of equations that has

More information

Gaussian Elimination for Linear Systems

Gaussian Elimination for Linear Systems Gaussian Elimination for Linear Systems Tsung-Ming Huang Department of Mathematics National Taiwan Normal University October 3, 2011 1/56 Outline 1 Elementary matrices 2 LR-factorization 3 Gaussian elimination

More information

Review of Vectors and Matrices

Review of Vectors and Matrices A P P E N D I X D Review of Vectors and Matrices D. VECTORS D.. Definition of a Vector Let p, p, Á, p n be any n real numbers and P an ordered set of these real numbers that is, P = p, p, Á, p n Then P

More information

Adaptive Integration of Stiff ODE

Adaptive Integration of Stiff ODE INFORMATICA, 2000, Vol. 11, No. 4, 371 380 371 2000 Institute of Mathematics and Informatics, Vilnius Adaptive Integration of Stiff ODE Raimondas ČIEGIS, Olga SUBOČ, Vilnius Gediminas Technical University

More information

Engineering Computation

Engineering Computation Engineering Computation Systems of Linear Equations_1 1 Learning Objectives for Lecture 1. Motivate Study of Systems of Equations and particularly Systems of Linear Equations. Review steps of Gaussian

More information

Gaussian Elimination without/with Pivoting and Cholesky Decomposition

Gaussian Elimination without/with Pivoting and Cholesky Decomposition Gaussian Elimination without/with Pivoting and Cholesky Decomposition Gaussian Elimination WITHOUT pivoting Notation: For a matrix A R n n we define for k {,,n} the leading principal submatrix a a k A

More information

MATH20602 Numerical Analysis 1

MATH20602 Numerical Analysis 1 M\cr NA Manchester Numerical Analysis MATH20602 Numerical Analysis 1 Martin Lotz School of Mathematics The University of Manchester Manchester, February 1, 2016 Outline General Course Information Introduction

More information

A matrix over a field F is a rectangular array of elements from F. The symbol

A matrix over a field F is a rectangular array of elements from F. The symbol Chapter MATRICES Matrix arithmetic A matrix over a field F is a rectangular array of elements from F The symbol M m n (F ) denotes the collection of all m n matrices over F Matrices will usually be denoted

More information

The purpose of computing is insight, not numbers. Richard Wesley Hamming

The purpose of computing is insight, not numbers. Richard Wesley Hamming Systems of Linear Equations The purpose of computing is insight, not numbers. Richard Wesley Hamming Fall 2010 1 Topics to Be Discussed This is a long unit and will include the following important topics:

More information

Solving Dense Linear Systems I

Solving Dense Linear Systems I Solving Dense Linear Systems I Solving Ax = b is an important numerical method Triangular system: [ l11 l 21 if l 11, l 22 0, ] [ ] [ ] x1 b1 = l 22 x 2 b 2 x 1 = b 1 /l 11 x 2 = (b 2 l 21 x 1 )/l 22 Chih-Jen

More information

Chapter 7. Linear Algebra: Matrices, Vectors,

Chapter 7. Linear Algebra: Matrices, Vectors, Chapter 7. Linear Algebra: Matrices, Vectors, Determinants. Linear Systems Linear algebra includes the theory and application of linear systems of equations, linear transformations, and eigenvalue problems.

More information

Chapter 4 No. 4.0 Answer True or False to the following. Give reasons for your answers.

Chapter 4 No. 4.0 Answer True or False to the following. Give reasons for your answers. MATH 434/534 Theoretical Assignment 3 Solution Chapter 4 No 40 Answer True or False to the following Give reasons for your answers If a backward stable algorithm is applied to a computational problem,

More information

Review of matrices. Let m, n IN. A rectangle of numbers written like A =

Review of matrices. Let m, n IN. A rectangle of numbers written like A = Review of matrices Let m, n IN. A rectangle of numbers written like a 11 a 12... a 1n a 21 a 22... a 2n A =...... a m1 a m2... a mn where each a ij IR is called a matrix with m rows and n columns or an

More information

MATRICES. a m,1 a m,n A =

MATRICES. a m,1 a m,n A = MATRICES Matrices are rectangular arrays of real or complex numbers With them, we define arithmetic operations that are generalizations of those for real and complex numbers The general form a matrix of

More information

Numerical Linear Algebra

Numerical Linear Algebra Numerical Linear Algebra Decompositions, numerical aspects Gerard Sleijpen and Martin van Gijzen September 27, 2017 1 Delft University of Technology Program Lecture 2 LU-decomposition Basic algorithm Cost

More information

Program Lecture 2. Numerical Linear Algebra. Gaussian elimination (2) Gaussian elimination. Decompositions, numerical aspects

Program Lecture 2. Numerical Linear Algebra. Gaussian elimination (2) Gaussian elimination. Decompositions, numerical aspects Numerical Linear Algebra Decompositions, numerical aspects Program Lecture 2 LU-decomposition Basic algorithm Cost Stability Pivoting Cholesky decomposition Sparse matrices and reorderings Gerard Sleijpen

More information

Numerical Methods - Numerical Linear Algebra

Numerical Methods - Numerical Linear Algebra Numerical Methods - Numerical Linear Algebra Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Numerical Linear Algebra I 2013 1 / 62 Outline 1 Motivation 2 Solving Linear

More information

CSE 160 Lecture 13. Numerical Linear Algebra

CSE 160 Lecture 13. Numerical Linear Algebra CSE 16 Lecture 13 Numerical Linear Algebra Announcements Section will be held on Friday as announced on Moodle Midterm Return 213 Scott B Baden / CSE 16 / Fall 213 2 Today s lecture Gaussian Elimination

More information

HOW TO DEVELOP A TOP- TEN ALGORITHM IN THE 21ST CENTURY

HOW TO DEVELOP A TOP- TEN ALGORITHM IN THE 21ST CENTURY HOW TO DEVELOP A TOP- TEN ALGORITHM IN THE 21ST CENTURY Alex Townsend Cornell University (A talk for fun. Audience participation encouraged.) DONGARRA S TOP10 LIST FROM 20TH CENTURY 1946: The Metropolis

More information

Lecture Notes in Linear Algebra

Lecture Notes in Linear Algebra Lecture Notes in Linear Algebra Dr. Abdullah Al-Azemi Mathematics Department Kuwait University February 4, 2017 Contents 1 Linear Equations and Matrices 1 1.2 Matrices............................................

More information

A Review of Matrix Analysis

A Review of Matrix Analysis Matrix Notation Part Matrix Operations Matrices are simply rectangular arrays of quantities Each quantity in the array is called an element of the matrix and an element can be either a numerical value

More information

LU Factorization a 11 a 1 a 1n A = a 1 a a n (b) a n1 a n a nn L = l l 1 l ln1 ln 1 75 U = u 11 u 1 u 1n 0 u u n 0 u n...

LU Factorization a 11 a 1 a 1n A = a 1 a a n (b) a n1 a n a nn L = l l 1 l ln1 ln 1 75 U = u 11 u 1 u 1n 0 u u n 0 u n... .. Factorizations Reading: Trefethen and Bau (1997), Lecture 0 Solve the n n linear system by Gaussian elimination Ax = b (1) { Gaussian elimination is a direct method The solution is found after a nite

More information

14.2 QR Factorization with Column Pivoting

14.2 QR Factorization with Column Pivoting page 531 Chapter 14 Special Topics Background Material Needed Vector and Matrix Norms (Section 25) Rounding Errors in Basic Floating Point Operations (Section 33 37) Forward Elimination and Back Substitution

More information

Numerical methods for solving linear systems

Numerical methods for solving linear systems Chapter 2 Numerical methods for solving linear systems Let A C n n be a nonsingular matrix We want to solve the linear system Ax = b by (a) Direct methods (finite steps); Iterative methods (convergence)

More information

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim Introduction - Motivation Many phenomena (physical, chemical, biological, etc.) are model by differential equations. Recall the definition of the derivative of f(x) f f(x + h) f(x) (x) = lim. h 0 h Its

More information

Lecture 1 INF-MAT : Chapter 2. Examples of Linear Systems

Lecture 1 INF-MAT : Chapter 2. Examples of Linear Systems Lecture 1 INF-MAT 4350 2010: Chapter 2. Examples of Linear Systems Tom Lyche Centre of Mathematics for Applications, Department of Informatics, University of Oslo August 26, 2010 Notation The set of natural

More information

Next topics: Solving systems of linear equations

Next topics: Solving systems of linear equations Next topics: Solving systems of linear equations 1 Gaussian elimination (today) 2 Gaussian elimination with partial pivoting (Week 9) 3 The method of LU-decomposition (Week 10) 4 Iterative techniques:

More information

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0. Matrices Operations Linear Algebra Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0 The rectangular array 1 2 1 4 3 4 2 6 1 3 2 1 in which the

More information

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit VII Sparse Matrix

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit VII Sparse Matrix Scientific Computing with Case Studies SIAM Press, 2009 http://www.cs.umd.edu/users/oleary/sccswebpage Lecture Notes for Unit VII Sparse Matrix Computations Part 1: Direct Methods Dianne P. O Leary c 2008

More information

Solving Linear Systems of Equations

Solving Linear Systems of Equations November 6, 2013 Introduction The type of problems that we have to solve are: Solve the system: A x = B, where a 11 a 1N a 12 a 2N A =.. a 1N a NN x = x 1 x 2. x N B = b 1 b 2. b N To find A 1 (inverse

More information

Consider the following example of a linear system:

Consider the following example of a linear system: LINEAR SYSTEMS Consider the following example of a linear system: Its unique solution is x + 2x 2 + 3x 3 = 5 x + x 3 = 3 3x + x 2 + 3x 3 = 3 x =, x 2 = 0, x 3 = 2 In general we want to solve n equations

More information

Linear Algebra. Solving Linear Systems. Copyright 2005, W.R. Winfrey

Linear Algebra. Solving Linear Systems. Copyright 2005, W.R. Winfrey Copyright 2005, W.R. Winfrey Topics Preliminaries Echelon Form of a Matrix Elementary Matrices; Finding A -1 Equivalent Matrices LU-Factorization Topics Preliminaries Echelon Form of a Matrix Elementary

More information

Monte Carlo Methods. Part I: Introduction

Monte Carlo Methods. Part I: Introduction Monte Carlo Methods Part I: Introduction Spring Semester 2013/14 Department of Applied Mathematics, University of Crete Instructor: Harmandaris Vagelis, email: vagelis@tem.uoc.gr Course web page: http://www.tem.uoc.gr/~vagelis/courses/em385/

More information

Process Model Formulation and Solution, 3E4

Process Model Formulation and Solution, 3E4 Process Model Formulation and Solution, 3E4 Section B: Linear Algebraic Equations Instructor: Kevin Dunn dunnkg@mcmasterca Department of Chemical Engineering Course notes: Dr Benoît Chachuat 06 October

More information

Solving Linear Systems Using Gaussian Elimination. How can we solve

Solving Linear Systems Using Gaussian Elimination. How can we solve Solving Linear Systems Using Gaussian Elimination How can we solve? 1 Gaussian elimination Consider the general augmented system: Gaussian elimination Step 1: Eliminate first column below the main diagonal.

More information

Lecture 12 (Tue, Mar 5) Gaussian elimination and LU factorization (II)

Lecture 12 (Tue, Mar 5) Gaussian elimination and LU factorization (II) Math 59 Lecture 2 (Tue Mar 5) Gaussian elimination and LU factorization (II) 2 Gaussian elimination - LU factorization For a general n n matrix A the Gaussian elimination produces an LU factorization if

More information

Matrix decompositions

Matrix decompositions Matrix decompositions How can we solve Ax = b? 1 Linear algebra Typical linear system of equations : x 1 x +x = x 1 +x +9x = 0 x 1 +x x = The variables x 1, x, and x only appear as linear terms (no powers

More information

Linear Algebra and Matrix Inversion

Linear Algebra and Matrix Inversion Jim Lambers MAT 46/56 Spring Semester 29- Lecture 2 Notes These notes correspond to Section 63 in the text Linear Algebra and Matrix Inversion Vector Spaces and Linear Transformations Matrices are much

More information

Introduction to PDEs and Numerical Methods Lecture 7. Solving linear systems

Introduction to PDEs and Numerical Methods Lecture 7. Solving linear systems Platzhalter für Bild, Bild auf Titelfolie hinter das Logo einsetzen Introduction to PDEs and Numerical Methods Lecture 7. Solving linear systems Dr. Noemi Friedman, 09.2.205. Reminder: Instationary heat

More information

. =. a i1 x 1 + a i2 x 2 + a in x n = b i. a 11 a 12 a 1n a 21 a 22 a 1n. i1 a i2 a in

. =. a i1 x 1 + a i2 x 2 + a in x n = b i. a 11 a 12 a 1n a 21 a 22 a 1n. i1 a i2 a in Vectors and Matrices Continued Remember that our goal is to write a system of algebraic equations as a matrix equation. Suppose we have the n linear algebraic equations a x + a 2 x 2 + a n x n = b a 2

More information

Class notes: Approximation

Class notes: Approximation Class notes: Approximation Introduction Vector spaces, linear independence, subspace The goal of Numerical Analysis is to compute approximations We want to approximate eg numbers in R or C vectors in R

More information

ELEMENTARY LINEAR ALGEBRA

ELEMENTARY LINEAR ALGEBRA ELEMENTARY LINEAR ALGEBRA K R MATTHEWS DEPARTMENT OF MATHEMATICS UNIVERSITY OF QUEENSLAND First Printing, 99 Chapter LINEAR EQUATIONS Introduction to linear equations A linear equation in n unknowns x,

More information

Turinys. Kurso struktūra. 2 Diferencialinės lygtys. 4 Matematinių modelių pavyzdžiai

Turinys. Kurso struktūra. 2 Diferencialinės lygtys. 4 Matematinių modelių pavyzdžiai Turins ir matematiniai modeliai 26 CHAPTER INTRODUCTION TO DIFFERENTIAL EQUATIONS paskaita Olga Štikonienė d Diferencialinių lgčių ir skaičiavimo matematikos d W. T katedra, MIF VU WHAT LIES AHEAD Throughout

More information

Gaussian Elimination and Back Substitution

Gaussian Elimination and Back Substitution Jim Lambers MAT 610 Summer Session 2009-10 Lecture 4 Notes These notes correspond to Sections 31 and 32 in the text Gaussian Elimination and Back Substitution The basic idea behind methods for solving

More information

I-v k e k. (I-e k h kt ) = Stability of Gauss-Huard Elimination for Solving Linear Systems. 1 x 1 x x x x

I-v k e k. (I-e k h kt ) = Stability of Gauss-Huard Elimination for Solving Linear Systems. 1 x 1 x x x x Technical Report CS-93-08 Department of Computer Systems Faculty of Mathematics and Computer Science University of Amsterdam Stability of Gauss-Huard Elimination for Solving Linear Systems T. J. Dekker

More information

Laboratory #3: Linear Algebra. Contents. Grace Yung

Laboratory #3: Linear Algebra. Contents. Grace Yung Laboratory #3: Linear Algebra Grace Yung Contents List of Problems. Introduction. Objectives.2 Prerequisites 2. Linear Systems 2. What is a Matrix 2.2 Quick Review 2.3 Gaussian Elimination 2.3. Decomposition

More information

Chapter 2. Solving Systems of Equations. 2.1 Gaussian elimination

Chapter 2. Solving Systems of Equations. 2.1 Gaussian elimination Chapter 2 Solving Systems of Equations A large number of real life applications which are resolved through mathematical modeling will end up taking the form of the following very simple looking matrix

More information

LINEAR ALGEBRA WITH APPLICATIONS

LINEAR ALGEBRA WITH APPLICATIONS SEVENTH EDITION LINEAR ALGEBRA WITH APPLICATIONS Instructor s Solutions Manual Steven J. Leon PREFACE This solutions manual is designed to accompany the seventh edition of Linear Algebra with Applications

More information

Poisson Solvers. William McLean. April 21, Return to Math3301/Math5315 Common Material.

Poisson Solvers. William McLean. April 21, Return to Math3301/Math5315 Common Material. Poisson Solvers William McLean April 21, 2004 Return to Math3301/Math5315 Common Material 1 Introduction Many problems in applied mathematics lead to a partial differential equation of the form a 2 u +

More information

A primer on matrices

A primer on matrices A primer on matrices Stephen Boyd August 4, 2007 These notes describe the notation of matrices, the mechanics of matrix manipulation, and how to use matrices to formulate and solve sets of simultaneous

More information

Scientific Computing

Scientific Computing Scientific Computing Direct solution methods Martin van Gijzen Delft University of Technology October 3, 2018 1 Program October 3 Matrix norms LU decomposition Basic algorithm Cost Stability Pivoting Pivoting

More information

Solving Linear Systems of Equations

Solving Linear Systems of Equations 1 Solving Linear Systems of Equations Many practical problems could be reduced to solving a linear system of equations formulated as Ax = b This chapter studies the computational issues about directly

More information

MATH 315 Linear Algebra Homework #1 Assigned: August 20, 2018

MATH 315 Linear Algebra Homework #1 Assigned: August 20, 2018 Homework #1 Assigned: August 20, 2018 Review the following subjects involving systems of equations and matrices from Calculus II. Linear systems of equations Converting systems to matrix form Pivot entry

More information

Basic Linear Algebra in MATLAB

Basic Linear Algebra in MATLAB Basic Linear Algebra in MATLAB 9.29 Optional Lecture 2 In the last optional lecture we learned the the basic type in MATLAB is a matrix of double precision floating point numbers. You learned a number

More information

2.1 Gaussian Elimination

2.1 Gaussian Elimination 2. Gaussian Elimination A common problem encountered in numerical models is the one in which there are n equations and n unknowns. The following is a description of the Gaussian elimination method for

More information

Elementary maths for GMT

Elementary maths for GMT Elementary maths for GMT Linear Algebra Part 2: Matrices, Elimination and Determinant m n matrices The system of m linear equations in n variables x 1, x 2,, x n a 11 x 1 + a 12 x 2 + + a 1n x n = b 1

More information

JACOBI S ITERATION METHOD

JACOBI S ITERATION METHOD ITERATION METHODS These are methods which compute a sequence of progressively accurate iterates to approximate the solution of Ax = b. We need such methods for solving many large linear systems. Sometimes

More information

Numerical Methods I Solving Square Linear Systems: GEM and LU factorization

Numerical Methods I Solving Square Linear Systems: GEM and LU factorization Numerical Methods I Solving Square Linear Systems: GEM and LU factorization Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 MATH-GA 2011.003 / CSCI-GA 2945.003, Fall 2014 September 18th,

More information

5. Direct Methods for Solving Systems of Linear Equations. They are all over the place...

5. Direct Methods for Solving Systems of Linear Equations. They are all over the place... 5 Direct Methods for Solving Systems of Linear Equations They are all over the place Miriam Mehl: 5 Direct Methods for Solving Systems of Linear Equations They are all over the place, December 13, 2012

More information

Example: Current in an Electrical Circuit. Solving Linear Systems:Direct Methods. Linear Systems of Equations. Solving Linear Systems: Direct Methods

Example: Current in an Electrical Circuit. Solving Linear Systems:Direct Methods. Linear Systems of Equations. Solving Linear Systems: Direct Methods Example: Current in an Electrical Circuit Solving Linear Systems:Direct Methods A number of engineering problems or models can be formulated in terms of systems of equations Examples: Electrical Circuit

More information

Solving Systems of Linear Equations

Solving Systems of Linear Equations Motivation Solving Systems of Linear Equations The idea behind Googles pagerank An example from economics Gaussian elimination LU Decomposition Iterative Methods The Jacobi method Summary Motivation Systems

More information

G1110 & 852G1 Numerical Linear Algebra

G1110 & 852G1 Numerical Linear Algebra The University of Sussex Department of Mathematics G & 85G Numerical Linear Algebra Lecture Notes Autumn Term Kerstin Hesse (w aw S w a w w (w aw H(wa = (w aw + w Figure : Geometric explanation of the

More information

Matrices MA1S1. Tristan McLoughlin. November 9, Anton & Rorres: Ch

Matrices MA1S1. Tristan McLoughlin. November 9, Anton & Rorres: Ch Matrices MA1S1 Tristan McLoughlin November 9, 2014 Anton & Rorres: Ch 1.3-1.8 Basic matrix notation We have studied matrices as a tool for solving systems of linear equations but now we want to study them

More information

What is it we are looking for in these algorithms? We want algorithms that are

What is it we are looking for in these algorithms? We want algorithms that are Fundamentals. Preliminaries The first question we want to answer is: What is computational mathematics? One possible definition is: The study of algorithms for the solution of computational problems in

More information

1 GSW Sets of Systems

1 GSW Sets of Systems 1 Often, we have to solve a whole series of sets of simultaneous equations of the form y Ax, all of which have the same matrix A, but each of which has a different known vector y, and a different unknown

More information

Gaussian Elimination -(3.1) b 1. b 2., b. b n

Gaussian Elimination -(3.1) b 1. b 2., b. b n Gaussian Elimination -() Consider solving a given system of n linear equations in n unknowns: (*) a x a x a n x n b where a ij and b i are constants and x i are unknowns Let a n x a n x a nn x n a a a

More information

Introduction to Applied Linear Algebra with MATLAB

Introduction to Applied Linear Algebra with MATLAB Sigam Series in Applied Mathematics Volume 7 Rizwan Butt Introduction to Applied Linear Algebra with MATLAB Heldermann Verlag Contents Number Systems and Errors 1 1.1 Introduction 1 1.2 Number Representation

More information

Matrix Arithmetic. j=1

Matrix Arithmetic. j=1 An m n matrix is an array A = Matrix Arithmetic a 11 a 12 a 1n a 21 a 22 a 2n a m1 a m2 a mn of real numbers a ij An m n matrix has m rows and n columns a ij is the entry in the i-th row and j-th column

More information

Solving linear systems (6 lectures)

Solving linear systems (6 lectures) Chapter 2 Solving linear systems (6 lectures) 2.1 Solving linear systems: LU factorization (1 lectures) Reference: [Trefethen, Bau III] Lecture 20, 21 How do you solve Ax = b? (2.1.1) In numerical linear

More information

LU Factorization. LU factorization is the most common way of solving linear systems! Ax = b LUx = b

LU Factorization. LU factorization is the most common way of solving linear systems! Ax = b LUx = b AM 205: lecture 7 Last time: LU factorization Today s lecture: Cholesky factorization, timing, QR factorization Reminder: assignment 1 due at 5 PM on Friday September 22 LU Factorization LU factorization

More information

Numerical Linear Algebra And Its Applications

Numerical Linear Algebra And Its Applications Numerical Linear Algebra And Its Applications Xiao-Qing JIN 1 Yi-Min WEI 2 August 29, 2008 1 Department of Mathematics, University of Macau, Macau, P. R. China. 2 Department of Mathematics, Fudan University,

More information

Numerical Analysis: Solving Systems of Linear Equations

Numerical Analysis: Solving Systems of Linear Equations Numerical Analysis: Solving Systems of Linear Equations Mirko Navara http://cmpfelkcvutcz/ navara/ Center for Machine Perception, Department of Cybernetics, FEE, CTU Karlovo náměstí, building G, office

More information

A Crash Course on Fast Multipole Method (FMM)

A Crash Course on Fast Multipole Method (FMM) A Crash Course on Fast Multipole Method (FMM) Hanliang Guo Kanso Biodynamical System Lab, 2018 April What is FMM? A fast algorithm to study N body interactions (Gravitational, Coulombic interactions )

More information

Matrix Theory. A.Holst, V.Ufnarovski

Matrix Theory. A.Holst, V.Ufnarovski Matrix Theory AHolst, VUfnarovski 55 HINTS AND ANSWERS 9 55 Hints and answers There are two different approaches In the first one write A as a block of rows and note that in B = E ij A all rows different

More information

EE731 Lecture Notes: Matrix Computations for Signal Processing

EE731 Lecture Notes: Matrix Computations for Signal Processing EE731 Lecture Notes: Matrix Computations for Signal Processing James P. Reilly c Department of Electrical and Computer Engineering McMaster University September 22, 2005 0 Preface This collection of ten

More information

1 Problem 1 Solution. 1.1 Common Mistakes. In order to show that the matrix L k is the inverse of the matrix M k, we need to show that

1 Problem 1 Solution. 1.1 Common Mistakes. In order to show that the matrix L k is the inverse of the matrix M k, we need to show that 1 Problem 1 Solution In order to show that the matrix L k is the inverse of the matrix M k, we need to show that Since we need to show that Since L k M k = I (or M k L k = I). L k = I + m k e T k, M k

More information

6.4 Krylov Subspaces and Conjugate Gradients

6.4 Krylov Subspaces and Conjugate Gradients 6.4 Krylov Subspaces and Conjugate Gradients Our original equation is Ax = b. The preconditioned equation is P Ax = P b. When we write P, we never intend that an inverse will be explicitly computed. P

More information