ECIV 520 Structural Analysis II Review of Matrix Algebra
Linear Equations in Matrix Form
Matrix Algebra Rectangular Array of Elements Represented by a single symbol [A]
Matrix Algebra Row 1 Row 3 Column 2Column m n x m Matrix
Matrix Algebra 3 rd Row 2 nd Column
Matrix Algebra 1 Row, m Columns Row Vector
Matrix Algebra n Rows, 1 Column Column Vector
Matrix Algebra If n = m Square Matrix e.g. n=m=5 Main Diagonal
Matrix Algebra Special Types of Square Matrices Symmetric: a ij = a ji
Matrix Algebra Diagonal: a ij = 0, i j Special Types of Square Matrices
Matrix Algebra Identity: a ii =1.0 a ij = 0, i j Special Types of Square Matrices
Matrix Algebra Upper Triangular Special Types of Square Matrices
Matrix Algebra Lower Triangular Special Types of Square Matrices
Matrix Algebra Banded Special Types of Square Matrices
Matrix Operating Rules - Equality [A] mxn =[B] pxq n=pm=qa ij =b ij
Matrix Operating Rules - Addition [C] mxn = [A] mxn +[B] pxq n=p m=q c ij = a ij +b ij
Matrix Operating Rules - Addition Properties [A]+[B] = [B]+[A] [A]+([B]+[C]) = ([A]+[B])+[C]
Multiplication by Scalar
Matrix Multiplication [A] n x m. [B] p x q = [C] n x q m=p
Matrix Multiplication
Matrix Multiplication - Properties Associative: [A]([B][C]) = ([A][B])[C] If dimensions suitable Distributive: [A]([B]+[C]) = [A][B]+[A] [C] Attention: [A][B] [B][A]
Operations - Transpose
Operations - Trace Square Matrix tr[A] = a ii
Determinants Are composed of same elements Completely Different Mathematical Concept
Determinants Defined in a recursive form 2x2 matrix
Determinants
Defined in a recursive form 3x3 matrix
Determinants Minor a 11
Determinants Minor a 12
Determinants Minor a 13
Determinants Properties 1)If two rows or two columns of matrix [A] are equal then det[A]=0 2)Interchanging any two rows or columns will change the sign of the det 3)If a row or a column of a matrix is {0} then det[A]=0 4) 5)If we multiply any row or column by a scalar s then 6) If any row or column is replaced by a linear combination of any of the other rows or columns the value of det[A] remains unchanged
Operations - Inverse [A][A] -1 [A] [A] -1 =[I] If [A] -1 does not exist [A] is singular
Operations - Inverse Calculation of [A] -1
Solution of Linear Equations
Numerical Solution of Linear Equations
Solution of Linear Equations Consider the system
Solution of Linear Equations
Express In Matrix Form Upper Triangular What is the characteristic? Solution by Back Substitution
Solution of Linear Equations Objective Can we express any system of equations in a form 0
Background Consider (Eq 1) (Eq 2) Solution 2*(Eq 1) (Eq 2) Solution !!!!!! Scaling Does Not Change the Solution
Background Consider (Eq 1) (Eq 2)-(Eq 1) Solution !!!!!! (Eq 1) (Eq 2) Solution Operations Do Not Change the Solution
Gauss Elimination Example Forward Elimination
Gauss Elimination -
Substitute 2 nd eq with new
Gauss Elimination -
Substitute 3rd eq with new
Gauss Elimination -
Substitute 3rd eq with new
Gauss Elimination
Gauss Elimination – Potential Problem Forward Elimination
Gauss Elimination – Potential Problem Division By Zero!! Operation Failed
Gauss Elimination – Potential Problem OK!!
Gauss Elimination – Potential Problem Pivoting
Partial Pivoting a 32 >a 22 a l2 >a 22 NO YES
Partial Pivoting
Full Pivoting In addition to row swaping Search columns for max elements Swap Columns Change the order of x i Most cases not necessary
EXAMPLE
Eliminate Column 1 PIVOTS
Eliminate Column 1
Eliminate Column 2 PIVOTS
Eliminate Column 2 Upper Triangular Matrix [ U ] Modified RHS { b }
LU Decomposition PIVOTS Column 1 PIVOTS Column 2
LU Decomposition As many as, and in the location of, zeros Upper Triangular Matrix U
LU Decomposition PIVOTS Column 1 PIVOTS Column 2 Lower Triangular Matrix L
LU Decomposition = This is the original matrix!!!!!!!!!!
LU Decomposition [ L ]{ y }{ b } [ A ]{ x }{ b }
LU Decomposition Lyb
Modified RHS { b }
LU Decomposition Ax=b A=LU -LU Decomposition Ly=b- Solve for y Ux=y- Solve for x
Matrix Inversion
[A][A] -1 [A] [A] -1 =[I] If [A] -1 does not exist [A] is singular
Matrix Inversion
Solution
Matrix Inversion [A] [A] -1 =[I]
Matrix Inversion
To calculate the invert of a nxn matrix solve n times :
Matrix Inversion For example in order to calculate the inverse of:
Matrix Inversion First Column of Inverse is solution of
Matrix Inversion Second Column of Inverse is solution of
Matrix Inversion Third Column of Inverse is solution of:
Use LU Decomposition
Use LU Decomposition – 1 st column Forward SUBSTITUTION
Use LU Decomposition – 1 st column Back SUBSTITUTION
Use LU Decomposition – 2 nd Column Forward SUBSTITUTION
Use LU Decomposition – 2 nd Column Back SUBSTITUTION
Use LU Decomposition – 3 rd Column Forward SUBSTITUTION
Use LU Decomposition – 3 rd Column Back SUBSTITUTION
Result
Test It
Iterative Methods Recall Techniques for Root finding of Single Equations Initial Guess New Estimate Error Calculation Repeat until Convergence
Gauss Seidel
First Iteration: Better Estimate
Gauss Seidel Second Iteration: Better Estimate
Gauss Seidel Iteration Error: Convergence Criterion:
Jacobi Iteration
First Iteration: Better Estimate
Jacobi Iteration Second Iteration: Better Estimate
Jacobi Iteration Iteration Error: