solution of systems of linear equations

40
Algebraic, transcendental (i.e., involving trigonometric and exponential functions), ordinary differential equations, or partial differential equations... Solution of Systems of Linear Equations ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Upload: eben

Post on 24-Feb-2016

132 views

Category:

Documents


0 download

DESCRIPTION

Solution of Systems of Linear Equations. Algebraic, transcendental (i.e., involving trigonometric and exponential functions), ordinary differential equations, or partial differential equations. Basic Terminology. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Solution of Systems of Linear Equations

Algebraic, transcendental (i.e., involving trigonometric and exponential functions), ordinary

differential equations, or partial differential equations...

Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Page 2: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Basic Terminology1. Analytical Method – is one that produces either exact or approximate solutions in closed form2. Components – the elements of a vector

3. Conformable – matrices with identical dimensions4. Accuracy – is a measure of the nearness of a value for the true value5. Precision – is a measure of the clustering of values near each other

Page 3: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Basic Terminology6. Triangular matrix – a square matrix in which all the elements on one side of the diagonal are zero 7. Gauss elimination – methods for solving a system; reducing the matrix to the upper triangular form, and then back to substitution8. Double sequence – is a function of domain of ordered pairs (i, j)of integer and with range consisting of a portion of the real number system9. Non- singular matrix – a square matrix with a non-zero determinant

Page 4: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

In general, a system of linear algebraic equations may be of the form

: : : : :

: : : : :

Where xj (j=1,2,…m) denotes the unknown variable

aij (i=1,2,…n; j=1,2,…m) denotes the coefficients of the unknown variable

bi (i=1,2,…n) denotes the non-homogeneous terms

Page 5: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Analytical method

One that produces either exact or approximate solutions in closed form.

Page 6: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Four possible solutions to a system of linear algebraic equations:

1. A unique solution – a consistent set of solutions2. No solution – an inconsistent set of equations3. An infinite number of solutions – a redundant set of equations

4. The trival solution xj = 0 – a set of homogenous equations

Page 7: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Two fundamental approaches for solving systems of linear algebraic equations:

1. Direct methods – are systematic procedures, based on algebraic elimination, that obtain the solution in a fixed number of operations.2. Iterative methods – obtain the solution asymptotically by an iterative procedure. A trial solution is assumed, the trial solution is substituted into the system of equations to determine the mismatch in the trial solution, and an improved solution is obtained from the mismatch data.

Page 8: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 1An (m x n) or (m, n) matrix is a rectangular array of quantities arranged in m rows and n columns.

Page 9: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 2A matrix with only one row is a special kind of matrix known as a row vector.

Page 10: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 3A matrix with only one column is a special kind of matrix known as a column vector.

Page 11: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 4The (n x m) or (n, m) matrix obtained from a given(m x n) or (m, n) A by interchanging its rows and columns is called the transpose of A denoted by the symbol AT.

Page 12: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 5A square matrix is a matrix where the dimensions m is equal to n.

Page 13: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 6A symmetric matrix is one where aij = aji for all i’s and j’s.

Page 14: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 7A square matrix in which each element not on the principal diagonal is zero is called a diagonal matrix.

Page 15: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 8A square matrix in which every element below the principal diagonal is zero is said to be upper triangular matrix.

Page 16: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 9A square matrix in which every element above the principal diagonal is zero is said to be lower triangular matrix.

Page 17: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 10A square matrix in which all elements equal to zero, with the exception of a band centered on the main diagonal is called a bonded matrix (e.g. tridiagonal matrix).

Page 18: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 11A diagonal matrix in which each diagonal element is 1 is called a unit matrix or identity matrix.

Page 19: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 12A matrix in which every element is zero is called a null matrix or zero matrix.

Page 20: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 13The determinant of an (n, n) square matrix A is written as lAl and is defined by either of

or

in which cij is known as the cofactor of the element aij.

Page 21: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 14The cofactor cij of an (n, n) square matrix A is obtained by first removing row i and column j to form an (n-1, n-1) matrix and then performing the operation

Page 22: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 15The augmented matrix is obtained by adjoining the column vector b to the coefficient matrix A.

Page 23: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Properties of Matrices and Determinants:

