1.2k likes | 1.39k Views
MATRIX METHODS SYSTEMS OF LINEAR EQUATIONS Student Notes. ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier Dr. B.A. DeVantier. Specific Study Objectives. Review basic definitions Review basic matrix operations
E N D
MATRIX METHODSSYSTEMS OF LINEAR EQUATIONSStudent Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier Dr. B.A. DeVantier
Specific Study Objectives • Review basic definitions • Review basic matrix operations • Addition/subtraction • Multiplication • Determinant • Understand the graphic interpretation of ill-conditioned systems and how it relates to the determinant • Be familiar with terminology: forward elimination, back substitution, pivot equations and pivot coefficient
Specific Study Objectives • Apply matrix inversion • Understand that the Gauss-Seidel method is particularly well-suited for large sparse systems of equations • Know how to assess diagonal dominance of a system of equations and how it relates to whether the system can be solved with the Gauss-Seidel method • Understand the rationale behind relaxation and how to apply this technique
How to represent a system of linear equations as a matrix [A]{x} = {c} where {x} and {c} are both column vectors
90 60 30 Practical application • Consider a problem in structural engineering • Find the forces and reactions associated with a statically determinant truss roller: transmits vertical forces hinge: transmits both vertical and horizontal forces at the surface
1 90 2 60 30 3 1000 kg F1 F3 H2 F2 V2 V3 FREE BODY DIAGRAM
Node 1 F1,V F1,H 30 60 F3 F1
Node 2 F1 30 F2 H2 V2
Node 3 F3 60 F2 V3
SIX EQUATIONS SIX UNKNOWNS
Do some book keeping F1 F2 F3 H2 V2 V3 1 2 3 4 5 6 -cos30 0 cos60 0 0 0 -sin30 0 -sin60 0 0 0 cos30 1 0 1 0 0 sin30 0 0 0 1 0 0 -1 -cos60 0 0 0 0 0 sin60 0 0 1 0 -1000 0 0 0 0
This is the basis for your matrices and the equation [A]{x}={c}
System of Linear Equations • We have focused our last lectures on finding a value of x that satisfied a single equation • f(x) = 0 • Now we will deal with the case of determining the values of x1, x2, .....xn, that simultaneously satisfy a set of equations
System of Linear Equations • Simultaneous equations • f1(x1, x2, .....xn) = 0 • f2(x1, x2, .....xn) = 0 • ............. • fn(x1, x2, .....xn) = 0 • Methods will be for linear equations • a11x1 + a12x2 +...... a1nxn =c1 • a21x1 + a22x2 +...... a2nxn =c2 • .......... • an1x1 + an2x2 +...... annxn =cn
Mathematical BackgroundMatrix Notation • a horizontal set of elements is called a row • a vertical set is called a column • first subscript refers to the row number • second subscript refers to column number
note subscript This matrix has m rows and ncolumn. It has the dimensions m by n (m x n)
Note the consistent scheme with subscripts denoting row,column column 3 row 2
Types of Matrices Row vector: m=1 Column vector: n=1 Square matrix: m = n
Definitions • Symmetric matrix • Diagonal matrix • Identity matrix • Inverse of a matrix • Transpose of a matrix • Upper triangular matrix • Lower triangular matrix • Banded matrix
Symmetric Matrixaij = aji for all i’s and j’s Does a23 = a32 ? Yes. Check the other elements on your own.
Diagonal MatrixA square matrix where all elements off the main diagonal are zero
Identity MatrixA diagonal matrix where all elements on the main diagonal are equal to 1 The symbol [I] is used to denote the identify matrix.
Upper Triangle MatrixElements below the main diagonal are zero
Lower Triangular MatrixAll elements above the main diagonal are zero
Banded MatrixAll elements are zero with the exception of a band centered on the main diagonal
Matrix Operating Rules • Addition/subtraction • add/subtract corresponding terms • aij + bij = cij • Addition/subtraction are commutative • [A] + [B] = [B] + [A] • Addition/subtraction are associative • [A] + ([B]+[C]) = ([A] +[B]) + [C]
Matrix Operating Rules • Multiplication of a matrix [A] by a scalar g is obtained by multiplying every element of [A] by g
Matrix Operating Rules • The product of two matrices is represented as [C] = [A][B] • Basic algorithm
Simple way to check whether matrix multiplication is possible exterior dimensions conform to dimension of resulting matrix [A] m x n [B] n x k= [C] m x k interior dimensions must be equal
Recall the equation presented for matrix multiplication • The product of two matrices is represented as [C] = [A][B] • n = column dimensions of [A] • n = row dimensions of [B]
Example Determine [C] given [A][B] = [C] Strategy
Strategy • A 3x3 times a 3x3 is a 3x3 • For c11=(-1)(-2)+(3)(3)+(2)(3)
Strategy • c12 • c13
Matrix multiplication • If the dimensions are suitable, matrix multiplication is associative • ([A][B])[C] = [A]([B][C]) • If the dimensions are suitable, matrix multiplication is distributive • ([A] + [B])[C] = [A][C] + [B][C] • Multiplication is generally not commutative • [A][B] is not equal to [B][A]
Determinants Denoted as det A or lAl for a 2 x 2 matrix
Determinants For a 3 x 3 + - +
Problem Determine the determinant of the matrix. Strategy
Properties of Determinants • det A = det AT • If all entries of any row or column is zero, then det A = 0 • If two rows or two columns are identical, then det A = 0 • Note: determinants can be calculated using mdeterm function in Excel
Matrix Methods • Graphical • Cramer’s Rule • Gauss elimination • Matrix inversion • Gauss Seidel/Jacobi
x2 ( x1, x2 ) x1 Graphical Method2 equations, 2 unknowns
x2 9 3 ( 4 , 3 ) 2 1 2 1 x1 Check: 3(4) + 2(3) = 12 + 6 = 18
x2 ( x1, x2 ) x1 When does this not work? • No solution • Infinite solution • Ill-conditioned
f(x) x f(x) x f(x) x a) No solution - same slope b) infinite solution -1/2 x1 + x2 = 1 -x1 +2x2 = 2 c) ill conditioned so close that the points of intersection are difficult to detect visually
Ill Conditioned: What do I mean? • The equations are not independent • The equations are not unique • The solution isn’t worth 2¢
The Determinant as a Tool • If the determinant is zero, the slopes are identical Rearrange these equations so that we have an alternative version in the form of a straight line: i.e. x2 = (slope) x1 + intercept