Section Matrices and Systems of Linear Eqns.

Similar documents
Y = ax + b. Numerical Applications Least-squares. Start with Self-test 10-1/459. Linear equation. Error function: E = D 2 = (Y - (ax+b)) 2

MAC Module 1 Systems of Linear Equations and Matrices I

MAC1105-College Algebra. Chapter 5-Systems of Equations & Matrices

Chapter 1 Linear Equations. 1.1 Systems of Linear Equations

Exercise Sketch these lines and find their intersection.

Math 250B Midterm I Information Fall 2018

Simultaneous Linear Equations

Lecture 9: Elementary Matrices

Chapter 4. Solving Systems of Equations. Chapter 4

Section 6.2 Larger Systems of Linear Equations

Gauss-Jordan Row Reduction and Reduced Row Echelon Form

1300 Linear Algebra and Vector Geometry Week 2: Jan , Gauss-Jordan, homogeneous matrices, intro matrix arithmetic

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.

1300 Linear Algebra and Vector Geometry

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

Numerical Methods Lecture 2 Simultaneous Equations

MIDTERM 1 - SOLUTIONS

22A-2 SUMMER 2014 LECTURE 5

Matrix Solutions to Linear Equations

Midterm 1 Review. Written by Victoria Kala SH 6432u Office Hours: R 12:30 1:30 pm Last updated 10/10/2015

Math 313 Chapter 1 Review

4 Elementary matrices, continued

4 Elementary matrices, continued

UNIT 3 INTERSECTIONS OF LINES AND PLANES

Lecture 12: Solving Systems of Linear Equations by Gaussian Elimination

Solving Linear Systems Using Gaussian Elimination

Methods for Solving Linear Systems Part 2

Handout 1 EXAMPLES OF SOLVING SYSTEMS OF LINEAR EQUATIONS

Solving Systems of Linear Equations

Matrices and Determinants

Elementary Linear Algebra

Numerical Linear Algebra

Section Gaussian Elimination

Hani Mehrpouyan, California State University, Bakersfield. Signals and Systems

CHAPTER 8: MATRICES and DETERMINANTS

Linear System Equations

1 - Systems of Linear Equations

Matrices, Row Reduction of Matrices

is a 3 4 matrix. It has 3 rows and 4 columns. The first row is the horizontal row [ ]

Numerical Analysis Fall. Gauss Elimination

MAC Module 3 Determinants. Learning Objectives. Upon completing this module, you should be able to:

Gauss-Jordan elimination ( used in the videos below) stops when the augmented coefficient

Numerical Methods Lecture 2 Simultaneous Equations

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

Elementary matrices, continued. To summarize, we have identified 3 types of row operations and their corresponding

7.6 The Inverse of a Square Matrix

Chapter 6 Page 1 of 10. Lecture Guide. Math College Algebra Chapter 6. to accompany. College Algebra by Julie Miller

Lecture 2 Systems of Linear Equations and Matrices, Continued

Section Gauss Elimination for Systems of Linear Equations

Matrix decompositions

Linear Algebra I Lecture 8

Row Reducing Matrices

System of Linear Equations

Matrices and systems of linear equations

MathQuest: Linear Algebra. 1. Which of the following operations on an augmented matrix could change the solution set of a system?

Chapter Practice Test Name: Period: Date:

Matrix notation. A nm : n m : size of the matrix. m : no of columns, n: no of rows. Row matrix n=1 [b 1, b 2, b 3,. b m ] Column matrix m=1

Chapter 1. Vectors, Matrices, and Linear Spaces

1. (7pts) Find the points of intersection, if any, of the following planes. 3x + 9y + 6z = 3 2x 6y 4z = 2 x + 3y + 2z = 1

CHAPTER 8: Matrices and Determinants

MAC Module 2 Systems of Linear Equations and Matrices II. Learning Objectives. Upon completing this module, you should be able to :

POLI270 - Linear Algebra

Solving Consistent Linear Systems

Linear equations The first case of a linear equation you learn is in one variable, for instance:

Numerical Linear Algebra

2.1 Gaussian Elimination

Elementary Linear Algebra

3 Fields, Elementary Matrices and Calculating Inverses

INVERSE OF A MATRIX [2.2]

Topic 15 Notes Jeremy Orloff

FINAL (CHAPTERS 7-9) MATH 141 SPRING 2018 KUNIYUKI 250 POINTS TOTAL

Introduction to Systems of Equations

9.1 - Systems of Linear Equations: Two Variables

Find the solution set of 2x 3y = 5. Answer: We solve for x = (5 + 3y)/2. Hence the solution space consists of all vectors of the form

Topics. Vectors (column matrices): Vector addition and scalar multiplication The matrix of a linear function y Ax The elements of a matrix A : A ij

Example: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3

Systems of Linear Equations. By: Tri Atmojo Kusmayadi and Mardiyana Mathematics Education Sebelas Maret University

Matrix decompositions

MATH 2030: MATRICES. Example 0.2. Q:Define A 1 =, A. 3 4 A: We wish to find c 1, c 2, and c 3 such that. c 1 + c c

Solving Systems of Linear Equations Using Matrices

Math 1021, Linear Algebra 1. Section: A at 10am, B at 2:30pm

March 19 - Solving Linear Systems

Recall, we solved the system below in a previous section. Here, we learn another method. x + 4y = 14 5x + 3y = 2

MATLAB Project: LU Factorization

Chapter 2 Notes, Linear Algebra 5e Lay

MAT 343 Laboratory 3 The LU factorization

Elimination Method Streamlined

CHAPTER 8: MATRICES and DETERMINANTS

Introduction to Matrices

1. Solve each linear system using Gaussian elimination or Gauss-Jordan reduction. The augmented matrix of this linear system is

