Lecture 8 System of Equations - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Lecture 8 System of Equations

Description:

The problem is inconsistent if there is no solution for the problem. Rank of Matrix ... If rank(A) = n and is inconsistent, A has no solution exists ... – PowerPoint PPT presentation

Number of Views:75
Avg rating:3.0/5.0
Slides: 31
Provided by: EricSa96
Category:

less

Transcript and Presenter's Notes

Title: Lecture 8 System of Equations


1
Lecture 8 System of Equations
  • February 8, 2001
  • CVEN 302

2
Lectures Goals
  • Introduction to Systems of Equations
  • Discuss how to solve systems
  • Gaussian Elimination
  • Gaussian Elimination with Pivoting
  • Tridiagonal Solver
  • Problems with the technique
  • Examples

3
Simple Linear Oscillator
  • The spring-mass system can
  • be described with a series of
  • equations to model the
  • physical behavior. The
  • displacement of the masses
  • are given as u, k represents
  • the stiffness of the springs
  • and M represents the mass of
  • each member.

4
Simple Linear Oscillator
  • The free body diagrams of
  • components of the spring
  • mass system can be
  • represented. Using the
  • equilibrium equations, the
  • static behavior of the model
  • can be determined.

5
Simple Oscillator
  • The equations can be written from the free body
    diagrams.
  • The matrix and vectors can be obtained from the
    equations.

6
Simple 3-D frame
  • A force is applied to the apex
  • of a simple 3-D frame. We
  • would like to determine the
  • forces in each of the
  • members of the frame. With
  • a FBD, the static equilibrium
  • equations can be derived.

7
Simple 3-D Frame
  • The set of 3 equilibrium equations and 3 unknowns
    can be
  • obtained from the FBD of the frame. Place the
    equations in a
  • matrix format.

8
Simple 3-D Frame
  • The frame is represented as a matrix with 3
    unknowns. The
  • forces are normalized with respect to the applied
    force, F.

9
Basic Principles
  • The general description of a set of linear
    equations in the matrix form
  • Ax b
  • A ( m x n ) matrix
  • x ( n x 1 ) vector
  • b (m x 1 ) vector

10
Description of the linear set of equations
  • Write the equations in natural form
  • Identify unknowns and order them
  • Isolate unknowns
  • Write equations in matrix form

11
Types of Matrix Formulation
  • ( m x n ) Array
  • If m n The solution of Ax b with
  • n unknowns and m equations
  • If m gt n The system is overdetermined system
  • (Least Square Problems)
  • If mlt n The system is underdetermined system
  • (Optimization Problems)

12
Matrix Representation
  • Ax b
  • a11 a12
    a1n b1
  • x1 a21 x1 a22 . xn a2n b2

  • am1 am2
    amn bm

13
Consistency
  • Ax b
  • The problem is consistent if a solution exists
    for the problem.
  • The problem is inconsistent if there is no
    solution for the problem.

14
Rank of Matrix
  • Rank of a matrix is the number of linearly
  • independent column vectors in the matrix.
  • For n x n matrix, A
  • If rank(A) n and is consistent, A has an unique
    solution exists
  • If rank(A) n and is inconsistent, A has no
    solution exists
  • If rank(A) lt n and system is consistent, A has an
    infinite number of solutions

15
Matrix
  • For an n x n system, rank(A) n automatically
    guarantees
  • that the system is consistent.
  • The columns of A are linearly independent
  • The rows of A are linearly independent
  • rank(A) n
  • det(A) 0
  • A-1 exists
  • The solution to Ax b exist and is unique.

16
Matrix Definition
  • Consider
  • y -2.0 x 6
  • y 0.5 x 1
  • 2 unknowns x , y and
  • rank is 2
  • 2 1 x 6
  • -0.5 1 y 1
  • Consider
  • y -2 x 6
  • y -2 x 5
  • 2 unknowns x , y and rank is
  • 1 and is inconsistent
  • 2 1 x 6
  • 2 1 y 5

17
Gaussian Elimination
  • Gaussian elimination is a fundamental
  • procedure for solving linear sets of
  • equation general it is applied to a square
  • matrix.

18
Gaussian Elimination
  • There are two phases to the solving technique
  • Elimination --- use row operations to convert the
    matrix into an upper diagonal matrix. (The
    elimination phase, which takes the the most
    effort and most susceptible to corruption by
    round off)
  • Back substitution -- Solve x using a back
    substitution.

19
Gaussian Elimination Algorithm
  • Ax b
  • Augment the n x n coefficient matrix with the
    vector of right hand sides to form a n x (n1)
  • Interchange rows if necessary to make the value
    a11 with the largest magnitude of any coefficient
    in the first row
  • Create zero in 2nd through nth row in first row
    by subtracting ai1 / a11 times first row from ith
    row

20
Gaussian Elimination Algorithm
  • Repeat (2) (3) for second through the (n-1)th
    rows, putting the largest magnitude coefficient
    in the diagonal by interchanging rows (consider
    only row j to n ) and then subtract times the
    jth row from the ith row so as to create zeros in
    all positions of jth column below the diagonal at
    conclusion of this step the system is upper
    triangular
  • Solve for n from nth equation xn an,n1 / ann
  • Solve for xn-1 , xn-2 , ...x1 from the (n-1)th
    through the first xi (ai,n1 - Sji1,n aj1
    xj ) / aii

21
Example 1
  • X1 3X2 5
  • 2X1 4X2 6

22
Example 2
  • -3X1 2X2 - X3 -1
  • 6X1 - 6X2 7X3 -7
  • 3X1 - 4X2 4X3 -6

23
Computer Program
  • The program GEdemo(A,b) does the Gaussian
  • elimination for a square matrix (nxn). It does
  • not do any pivoting and works for only one
  • b vector.

24
Test the Program
  • Example 1
  • Example 2
  • New Matrix
  • 2X1 4X2 - 2 X3 - 2 X4 - 4
  • 1X1 2X2 4X3 - 3 X4 5
  • - 3X1 - 3X2 8X3 - 2X4 7
  • - X1 X2 6X3 - 3X4
    7

25
Problem with Gaussian Elimination
  • The problem can occur when a zero appears in the
    diagonal and makes a simple Gaussian elimination
    impossible.
  • Pivoting changes the matrix so that it will
    become diagonally dominate and reduce the
    round-off and truncation errors in the solving
    the matrix.

26
Computer Program
  • GEPivotdemo(A,b) is a program, which will do a
    Gaussian elimination on matrix A with pivoting
    technique to make matrix diagonally dominate.
  • The program is modification to handle a single
    value of b

27
Question?
  • How would you modify the programs to handle
    multiple inputs?
  • What is diagonal matrix, upper triangular matrix,
    and lower triangular matrix?
  • Can you do a column exchange and how would you
    handle the problem if it works?

28
Question?
  • What happens with the following example?
  • 0.0001X1 0.5 X2 0.5
  • 0.4000X1 - 0.3 X2 0.1
  • What happens is the second equation becomes
    0.4000X1 - 2000 X2 -2000

29
Gaussian Elimination
  • If the diagonal is not dominate the problem can
    have round off error and truncation errors.
  • The scaling will result in problems

30
Summary
  • Matrix properties consistency, rank, diagonally
    dominate, upper triangular, lower triangular
  • Gaussian elimination is a method to solve for a
    set of linear equations
  • Non-pivoting problems
  • Setting up the system of linear equations to
    avoid problems
Write a Comment
User Comments (0)
About PowerShow.com