Definition 16A coefficient matrix with a zero determinant is singular, a unique solution for x requires a non-singular coefficient matrix.

Page 24: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Direct Methods of Linear Systems:

A. Methods for Triangular MatricesIt involves reduction of matrix equation into

one of the forms:

, L = lower triangular matrix

, U = upper triangular matrix

Page 25: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Direct Methods of Linear Systems:

B. Cramer’s Rule Gives the components xi of x in terms of determinants according to:

Page 26: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Direct Methods of Linear Systems:

B. Cramer’s Rule Example Use the Cramer’s rule to solve:

0.3x1 + 0.52x2 + x3 = -0.010.5x1 + x2 + 1.9x3 = 0.670.1x1 + 0.3x2 + 0.5x3 = -0.44

Page 27: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Direct Methods of Linear Systems:

C. Gaussian Elimination a method for solving a system of the type (A• x = b) wherein the goal is to reduce it to the upper triangular form and then use the back substitution scheme to obtain the components from each of the remaining equations.

Page 28: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Direct Methods of Linear Systems:

C. Gaussian Elimination ExampleUse Gaussian elimination to solve:

3x1 - 0.1x2 - 0.2x3 = 7.850.1x1 + 7x2 - 0.3x3 = -19.30.3x1 – 0.2x2 + 10x3 = 71.4

Page 29: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Direct Methods of Linear Systems:

D. Gauss-Jordan Method a variation of Gauss Elimination wherein the goal is to reduce the original matrix to a diagonal form. not popular since there is neither a reduction in programming complexity nor increased efficiency.

Page 30: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Direct Methods of Linear Systems:

D. Gauss-Jordan ExampleUse Gauss-Jordan to solve the previous problem:

3x1 - 0.1x2 - 0.2x3 = 7.850.1x1 + 7x2 - 0.3x3 = -19.30.3x1 – 0.2x2 + 10x3 = 71.4

Page 31: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Direct Methods of Linear Systems:

E. LU Decomposition Method is another elimination method of solving general systems of linear algebraic equations wherein the objective is to find a lower triangular factor L and an upper triangular factor U such that the system of equations can be transformed according to

Where A* = matrix after row exchange have been made to allow the factors L and U to be computed accurately; b* = vector b after an identical set of row exchanges.

Page 32: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Direct Methods of Linear Systems:

E. LU Decomposition ExampleSolve the previous problem:

3x1 - 0.1x2 - 0.2x3 = 7.850.1x1 + 7x2 - 0.3x3 = -19.30.3x1 – 0.2x2 + 10x3 = 71.4

Page 33: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Pitfalls of Elimination Methods:

1. Division by Zero2. Round-off Errors3. Ill-Condition Systems

is one where a small changes in one or more of the coefficients results in large changes in the solution. 4. Singular Systems is worse than ill-conditioned because two equations in the system are identical.

Page 34: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Techniques for Improving Solutions:

1. Pivoting2. Use of more significant figures 3. Scaling

Page 35: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Examples:

1. Solve the following systems:x1 + 2x2 = 101.1x1 + 2x2 = 10.4Then solve it again, but with the coefficient of x1 in the second equation modified slightly to 1.05.

Page 36: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Examples:

2. Evaluate the determinant of the following systems:3x1 + 2x2 = 18-x1 + 2x2 = 2And solve also the determinant in prob. 1.

Page 37: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Iterative Methods of Linear Systems:

A. Gauss-Seidel Method Iterative or approximate methods . Start the process by assigning initial values (guessing a value) and then use a systematic method to obtain a refined estimate of the root. Then solve for the subsequent values of x1 , x2 , x3 , etc. , using the following equations:

Page 38: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Iterative Methods of Linear Systems:

A. Gauss-Seidel Method

Page 39: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Direct Methods of Linear Systems:

A. Gauss-Seidel ExampleSolve the previous problem:

3x1 - 0.1x2 - 0.2x3 = 7.850.1x1 + 7x2 - 0.3x3 = -19.30.3x1 – 0.2x2 + 10x3 = 71.4

Page 40: Solution of Systems of Linear Equations

ES 84 Numerical Methods for Engineers, Mindanao State University- Iligan Institute of Technology

Direct Methods of Linear Systems:

Convergence criterion for the Gauss-Seidel

and