lec19.pdf

# lec19.pdf - MATH 3607 Lecture 19 Tae Eun Kim Monday Tae Eun...

• 24

This preview shows pages 1–7. Sign up to view the full content.

MATH 3607 Lecture 19 Tae Eun Kim Monday, October 16, 2017 Tae Eun Kim (Ohio State) Lecture 19 Monday, October 16, 2017 1 / 24

This preview has intentionally blurred sections. Sign up to view the full version.

Linear algebra in MatLab Some common matrix functions in MatLab includes inv, det, eig , etc. Examples Define a random matrix A = rand(4) and try the following statements: >> Ai = inv(A) % inverse of A >> A * Ai - eye(size(A)) % zero for nonsingular A >> det(A) % determinant of A >> eig(A) % eigenvalue of A Note: Recall that a square matrix A is singular if any one of the following equivalent conditions is met: det( A ) = 0 . Ax = 0 has a nonzero solution. A has a zero eigenvalue. Tae Eun Kim (Ohio State) Lecture 19 Monday, October 16, 2017 2 / 24
Solutions to linear system of equations Consider the system of linear equations represented as a matrix equation A x = b , where A is the coe ffi cient matrix, b is the right-hand sides of the equations, and x is the vector of unknowns. The system either has a unique solution x if A is invertible or nonsingular, in which case x = A 1 b , or has no solution or infinitely many solutions x if A is not invertible or singular. The Backslash operator " \ " In order to solve for x in MatLab , we use the backslash symbol “ \ ”: >> x = A \ b This produces the solution using Gaussian elimination, without explicitly forming the inverse of A . Warning: Even though x = A 1 b analytically, don’t use x = inv(A) * b ! Tae Eun Kim (Ohio State) Lecture 19 Monday, October 16, 2017 3 / 24

This preview has intentionally blurred sections. Sign up to view the full version.

Gaussian elimination Gaussian elimination is an algorithm for solving a system of linear equations that involves a sequence of row operations perfomed on the associated matrix of coe ffi cients. This is also known as the method of row reduction. There are three variations to this method: 1 G.E. without pivoting 2 G.E. with partial pivoting 3 G.E. with full pivoting Tae Eun Kim (Ohio State) Lecture 19 Monday, October 16, 2017 4 / 24
1. Gaussian elimination without pivoting Example: Solve the following system of equations. 2 x 1 + 2 x 2 + x 3 = 6 4 x 1 + 6 x 2 + x 3 = 8 5 x 1 5 x 2 + 3 x 3 = 4 matrix equation ≠≠≠≠≠≠≠≠≠≠æ Q a 2 2 1 4 6 1 5 5 3 R b ¸ ˚˙ ˝ A Q a x 1 x 2 x 3 R b ¸ ˚˙ ˝ x = Q a 6 8 4 R b ¸ ˚˙ ˝ b Step 1: Write the equation in the augmented matrix form and reduce it to an echelon form via row operations. A 2 2 1 6 4 6 1 8 5 5 3 4 B ≠æ A 2 2 1 6 0 10 3 4 0 10 0 . 5 1 B ≠æ A 2 2 1 6 0 10 3 4 0 0 3 . 5 7 B . Step 2: From the reduced augmented matrix, we can solve for x 3 , then x 2 , and then x 1 . This processes is called backward substitution . x = (3 , 1 , 2) T . Tae Eun Kim (Ohio State) Lecture 19 Monday, October 16, 2017 5 / 24

This preview has intentionally blurred sections. Sign up to view the full version.

As shown in the example, a general Gaussian elimination (without pivoting) involves two steps: 1 Row reduction: transform A x = b ≠æ U x = Â b where U = Q c c c a u 11 u 12 · · · u 1 n u 22 u 2 n . . . . . . 0 u nn R d d d b and Â b = Q c c c a Â b 1 Â b 2 .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern