S. Mulligan

M.Sc. in Applied Computing

Linear Systems of Equations Solution of Linear Systems. Solving linear systems may very well be the foremost assignment of numerical analysis. Much of applied numerical mathematics reduces to a set of equations, or linear system: Ax b (1) with the matrix A and vector b given, and the vector x to be determined. An extraordinary collection of algorithms has been developed for achieving this has been developed. These can be classified into two categories: direct methods and iterative methods. The variety of the algorithms indicated that the apparently elementary character of the problem is deceptive. We will first consider direct methods: The most common method is Gaussian elimination (and back-substitution) or LU decomposition (forward and back-substitution).

Gaussian Elimination. We can write the linear system (1) as n

ai , j x j

i=1,…,n

bi

(2)

j 1

A is a square n x n matrix with coefficients:

A

a1,1

a1,2



a 2 ,1

a 2 ,2

 a 2 ,n





a n ,1

a n ,2



a1,n

b1

x1 x



 a n ,n

x2

b



b2 

(3)

bn

xn

In order for this system to have a unique solution, it must be nonsingular, i.e. its inverse must exist. Then the solution is given by (4) x A1 b 1 Note I A A , the identity matrix of order n, which has 1’s on the main diagonal and zero’s everywhere else. In general, computing the inverse of a matrix is not easy. In Gaussian elimination we transform the system (1) into an upper triangular system, by carrying out elementary operations on the equations. This gives U x = c. (5) This system can be easily solved by backward substitution. The only non-zero elements in U occur on and above the main diagonal. Hence we first find, xn, then xn-1, …, x1.

U

u1,1

u1, 2



0

u2 , 2

 u 2 ,n







0

0

 u n ,n

u1,n

(6)



We can rewrite the system (1) in long format as: a1,1 x1 a1,2 x2  a1,n xn b1 a 2 ,1 x1 a2 ,2 x2  a 2 ,n xn b2

: a n ,1 x1

an ,2 x2  a n ,n xn

© Computing Dept. DIT Bolton St

bn

Page 1

S. Mulligan

M.Sc. in Applied Computing

We now eliminate x1 from the 2nd to the nth equation, by subtracting ai ,1 / a1,1 times the 1st equation from the ith equation. This ratio is called the multiplier. Equations 2 to n now only involve x2 to xn. The same procedure is carried out to eliminate x2 from equations 3 to n. The same operations are carried out on the right-hand side to modify the bi terms. Finally, the last equation will only involve xn. This system is straightforward to solve. Example. Consider the simple example of 3 equations 3x1 x2 2 x3 x1 2 x2 3x3 2 x1 2 x2 x3

12 11 2

Gaussian Elimination Algorithm. To solve a system of linear equations: 1. Augment the n x n coefficient matrix with the vector of right-hand sides to form an n x (n+1) matrix. The RHS is the (n+1)st column. 2. Interchange rows (if necessary, or required) to make a1,1 the largest magnitude of any coefficient in the first column. (Optional) 3. Create zeros in the 2nd through to the nth rows in the first column by subtracting aj,1/a1,1 times the first row from the j-th row, j = 2 to n. 4. Repeat steps (2) and (3) for the i = 2nd through to (n-1)st rows, putting the largestmagnitude coefficient on the diagonal by interchanging rows (considering only rows i to n), and then subtracting aj,i/ai,i times the i-th row from the j-th row, (for j = i+1 to n) so as to create zeros in all positions of the i-th column below the diagonal. At the end of this step, the system is upper-triangular. 5. Solve for xn from the nth equation by xn an ,n 1 / an ,n . Note the RHS bn a n ,n 1 6. Solve for xn 1 , xn 2 ,..., x1 from the (n-1)st through the first equation in turn, by n

bi xi

ai , j x j j i 1

a i .i

i.e. backward-substitution

(7)

In terms of pseudocode the algorithm is basically as follows: for each pivot element ai,i, eliminate the remaining column j, by subtracting from row_j the multiplier*row_i: for i = 1 to n-1 pivot = a(i,i) for j = i + 1 to n // for row j, compute multiplier m(j,i) = a(j,i)/a(i,i) for k = i+1 to n // elements of row j a(j,k) = a(j,k) – m(j,i)*a(i,k) end end end

LU Decomposition. Another variation of Gaussian elimination is the LU decomposition of the matrix A. Here L is a lower triangular matrix, and U is an upper triangular matrix. Then the system of equations can be written as LUx b, or Ly b, where Ux y, (8) So first solve the system Ly b, for y by forward substitution, and then solve the system

© Computing Dept. DIT Bolton St

Page 2

S. Mulligan

Ux

M.Sc. in Applied Computing

y, for x by backward substitution. The elements of the lower triangular matrix L are in

fact the multipliers aj,i/ai,i obtained in the Gaussian elimination routine, and U is the uppertriangular matrix obtained by the Gaussian elimination algorithm. Thus

L

1

0

 0

m2 ,1

1

 0







mn .1

mn , 2



(9)

 1

Exercise. Verify the LU decomposition for the 3 equations example given above. 3 A

1 2

