Lecture 6 Matrix Operations and Gaussian Elimination for Solving Linear Systems Shang-Hua Teng.

Slides:



Advertisements
Similar presentations
Linear Algebra Applications in Matlab ME 303. Special Characters and Matlab Functions.
Advertisements

Chapter 4 Systems of Linear Equations; Matrices Section 2 Systems of Linear Equations and Augmented Matrics.
1.5 Elementary Matrices and a Method for Finding
Lecture 7 Intersection of Hyperplanes and Matrix Inverse Shang-Hua Teng.
CISE301_Topic3KFUPM1 SE301: Numerical Methods Topic 3: Solution of Systems of Linear Equations Lectures 12-17: KFUPM Read Chapter 9 of the textbook.
Lecture 9: Introduction to Matrix Inversion Gaussian Elimination Sections 2.4, 2.5, 2.6 Sections 2.2.3, 2.3.
Matrices & Systems of Linear Equations
Solving Systems of Linear Equations Part Pivot a Matrix 2. Gaussian Elimination Method 3. Infinitely Many Solutions 4. Inconsistent System 5. Geometric.
Lecture 6 Intersection of Hyperplanes and Matrix Inverse Shang-Hua Teng.
Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 86 Chapter 2 Matrices.
Matrices. Special Matrices Matrix Addition and Subtraction Example.
CS232.
Chapter 2 Matrices Definition of a matrix.
Ch 7.2: Review of Matrices For theoretical and computation reasons, we review results of matrix theory in this section and the next. A matrix A is an m.
Lecture 7 Hyper-planes, Matrices, and Linear Systems Shang-Hua Teng.
Math for CSLecture 21 Solution of Linear Systems of Equations Consistency Rank Geometric Interpretation Gaussian Elimination Lecture 2. Contents.
Mujahed AlDhaifallah (Term 342) Read Chapter 9 of the textbook
10.1 Gaussian Elimination Method
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
1 Operations with Matrice 2 Properties of Matrix Operations
Elementary Linear Algebra Howard Anton Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 1.
5  Systems of Linear Equations: ✦ An Introduction ✦ Unique Solutions ✦ Underdetermined and Overdetermined Systems  Matrices  Multiplication of Matrices.
Linear Algebra - Chapter 1 [YR2005]
Elementary Linear Algebra Howard Anton Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 1.
Compiled By Raj G. Tiwari
ECON 1150 Matrix Operations Special Matrices
 Row and Reduced Row Echelon  Elementary Matrices.
Square n-by-n Matrix.
Matrices King Saud University. If m and n are positive integers, then an m  n matrix is a rectangular array in which each entry a ij of the matrix is.
MA2213 Lecture 5 Linear Equations (Direct Solvers)
Systems of Linear Equation and Matrices
Matrix Algebra. Quick Review Quick Review Solutions.
Chap. 2 Matrices 2.1 Operations with Matrices
8.1 Matrices and Systems of Equations. Let’s do another one: we’ll keep this one Now we’ll use the 2 equations we have with y and z to eliminate the y’s.
Chapter 7 Notes Honors Pre-Calculus. 7.1/7.2 Solving Systems Methods to solve: EXAMPLES: Possible intersections: 1 point, 2 points, none Elimination,
CHAPTER 2 MATRIX. CHAPTER OUTLINE 2.1 Introduction 2.2 Types of Matrices 2.3 Determinants 2.4 The Inverse of a Square Matrix 2.5 Types of Solutions to.
ENM 503 Block 2 Lesson 7 – Matrix Methods
Matrices CHAPTER 8.1 ~ 8.8. Ch _2 Contents  8.1 Matrix Algebra 8.1 Matrix Algebra  8.2 Systems of Linear Algebra Equations 8.2 Systems of Linear.
Unit 3: Matrices.
Linear Algebra 1.Basic concepts 2.Matrix operations.
Lecture 8 Matrix Inverse and LU Decomposition
4.1: Matrix Operations Objectives: Students will be able to: Add, subtract, and multiply a matrix by a scalar Solve Matrix Equations Use matrices to organize.
Chapter 6 Systems of Linear Equations and Matrices Sections 6.3 – 6.5.
Copyright © Cengage Learning. All rights reserved. 7 Linear Systems and Matrices.
Copyright © 2011 Pearson Education, Inc. Solving Linear Systems Using Matrices Section 6.1 Matrices and Determinants.
Matrices and Systems of Equations
Matrices and Systems of Equations
Matrices and Determinants
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
2.5 – Determinants and Multiplicative Inverses of Matrices.
Unit 3: Matrices. Matrix: A rectangular arrangement of data into rows and columns, identified by capital letters. Matrix Dimensions: Number of rows, m,
2 - 1 Chapter 2A Matrices 2A.1 Definition, and Operations of Matrices: 1 Sums and Scalar Products; 2 Matrix Multiplication 2A.2 Properties of Matrix Operations;
Linear Algebra Engineering Mathematics-I. Linear Systems in Two Unknowns Engineering Mathematics-I.
MATRICES. Introduction Matrix algebra has several uses in economics as well as other fields of study. One important application of Matrices is that it.
Matrices, Vectors, Determinants.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
1 Numerical Methods Solution of Systems of Linear Equations.
Matrices Introduction.
Gaussian Elimination and Gauss-Jordan Elimination
Lecture 2 Matrices Lat Time - Course Overview
5 Systems of Linear Equations and Matrices
Linear independence and matrix rank
Chapter 8: Lesson 8.1 Matrices & Systems of Equations
7.3 Matrices.
CSE 541 – Numerical Methods
6 Systems of Linear Equations and Matrices
Matrix Algebra.
Multiplication of Matrices
Lecture 8 Matrix Inverse and LU Decomposition
Matrices are identified by their size.
Presentation transcript:

Lecture 6 Matrix Operations and Gaussian Elimination for Solving Linear Systems Shang-Hua Teng

Matrix (Uniform Representation for Any Dimension) An m by n matrix is a rectangular table of mn numbers

Matrix (Uniform Representation for Any Dimension) Can be viewed as m row vectors in n dimensions

Matrix (Uniform Representation for Any Dimension) Or can be viewed as n column vectors in m dimensions

Squared Matrix An n by n matrix is a squared table of n 2 numbers

Some Special Squared Matrices All zeros matrix Identity matrix

Matrix Operations Addition Scalar multiplication Multiplication

1. Matrix Addition: Matrices have to have the same dimensions What is the complexity?

2. Scalar Multiplication: What is the complexity?

3. Matrix Multiplication Two matrices have to be conformal What is the complexity?

Matrix Multiplication Two matrices have to be conformal

The Laws of Matrix Operations A + B = B + A (commutative) c(A+B) = cA + c+B (distributive) A + (B + C) = (A + B) + C (associative) C(A+B) = CA + CB (distributive from left) (A+B)C = AC+BC (distributive from right) A(BC) = (AB)C (associative) But in general:

Counter Example

Special Matrices Identity matrix I –IA = AI = A Square Matrix A

Elimination: Method for Solving Linear Systems Linear Systems == System of Linear Equations Elimination: –Multiply the LHS and RHS of an equation by a nonzero constant results the same equations –Adding the LHSs and RHSs of two equations does not change the solution

Elimination in 2D Multiply the first equation by 3 and subtracts from the second equation (to eliminate x) The two systems have the same solution The second system is easy to solve

Geometry of Elimination (3,1) 8y = 8 Reduce to a 1-dimensional problem.

Upper Triangular Systems and Back Substitution Back substitution –From the second equation y = 1 –Substitute the value of y to the first equation to obtain x-2=1 –Solve it we have: x = 3 So the solution is (3,1)

How Much to Multiply before Subtracting Pivot: first nonzero in the row that does the elimination Multiplier: (entry to eliminate) divided by (pivot) Multiply: = 3/1

How Much to Multiply before Subtracting Pivot: first nonzero in the row that does the elimination Multiplier: (entry to eliminate) divided by (pivot) Multiply: = 3/2 The pivots are on the diagonal of the triangle after the elimination

Breakdown of Elimination What is the pivot is zero == one can’t divide by zero!!!! Eliminate x: No Solution!!!!: this system has no second pivot

Geometric Intuition (Row Pictures) Two parallel lines never intersect (3,1) 8y = 8

Geometric Intuition (Column Picture) Two column vectors are co-linear!!!!

Geometric Intuition Geometric degeneracy cause failure in elimination!

Failure in Elimination May Indicate Infinitely Many Solutions y is free, can be number! Geometric Intuition (row picture): The two line are the same Geometric Intuition (column picture): all three column vectors are co-linear

Failure in Elimination (Temporary and can be Fixed) First pivot position contains zero Exchange with the second equation Can be solved by backward substitution!

Singular Systems versus Non-Singular Systems A singular system has no solution or infinitely many solution –Row Picture: two line are parallel or the same –Column Picture: Two column vectors are co- linear A non-singular system has a unique solution –Row Picture: two non-parallel lines –Column Picture: two non-colinear column vectors

Gaussian Elimination in 3D Using the first pivot to eliminate x from the next two equations

Gaussian Elimination in 3D Using the second pivot to eliminate y from the third equation

Gaussian Elimination in 3D Using the second pivot to eliminate y from the third equation

Now We Have a Triangular System From the last equation, we have

Backward Substitution And substitute z to the first two equations

Backward Substitution We can solve y

Backward Substitution Substitute to the first equation

Backward Substitution We can solve the first equation

Backward Substitution We can solve the first equation

Generalization How to generalize to higher dimensions? What is the complexity of the algorithm? Answer: Express Elimination with Matrices

Step 1 Build Augmented Matrix Ax = b [A b]

Pivot 1: The elimination of column 1

Pivot 2: The elimination of column 2 Upper triangular matrix

Backward Substitution 1: from the last column to the first Upper triangular matrix

Expressing Elimination by Matrix Multiplication

Elementary or Elimination Matrix The elementary or elimination matrix That subtracts a multiple l of row j from row i can be obtained from the identity entry by adding (-l) in the i,j position

Elementary or Elimination Matrix

Pivot 1: The elimination of column 1 Elimination matrix

The Product of Elimination Matrices