MATH 2050 Assignment 8 Fall [10] 1. Find the determinant by reducing to triangular form for the following matrices.

Solutions to Homework 5 - Math 3410

Quiz ) Locate your 1 st order neighbors. 1) Simplify. Name Hometown. Name Hometown. Name Hometown.

EBG # 3 Using Gaussian Elimination (Echelon Form) Gaussian Elimination: 0s below the main diagonal

5x 2 = 10. x 1 + 7(2) = 4. x 1 3x 2 = 4. 3x 1 + 9x 2 = 8

Lecture 22: Section 4.7

Problem Sheet 1 with Solutions GRA 6035 Mathematics

Determinant: 3.3 Properties of Determinants

Matrix Algebra and Inverses

Relationships Between Planes

Transcription:

QUIZ: strings

Section 14.3 Matrices and Systems of Linear Eqns.

Remembering matrices from Ch.2

How to test if 2 matrices are equal Assume equal until proved wrong! else? myflag = logical(1)

How to test if 2 matrices are equal isequal(mata,matb)

What matrix is created here?

What matrix is created here?

Square Matrices

Diagonal of a matrix vs. diagonal matrix

QUIZ

QUIZ: Matrices Write a function that takes a matrix as argument and returns True if the matrix is upper triangular. (Use loops)

Upper and lower triangular

QUIZ: Matrices Write a function that takes a matrix as argument and returns True if the matrix is upper triangular. Vectorize, using triu() and/or tril()

QUIZ

Trace and eye

QUIZ

>> trace(eye(42)) ans =??? >> trace(fliplr(eye(42))) ans =??? >> trace(fliplr(eye(43))) ans =???

To do for next time: Read the notes and pp.473-9 of text Solve Practice 14.3 / p.478

Matrix multiplication Mnemonic: rows times columns Compatibility condition:.

Your turn!

Your turn! What is the output?

Your turn!

Triple for loop!

Extra-credit

eye(?) Identity

Identity eye(3) What if we did not know in advance the size of A?

Identity What is the output?

Identity

Inverse How do we calculate the inverse of a 2x2 matrix with pencil and paper?

Inverse To calculate the inverse of a 2x2 matrix with pencil and paper: The elements on the main diagonal switch places The elements on the antidiagonal change signs Divide by the determinant

QUIZ: Inverse Find the inverse of this matrix with pencil and paper, and check! M = M -1 = 10 2 11 2 To calculate the inverse of a 2x2 matrix with pencil and paper: The elements on the main diagonal switch places The elements on the antidiagonal change signs Divide by the determinant

Dot product See p.59

Cross product See p.59 Verify with pencil and paper!

System of linear equations: m eqns., n unknowns

QUIZ: Write this system in matrix form

QUIZ: Write this system in matrix form

Your turn!

Visualizing the solution

Numerical instability in a nutshell M = 1 1 1 1+ e Calculate the inverse of this matrix M -1 =

To do for next time: Read pp.478-84 Practice 14.4 / 484

QUIZ: Inverse M = 1 2 3 4 To calculate the inverse of a 2x2 matrix with pencil and paper: M -1 = The elements on the main diagonal switch places The elements on the antidiagonal change signs Divide by the determinant

QUIZ: Solving a linear system

Second problem with matrix inverses: complexity! 3x3 4x4 NxN O(N N!)

Calculate N N! for the following values of N: N = 1 N = 2 N = 3 N = 4 N = 5 O(N N!)

Conclusion The matrix inverse is (almost) never computed in real-life numerical applications!

Better idea: Elimination This is what we do with pencil and paper when we multiply an entire eqn. by a constant, and add or subtract one eqn. from another!

Better idea: Elimination Use the augmented matrix, since the free terms must change, too!

Augmenting in MATLAB Write a command to create the augmented matrix.

Augmenting in MATLAB A = Write a command to augment A with a 3-by-3 identity matrix (on the right).

Augmenting in MATLAB

Back to elimination How can we bring the augmented matrix to upper triangular form?

By performing Elementary Row Operations (EROS ) Multiply a row by a non-zero constant Add a row to another Switch two rows We ll use it later, when we learn about pivoting.

Elementary Row Operations

Your turn! Bring this system to upper triangular form using Gaussian elimination: First step: Write it in matrix form!

Your turn! Bring this system to upper triangular form using Gaussian elimination: Next steps: Perform EROs!

Source: http://en.wikipedia.org/wiki/gaussian_elimination

Extra-credit:

What to do once the matrix is in upper-triangular form? Back-substitution

QUIZ:

Your turn: Find the solution to the system using backsubstitution Source: http://en.wikipedia.org/wiki/gaussian_elimination

Extra-credit

Conclusion: Gauss method has complexity O(N 3 ) O(2N 3 /3), to be more precise

QUIZ Solve this system with pencil and paper: Using the inverse Using Gauss method

To do for next time: Read pp.484-8 Practice 14.5 / 486 Exercise 14.34 / 512 only Gaussian elimination

Gauss-Jordan method The elimination continues above he diagonal!

Your turn: Find the solution to the system using Gauss-Jordan method Source: http://en.wikipedia.org/wiki/gaussian_elimination

Gauss-Jordan method What is the Big-Oh complexity?

QUIZ Solve this system two ways using: Gaussian elimination + backsubstitution Gauss-Jordan method

Reduced row-echelon form (and method)

How to find the inverse of a matrix (if we have to)

QUIZ: Find the solution by calculating the inverse. Check.

How to find the inverse of a matrix (if we have to) What is the Big-Oh complexity? How does it compare to O(N N!)?

Homework for Ch.14 27 (use Gaussian elim. + backsub.) 30, 31, 32 35 (use Gauss-Jordan)