1 2

2 3

2

© Computing Dept. DIT Bolton St

(10)

1

Page 3

Linear Systems of Equations - Computing - DIT

Solution of Linear Systems. Solving linear systems may very well be the foremost assignment of numerical analysis. Much of applied numerical mathematics reduces to a set of equations, or linear system: Ax b. (1) with the matrix A and vector b given, and the vector x to be determined. An extraordinary collection of ...

138KB Sizes 2 Downloads 242 Views

Recommend Documents

Infinite Algebra 2 - U3 - Systems of Linear Equations ...
What is the cost each of one package of white chocoloate chip cookie dough and one package of gingerbread cookie dough? 31) Kim and Mark are selling cheesecakes for a school fundraiser. Customers can buy New York style cheesecakes and apple cheesecak

On the Solution of Linear Recurrence Equations
In Theorem 1 we extend the domain of Equation 1 to the real line. ... We use this transform to extend the domain of Equation 2 to the two-dimensional plane.

Linear Equations Thinking Map.pdf
Connect more apps... Try one of the apps below to open or edit this item. Linear Equations Thinking Map.pdf. Linear Equations Thinking Map.pdf. Open. Extract.

Some linear fractional stochastic equations
Université de Panthéon-Sorbonne Paris 1. 90, rue de Tolbiac, 75634 Paris Cédex 13, France [email protected]. Abstract. Using the multiple stochastic integrals we prove an existence and uniqueness result for a linear stochastic equation driven b

1 Linear Equations and Inequalities
Homework Answers: #6. Find and graph the solution set. 4 5(4 12) 144 x. −. −. ≤. 4 20 60 144 x. −. + ≤. 20 64 144 x. −. + ≤. 20 80 x. −. ≤. 4 x ≥ −. Reverse! 4−. Back ...

Linear Differential Equations With Constant Coefficients_Exercise 5.4 ...
devsamajcollege.blogspot.in Sanjay Gupta, Dev Samaj College For Women, Ferozepur City. Page 3 of 20. Linear Differential Equations With Constant Coefficients_Exercise 5.4.pdf. Linear Differential Equations With Constant Coefficients_Exercise 5.4.pdf.

Linear Differential Equations With Constant Coefficients_Exercise 5.5 ...
devsamajcollege.blogspot.in Sanjay Gupta, Dev Samaj College For Women, Ferozepur City. Page 3 of 17. Linear Differential Equations With Constant Coefficients_Exercise 5.5.pdf. Linear Differential Equations With Constant Coefficients_Exercise 5.5.pdf.

Linear Equations Of Second Order_Exercise 7.2.pdf
Page 4 of 16. Page 4 of 16. devsamajcollege.blogspot.in Sanjay Gupta, Dev Samaj College For Women, Ferozepur City. Page 4 of 16. Linear Equati ... rcise 7.2.pdf. Linear Equatio ... ercise 7.2.pdf. Open. Extract. Open with. Sign In. Main menu. Display

Slope-intercept form of linear equations Create tables ...
Page 1 ... Create tables of values for each of ... .com/snpapp/iText/products/0-13-250445-6/data/media/Ch06/06-02/PH_Alg1_ch06-02_Gizmo.html y = 3 x y = 2 x.

Linear Equations Of Second Order_Exercise 7.3.pdf
Page 1 of 17. Page 1 of 17. devsamajcollege.blogspot.in Sanjay Gupta, Dev Samaj College For Women, Ferozepur City. LINEAR EQUATIONS OF SECONDE ORDER. EXERCISE 7.3 CHAPTER - 7. Q.1. Q.2. Page 1 of 17. Page 2 of 17. Page 2 of 17. devsamajcollege.blogsp

Linear Systems
in which a desk calculator may be used. By a ...... that are of significance in application to linear systems ..... (ro, 1p,) + 2 (App)a = (h,Ap) = (1h,p) = (k,p). OI".

The Rise of Cloud Computing Systems - SIGOPS
Jeff Dean. Google, Inc. (Describing the work of thousands of people!) 1 ... Cluster-Based Scalable Network Services, Fox, Gribble, Chawathe, Brewer, & Gauthier ...

Theory of Computing Systems - Springer Link
Bradley C. Kuszmaul is now Senior Research Scientist at Akamai. Technologies as well as a Research Affiliate at Yale University. Dana S. Henry and Gabriel H.

uest dit orial
programs and curricula must grow out of local needs and conditions, and ... tertiary hospital-based health systems, which tend to be centralized ... Management and organizational issues .... conversion, and especially Ms. Nikki Baraquio for her.

Fast computing of some generalized linear mixed ...
Jun 3, 2009 - and we will call this the step 2 optimization. – Step 3. Estimate ...... Patterson HD, Thompson R (1974) Maximum likelihood estimation of components of variance. In: Proceedings of the eighth international biometric conference.

1.1E Homework: Linear Equations and Real World ...
The number of boys in the Sports Club is four fifths the number of girls. If there are 360 boys and girls altogether in the club, how many girls are there in the club? 8. Michaela's age is ten years greater than half Jake's age. If the sum of their a