4.2 Floating-Point Numbers
|
|
- Ada Parks
- 5 years ago
- Views:
Transcription
1 101 Approximation 4.2 Floating-Point Numbers 4.2 Floating-Point Numbers The number in scientific notation is or (as computer output) E exponent sign mantissa base floating point numbers in computer notation. Usually, base is 2 (with a few exceptions like IBM 370 had a base 16; base 10 in most of hand-held calculators; 3 in an ill-fated Russian computer). For example, = Formally, a floating-point number system F, is characterised by four integers: Base (or radix) β > 1 Precision p > 0 Exponent range L,U: L < 0 < U
2 102 Approximation 4.2 Floating-Point Numbers Any floating-point number x F has the form where integers d i satify x = ±{d 0 + d 1 β d p 1 β 1 p }β E, (5) 0 d i β 1, i = 0,..., p 1, and E L,U (E is positive, zero or negative integer). The number E is called an exponent and in the part in the brackets { } is called mantissa Example. In arithmetics with precision 4 and base 10 the number 2347 is represented as { }10 3. Note that exact representation of this number in precision 3 and base 10 is not possible!
3 103 Approximation 4.3 Normalised floating-point numbers 4.3 Normalised floating-point numbers A number is normalised if d 0 > 0 Example. The number is normalised, but is not Floating point systems are usually normalised because: Representation of each number is then unique No digits are wasted on leading zeros In normalised binary (β = 2) system, the leading bit always 1 = no need to store it! Smallest positive normalised number in form (5) is 1 β L underflow threashold. (In case of underflow, the result is smaller than the smallest representable floatingpoint number)
4 104 Approximation 4.3 Normalised floating-point numbers Largest positive normalised number in form (5) is (β 1){1 + β β 1 p }β U = (1 β p )β U+1. overflow threashold. If the result of an arithmetic operation is an exact number not represented in the floating-point number system F, the result is represented as (hopefully close) element of F. (Rounding)
5 105 Approximation 4.4 IEEE (Normalised) Arithmetics 4.4 IEEE (Normalised) Arithmetics β = 2 (binary), d 0 = 1 always not stored Single precision: p = 24, L = 126, U = 127 Underflow threashold = Overflow threashold = ( ) One bit for sign, 23 for mantissa and 8 for exponent: bit word.
6 106 Approximation 4.4 IEEE (Normalised) Arithmetics Double precision: p = 53, L = 1022, U = 1023 Underflow threashold = Overflow threashold= ( ) One bit for sign, 52 for mantissa and 11 for exponent: bit word IEEE arithmetics standard rounding towards the nearest element in F. (If the result is exactly between the two elements, the rounding is towards the number which has the least significant bit equal to 0 rounding towards the closest even number)
7 107 Approximation 4.4 IEEE (Normalised) Arithmetics IEEE subnormal numbers - unnormalised numbers with minimal possible exponent. Between 0 and the smallest normalised floating point value. Guarantees that f l(x y) (the result of operation x y in floating point arithmetics) in case x y never zero to avoid underflow in such situatons IEEE symbols Inf and NaN Inf (± ), NaN (Not a Number) Inf - in case of overflow x/ ± = 0 in case of arbitrary finite floating/point x + + = +, etc. NaN is returned when operation does not have a well/defined finite or ininite value, for example
8 108 Approximation 4.4 IEEE (Normalised) Arithmetics NaN x (where one of operations: +, -, *, / ), etc IEEE defines also double extended floating-point values 64 bit mantissa; 15 bit exponent most of the compilers do not support it Many platforms support also quadruple precision (double*16) often emulated with lower precision and therefore slow performance
9 109 Systems of LE 5.1 Systems of Linear Equations 5 Solving Systems of Linear Equations 5.1 Systems of Linear Equations System of linear equations: a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b a m1 x 1 + a m2 x a mn x n = b m
10 110 Systems of LE 5.1 Systems of Linear Equations Matrix form: A- given matrix, vector b - given; vector of unknowns x a 11 a 12 a 1n a 21 a 22 a 2n a m1 a m2 a mn x 1 x 2. = b 1 b 2 x n b m. or Ax = b (6) Suppose, m > n overdetermined system; Does a system thiswith systemore have equations a solution? than unknowns has usually no solution m < n underdetermined system; How a system many with solutions fewer equations does it have? than unknowns has usually infinitely many solutions m = n awhat system about withethe solution same number in this case? of equations and unknowns has usually a single unique solution we will deal only with this case now
11 111 Systems of LE 5.2 Classification 5.2 Classification Two main types of systems of linear equations: systems with full matrix most of the values are nonzero how storage store in a 2D it? array sparse matrix most of the matrix values are zero storing How in store a full such matrix matrices? system would be waste of memory * different sparse matrix storage schemes Quite different strategies for solution of systems with full or sparse matrices
12 112 Systems of LE 5.2 Classification Problem Transformation Common strategy is to modify the problem (6) such that the solution remains the same modified problem more easy to solve What kind of transformations do not change the solution? Possible to multiply the both sides of the equation (6) with an arbitrary nonsingular matrix M without the change in solution. To check it, notice that the solution of MAz = Mb is: z = (MA) 1 Mb = A 1 M 1 Mb = A 1 b = x.
13 113 Systems of LE 5.2 Classification For example, M = D diagonal matrix, or M = P permutation matrix NB! Although, theoretically the multiplication of (6) with nonsingular matrix M does not change the solution, we will see later that it may change the numerical process of the solution and the exactness of the solution... The next question we ask: what type of systems are easy to solve?
14 114 Systems of LE 5.3 Triangular linear systems 5.3 Triangular linear systems row i with a nonzero only on the diagonal, it is easy to calculate x i = b i /a ii ; if now there is row j where except the diagnal a j j 0 the only nonzero is at position a ji, we find that x j = (b j a ji x i )/a j j and again, if there exist a row k such that a kk 0 and a kl = 0 if l {i, j}, we can have x k = (b k a ki x i a k j x j )/a kk etc. Such systems easy to solve called triangular systems. With rearranging rows and unknowns (columns) it is possible to transform the system to Lower Triangular form L or Upper Triangular form U: l u 11 u 12 u 1n l L = 21 l , U = 0 u 22 u 2n l n1 l n2 l nn 0 0 u nn
15 115 Systems of LE 5.3 Triangular linear systems l u 11 u 12 u 1n l L = 21 l , U = 0 u 22 u 2n l n1 l n2 l nn 0 0 u nn Solving system Lx = b is called Forward Substitution : x 1 = ( b 1 /l 11 x i = b i i 1 j=1 l i jx j )/l ii Solving system Ux = b is called Back Substitution : x n = b n /u nn ) x i = (b i n j=i+1 u i jx j /u ii But how to transform an arbitrary matrix to a triangular form?
16 116 Systems of LE 5.4 Elementary Elimination Matrices 5.4 Elementary Elimination Matrices for a 1 0: 1 0 a 2 /a 1 1 a 1 a 2 = a 1 0. In general case, if a = a 1,a 2,...,a n and a k 0: M k a = m k m n 0 1 a 1. a k a k+1. a n = a 1. a k 0. 0, where m i = a i /a k, i = k + 1,...,n.
17 117 Systems of LE 5.4 Elementary Elimination Matrices Matrix M k is called also elementary elimination matrix or Gauss transformation The divider a k is called pivot (juhtelement) 1. M k is nonsingular = Why? being lower triangular and unit diagonal 2. M k = I me T k, where m = 0,...,0,m k+1,...,m n T and e k is column k of unit matrix 3. L k = (de f ) M 1 k = I + me T k. 4. If M j, j > k is some other elementary elimination matrix with multiplication vector t, then M k M j = I me T k tet j + me T k tet j = I me T k tet j, due to e T k t = 0.
18 118 Systems of LE 5.5 Gauss Elimination and LU Factorisation 5.5 Gauss Elimination and LU Factorisation apply series of Gauss elimination matrices from the left: M 1, M 2,...,M n 1, taking M = M n 1 M 1 we get the linear system: MAx = M n 1 M 1 Ax = M n 1 M 1 b = Mb upper triangular = * easy to solve. The process is called Gauss Elimination Method (GEM)
19 119 Systems of LE 5.5 Gauss Elimination and LU Factorisation Denoting U = MA and L = M 1, we get that L = M 1 = (M n 1 M 1 ) 1 = M 1 1 M 1 n 1 = L 1 L n 1 is lower unit triangular (ones on the diagonal) = A = LU. Expressed in an algorithm:
20 120 Systems of LE 5.5 Gauss Elimination and LU Factorisation Algoritm 5.1. LU-factorisation using Gauss elimination method (GEM) do k=1,...,n-1 # cycle over matrix columns if a kk ==0 then stop # stop in case pivot == 0 do i=k+1,n m ik = a ik /a kk enddo do i=k+1,n do j=k+1,n # coefficient calculation in column k # applying transformations to a i j = a i j m ik a k j # the rest of the matrix enddo enddo enddo NB! In practical implementation: For storing m ik use corresponding elements in A (will be zeroes anyway)
21 121 Systems of LE 5.6 Number of operations in GEM 5.6 Number of operations in GEM Finding operation counts for Alg. 5.1: Replace loops with corresponding sums over number of particular operations: ( n 1 n 1 + i=1 j=i+1 n j=i+1 n k=i+1 2 ) = n 1 i=1 ((n i) + 2(n i) 2 ) = 2 3 n3 + O(n 2 ) used that m i=1 ik = m k+1 /(k+1)+o(m k ) (which is enough for finding the number of operations with the highest order) How Number many of operationsthere for forward are solving and backward a triangular substitution system? for L and U is O(n 2 )
22 122 Systems of LE 5.7 GEM with row permutations = the whole system solution Ax = b takes 2 3 n3 + O(n 2 ) operations 5.7 GEM with row permutations If pivot == 0 GEM won t work Row permutations or partial pivoting may help For numerical stability, also the pivot must not be small Example 5.1 Consider matrix A = non-singular but LU-factorisation impossible without row permutations
23 123 Systems of LE 5.7 GEM with row permutations But on contrary, the matrix 1 1 A = 1 1 has the LU-factorisation 1 1 A = 1 1 = = LU But, with what A being is wrong actually with singular matrixmatrix! A?
24 124 Systems of LE 5.7 GEM with row permutations Example 5.2. Small pivots Consider A = ε 1 1 1, with ε such that 0 < ε < ε mach in given floating point system (i.e. 1 + ε = 1 in floating point arithmetics) Without row permutation we get (in floating-point arithmetics): M = 1 0 1/ε 1 = L = 1 0 1/ε 1, U = ε /ε = ε 1 0 1/ε But then LU = 1 0 1/ε 1 ε 1 0 1/ε = ε A
25 125 Systems of LE 5.7 GEM with row permutations Using row permutation the pivot is 1; multiplier ε = M = 1 0 ε 1 = L = 1 0 ε 1, U = ε = in floating point arithmetics = LU = 1 0 ε = 1 1 ε 1 OK!
26 126 Systems of LE 5.7 GEM with row permutations Algoritm 5.2. LU-factorisation with GEM using row permutations do k=1,...,n-1 # cycle over matrix columns Find index p such that: # looking for the best pivot a pk a ik, k i n # in given column if p k then interchange rows k and p if a kk = 0 then continue with next k # skip such column do i=k+1,n m ik = a ik /a kk enddo do i=k+1,n do j=k+1,n a i j = a i j m ik a k j enddo enddo enddo # multiplier calculation in column k # transformation application # to the rest of the matrix
27 127 Systems of LE 5.7 GEM with row permutations As a result, MA = U, where U upper-triangular, OK but actually so far? M = M n 1 P n 1 M 1 P 1 M 1 is still not lower-triangular? any more, although it is still denoted by L but we have is it triangular? still triangular L knowing the permutations P = P n 1 P 1 in advance would give PA = LU, where L indeed lower triangular matrix
28 128 Systems of LE 5.7 GEM with row permutations But, do instead we really of row need exchanges to actually weperform can perform the rowjust exchanges appropriate explicitly? mapping of matrix (and vector) indexes We start with unit index mapping p = 1,2,3,4,...,n If rows i and j need to be exchanged, we exchange corresponding values pi and p j In the algorithm, take everywhere a pi j instead of a i j (and other arrays correspondingly) To solve the system Ax = b (6) How does the whole algorithm look like now? Solve the lower triangular system Ly = Pb with forward substitution Solve the upper triangular system Ux = y backward substitution The term partial pivoting comes from the fact that we are seeking for the best pivot only in the current column (starting from the diagonal and below) of the matrix
29 129 Systems of LE 5.7 GEM with row permutations Complete pivoting the best pivot is chosen from the whole remaining part of the matrix This means exchanging both rows and columns of the matrix PAQ = LU, where P and Q are permutation matrices. The system is solved in three stages: Ly = Pb; Uz = y and x = Qz Although numerical stability is better in case of complete pivoting it is rarely used, because more costly usually not needed
5 Solving Systems of Linear Equations
106 Systems of LE 5.1 Systems of Linear Equations 5 Solving Systems of Linear Equations 5.1 Systems of Linear Equations System of linear equations: a 11 x 1 + a 12 x 2 +... + a 1n x n = b 1 a 21 x 1 +
More informationDirect Methods for Solving Linear Systems. Matrix Factorization
Direct Methods for Solving Linear Systems Matrix Factorization Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c 2011
More informationDirect 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 information1 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 informationComputational Methods. Systems of Linear Equations
Computational Methods Systems of Linear Equations Manfred Huber 2010 1 Systems of Equations Often a system model contains multiple variables (parameters) and contains multiple equations Multiple equations
More informationA 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 informationLinear Systems of n equations for n unknowns
Linear Systems of n equations for n unknowns In many application problems we want to find n unknowns, and we have n linear equations Example: Find x,x,x such that the following three equations hold: x
More informationCOURSE 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 informationPivoting. Reading: GV96 Section 3.4, Stew98 Chapter 3: 1.3
Pivoting Reading: GV96 Section 3.4, Stew98 Chapter 3: 1.3 In the previous discussions we have assumed that the LU factorization of A existed and the various versions could compute it in a stable manner.
More informationLecture 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 informationReview 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 informationLinear 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 informationCS412: Lecture #17. Mridul Aanjaneya. March 19, 2015
CS: Lecture #7 Mridul Aanjaneya March 9, 5 Solving linear systems of equations Consider a lower triangular matrix L: l l l L = l 3 l 3 l 33 l n l nn A procedure similar to that for upper triangular systems
More information2.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 informationCHAPTER 6. Direct Methods for Solving Linear Systems
CHAPTER 6 Direct Methods for Solving Linear Systems. Introduction A direct method for approximating the solution of a system of n linear equations in n unknowns is one that gives the exact solution to
More informationLinear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4
Linear Algebra Section. : LU Decomposition Section. : Permutations and transposes Wednesday, February 1th Math 01 Week # 1 The LU Decomposition We learned last time that we can factor a invertible matrix
More informationNext 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 informationAMS 209, Fall 2015 Final Project Type A Numerical Linear Algebra: Gaussian Elimination with Pivoting for Solving Linear Systems
AMS 209, Fall 205 Final Project Type A Numerical Linear Algebra: Gaussian Elimination with Pivoting for Solving Linear Systems. Overview We are interested in solving a well-defined linear system given
More informationScientific 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 informationAMS526: Numerical Analysis I (Numerical Linear Algebra)
AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 12: Gaussian Elimination and LU Factorization Xiangmin Jiao SUNY Stony Brook Xiangmin Jiao Numerical Analysis I 1 / 10 Gaussian Elimination
More informationLU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark
DM559 Linear and Integer Programming LU Factorization Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark [Based on slides by Lieven Vandenberghe, UCLA] Outline
More informationAck: 1. LD Garcia, MTH 199, Sam Houston State University 2. Linear Algebra and Its Applications - Gilbert Strang
Gaussian Elimination CS6015 : Linear Algebra Ack: 1. LD Garcia, MTH 199, Sam Houston State University 2. Linear Algebra and Its Applications - Gilbert Strang The Gaussian Elimination Method The Gaussian
More informationScientific Computing: An Introductory Survey
Scientific Computing: An Introductory Survey Chapter 2 Systems of Linear Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction
More informationNumerical 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 informationProgram 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 informationMatrix 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 informationMATH 3511 Lecture 1. Solving Linear Systems 1
MATH 3511 Lecture 1 Solving Linear Systems 1 Dmitriy Leykekhman Spring 2012 Goals Review of basic linear algebra Solution of simple linear systems Gaussian elimination D Leykekhman - MATH 3511 Introduction
More informationReview Questions REVIEW QUESTIONS 71
REVIEW QUESTIONS 71 MATLAB, is [42]. For a comprehensive treatment of error analysis and perturbation theory for linear systems and many other problems in linear algebra, see [126, 241]. An overview of
More informationJim Lambers MAT 610 Summer Session Lecture 2 Notes
Jim Lambers MAT 610 Summer Session 2009-10 Lecture 2 Notes These notes correspond to Sections 2.2-2.4 in the text. Vector Norms Given vectors x and y of length one, which are simply scalars x and y, the
More informationEngineering 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 informationLinear Systems and LU
Linear Systems and LU CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Linear Systems and LU 1 / 48 Homework 1. Homework 0 due Monday CS 205A:
More informationLU 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 informationGaussian 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 informationLinear 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 informationLinear Algebraic Equations
Linear Algebraic Equations 1 Fundamentals Consider the set of linear algebraic equations n a ij x i b i represented by Ax b j with [A b ] [A b] and (1a) r(a) rank of A (1b) Then Axb has a solution iff
More informationLecture 7. Floating point arithmetic and stability
Lecture 7 Floating point arithmetic and stability 2.5 Machine representation of numbers Scientific notation: 23 }{{} }{{} } 3.14159265 {{} }{{} 10 sign mantissa base exponent (significand) s m β e A floating
More informationSolving 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 informationMATH2210 Notebook 2 Spring 2018
MATH2210 Notebook 2 Spring 2018 prepared by Professor Jenny Baglivo c Copyright 2009 2018 by Jenny A. Baglivo. All Rights Reserved. 2 MATH2210 Notebook 2 3 2.1 Matrices and Their Operations................................
More informationNumerical 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 informationLecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 2. Systems of Linear Equations
Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T. Heath Chapter 2 Systems of Linear Equations Copyright c 2001. Reproduction permitted only for noncommercial,
More informationGaussian 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 informationNumerical 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 informationLinear Equations in Linear Algebra
1 Linear Equations in Linear Algebra 1.1 SYSTEMS OF LINEAR EQUATIONS LINEAR EQUATION x 1,, x n A linear equation in the variables equation that can be written in the form a 1 x 1 + a 2 x 2 + + a n x n
More information12/1/2015 LINEAR ALGEBRA PRE-MID ASSIGNMENT ASSIGNED BY: PROF. SULEMAN SUBMITTED BY: M. REHAN ASGHAR BSSE 4 ROLL NO: 15126
12/1/2015 LINEAR ALGEBRA PRE-MID ASSIGNMENT ASSIGNED BY: PROF. SULEMAN SUBMITTED BY: M. REHAN ASGHAR Cramer s Rule Solving a physical system of linear equation by using Cramer s rule Cramer s rule is really
More informationProcess 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 informationAx = b. Systems of Linear Equations. Lecture Notes to Accompany. Given m n matrix A and m-vector b, find unknown n-vector x satisfying
Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T Heath Chapter Systems of Linear Equations Systems of Linear Equations Given m n matrix A and m-vector
More informationMatrix 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 informationThe 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 informationNumerical Linear Algebra
Numerical Linear Algebra R. J. Renka Department of Computer Science & Engineering University of North Texas 02/03/2015 Notation and Terminology R n is the Euclidean n-dimensional linear space over the
More informationChapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations
Chapter 1: Systems of linear equations and matrices Section 1.1: Introduction to systems of linear equations Definition: A linear equation in n variables can be expressed in the form a 1 x 1 + a 2 x 2
More informationNumerical Linear Algebra
Numerical Linear Algebra Direct Methods Philippe B. Laval KSU Fall 2017 Philippe B. Laval (KSU) Linear Systems: Direct Solution Methods Fall 2017 1 / 14 Introduction The solution of linear systems is one
More information5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns
5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns (1) possesses the solution and provided that.. The numerators and denominators are recognized
More informationChapter 2 - Linear Equations
Chapter 2 - Linear Equations 2. Solving Linear Equations One of the most common problems in scientific computing is the solution of linear equations. It is a problem in its own right, but it also occurs
More informationLinear Algebra Linear Algebra : Matrix decompositions Monday, February 11th Math 365 Week #4
Linear Algebra Linear Algebra : Matrix decompositions Monday, February 11th Math Week # 1 Saturday, February 1, 1 Linear algebra Typical linear system of equations : x 1 x +x = x 1 +x +9x = 0 x 1 +x x
More informationSolving 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 informationI-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 informationSOLVING 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 informationGaussian 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 informationDEN: Linear algebra numerical view (GEM: Gauss elimination method for reducing a full rank matrix to upper-triangular
form) Given: matrix C = (c i,j ) n,m i,j=1 ODE and num math: Linear algebra (N) [lectures] c phabala 2016 DEN: Linear algebra numerical view (GEM: Gauss elimination method for reducing a full rank matrix
More informationIntroduction 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 informationAn Introduction to Numerical Analysis. James Brannick. The Pennsylvania State University
An Introduction to Numerical Analysis James Brannick The Pennsylvania State University Contents Chapter 1. Introduction 5 Chapter 2. Computer arithmetic and Error Analysis 7 Chapter 3. Approximation and
More information1 Floating point arithmetic
Introduction to Floating Point Arithmetic Floating point arithmetic Floating point representation (scientific notation) of numbers, for example, takes the following form.346 0 sign fraction base exponent
More informationChapter 1 Error Analysis
Chapter 1 Error Analysis Several sources of errors are important for numerical data processing: Experimental uncertainty: Input data from an experiment have a limited precision. Instead of the vector of
More informationThe System of Linear Equations. Direct Methods. Xiaozhou Li.
1/16 The Direct Methods xiaozhouli@uestc.edu.cn http://xiaozhouli.com School of Mathematical Sciences University of Electronic Science and Technology of China Chengdu, China Does the LU factorization always
More information6 Linear Systems of Equations
6 Linear Systems of Equations Read sections 2.1 2.3, 2.4.1 2.4.5, 2.4.7, 2.7 Review questions 2.1 2.37, 2.43 2.67 6.1 Introduction When numerically solving two-point boundary value problems, the differential
More informationLecture Note 2: The Gaussian Elimination and LU Decomposition
MATH 5330: Computational Methods of Linear Algebra Lecture Note 2: The Gaussian Elimination and LU Decomposition The Gaussian elimination Xianyi Zeng Department of Mathematical Sciences, UTEP The method
More informationCPE 310: Numerical Analysis for Engineers
CPE 310: Numerical Analysis for Engineers Chapter 2: Solving Sets of Equations Ahmed Tamrawi Copyright notice: care has been taken to use only those web images deemed by the instructor to be in the public
More informationGAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)
GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511) D. ARAPURA Gaussian elimination is the go to method for all basic linear classes including this one. We go summarize the main ideas. 1.
More informationLinear Programming The Simplex Algorithm: Part II Chapter 5
1 Linear Programming The Simplex Algorithm: Part II Chapter 5 University of Chicago Booth School of Business Kipp Martin October 17, 2017 Outline List of Files Key Concepts Revised Simplex Revised Simplex
More informationElements of Floating-point Arithmetic
Elements of Floating-point Arithmetic Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Floating-point Numbers Representations IEEE Floating-point Standards Underflow
More informationPractical Linear Algebra: A Geometry Toolbox
Practical Linear Algebra: A Geometry Toolbox Third edition Chapter 12: Gauss for Linear Systems Gerald Farin & Dianne Hansford CRC Press, Taylor & Francis Group, An A K Peters Book www.farinhansford.com/books/pla
More informationNumerical Methods. Elena loli Piccolomini. Civil Engeneering. piccolom. Metodi Numerici M p. 1/??
Metodi Numerici M p. 1/?? Numerical Methods Elena loli Piccolomini Civil Engeneering http://www.dm.unibo.it/ piccolom elena.loli@unibo.it Metodi Numerici M p. 2/?? Least Squares Data Fitting Measurement
More informationComputational 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 informationChapter 7. Tridiagonal linear systems. Solving tridiagonal systems of equations. and subdiagonal. E.g. a 21 a 22 a A =
Chapter 7 Tridiagonal linear systems The solution of linear systems of equations is one of the most important areas of computational mathematics. A complete treatment is impossible here but we will discuss
More informationMATHEMATICS FOR COMPUTER VISION WEEK 2 LINEAR SYSTEMS. Dr Fabio Cuzzolin MSc in Computer Vision Oxford Brookes University Year
1 MATHEMATICS FOR COMPUTER VISION WEEK 2 LINEAR SYSTEMS Dr Fabio Cuzzolin MSc in Computer Vision Oxford Brookes University Year 2013-14 OUTLINE OF WEEK 2 Linear Systems and solutions Systems of linear
More information5. 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 informationLINEAR SYSTEMS (11) Intensive Computation
LINEAR SYSTEMS () Intensive Computation 27-8 prof. Annalisa Massini Viviana Arrigoni EXACT METHODS:. GAUSSIAN ELIMINATION. 2. CHOLESKY DECOMPOSITION. ITERATIVE METHODS:. JACOBI. 2. GAUSS-SEIDEL 2 CHOLESKY
More informationCS513, Spring 2007 Prof. Amos Ron Assignment #5 Solutions Prepared by Houssain Kettani. a mj i,j [2,n] a 11
CS513, Spring 2007 Prof. Amos Ron Assignment #5 Solutions Prepared by Houssain Kettani 1 Question 1 1. Let a ij denote the entries of the matrix A. Let A (m) denote the matrix A after m Gaussian elimination
More informationMAT 460: Numerical Analysis I. James V. Lambers
MAT 460: Numerical Analysis I James V. Lambers January 31, 2013 2 Contents 1 Mathematical Preliminaries and Error Analysis 7 1.1 Introduction............................ 7 1.1.1 Error Analysis......................
More informationRoundoff Analysis of Gaussian Elimination
Jim Lambers MAT 60 Summer Session 2009-0 Lecture 5 Notes These notes correspond to Sections 33 and 34 in the text Roundoff Analysis of Gaussian Elimination In this section, we will perform a detailed error
More informationFLOATING POINT ARITHMETHIC - ERROR ANALYSIS
FLOATING POINT ARITHMETHIC - ERROR ANALYSIS Brief review of floating point arithmetic Model of floating point arithmetic Notation, backward and forward errors 3-1 Roundoff errors and floating-point arithmetic
More informationNotes for Chapter 1 of. Scientific Computing with Case Studies
Notes for Chapter 1 of Scientific Computing with Case Studies Dianne P. O Leary SIAM Press, 2008 Mathematical modeling Computer arithmetic Errors 1999-2008 Dianne P. O'Leary 1 Arithmetic and Error What
More informationSolving 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 informationNumerical Methods I: Numerical linear algebra
1/3 Numerical Methods I: Numerical linear algebra Georg Stadler Courant Institute, NYU stadler@cimsnyuedu September 1, 017 /3 We study the solution of linear systems of the form Ax = b with A R n n, x,
More informationMAT 343 Laboratory 3 The LU factorization
In this laboratory session we will learn how to MAT 343 Laboratory 3 The LU factorization 1. Find the LU factorization of a matrix using elementary matrices 2. Use the MATLAB command lu to find the LU
More informationChapter 4. Solving Systems of Equations. Chapter 4
Solving Systems of Equations 3 Scenarios for Solutions There are three general situations we may find ourselves in when attempting to solve systems of equations: 1 The system could have one unique solution.
More informationNumerical 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 informationLinear Equations and Matrix
1/60 Chia-Ping Chen Professor Department of Computer Science and Engineering National Sun Yat-sen University Linear Algebra Gaussian Elimination 2/60 Alpha Go Linear algebra begins with a system of linear
More information14.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 informationSection 3.5 LU Decomposition (Factorization) Key terms. Matrix factorization Forward and back substitution LU-decomposition Storage economization
Section 3.5 LU Decomposition (Factorization) Key terms Matrix factorization Forward and back substitution LU-decomposition Storage economization In matrix analysis as implemented in modern software the
More informationACM 106a: Lecture 1 Agenda
1 ACM 106a: Lecture 1 Agenda Introduction to numerical linear algebra Common problems First examples Inexact computation What is this course about? 2 Typical numerical linear algebra problems Systems of
More informationIntroduction to Scientific Computing Languages
1 / 21 Introduction to Scientific Computing Languages Prof. Paolo Bientinesi pauldj@aices.rwth-aachen.de Numerical Representation 2 / 21 Numbers 123 = (first 40 digits) 29 4.241379310344827586206896551724137931034...
More informationArithmetic and Error. How does error arise? How does error arise? Notes for Part 1 of CMSC 460
Notes for Part 1 of CMSC 460 Dianne P. O Leary Preliminaries: Mathematical modeling Computer arithmetic Errors 1999-2006 Dianne P. O'Leary 1 Arithmetic and Error What we need to know about error: -- how
More informationNumerical Analysis Fall. Gauss Elimination
Numerical Analysis 2015 Fall Gauss Elimination Solving systems m g g m m g x x x k k k k k k k k k 3 2 1 3 2 1 3 3 3 2 3 2 2 2 1 0 0 Graphical Method For small sets of simultaneous equations, graphing
More informationLinear Algebraic Equations
Linear Algebraic Equations Linear Equations: a + a + a + a +... + a = c 11 1 12 2 13 3 14 4 1n n 1 a + a + a + a +... + a = c 21 2 2 23 3 24 4 2n n 2 a + a + a + a +... + a = c 31 1 32 2 33 3 34 4 3n n
More informationDraft. Lecture 12 Gaussian Elimination and LU Factorization. MATH 562 Numerical Analysis II. Songting Luo
Lecture 12 Gaussian Elimination and LU Factorization Songting Luo Department of Mathematics Iowa State University MATH 562 Numerical Analysis II ongting Luo ( Department of Mathematics Iowa State University[0.5in]
More informationApplied Mathematics 205. Unit II: Numerical Linear Algebra. Lecturer: Dr. David Knezevic
Applied Mathematics 205 Unit II: Numerical Linear Algebra Lecturer: Dr. David Knezevic Unit II: Numerical Linear Algebra Chapter II.2: LU and Cholesky Factorizations 2 / 82 Preliminaries 3 / 82 Preliminaries
More informationLECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel
LECTURE NOTES on ELEMENTARY NUMERICAL METHODS Eusebius Doedel TABLE OF CONTENTS Vector and Matrix Norms 1 Banach Lemma 20 The Numerical Solution of Linear Systems 25 Gauss Elimination 25 Operation Count
More information11.5 Reduction of a General Matrix to Hessenberg Form
476 Chapter 11. Eigensystems 11.5 Reduction of a General Matrix to Hessenberg Form The algorithms for symmetric matrices, given in the preceding sections, are highly satisfactory in practice. By contrast,
More informationSolving Linear Systems of Equations
Solving Linear Systems of Equations Gerald Recktenwald Portland State University Mechanical Engineering Department gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab:
More information