L3-1: Determinants: The Good, the Bad and the Ugly 12 Nov 2012

Similar documents
Lemma 8: Suppose the N by N matrix A has the following block upper triangular form:

Lecture 8: Determinants I

MATRICES AND MATRIX OPERATIONS

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

Math 320, spring 2011 before the first midterm

Lecture 10: Determinants and Cramer s Rule

SCHOOL OF BUSINESS, ECONOMICS AND MANAGEMENT BUSINESS MATHEMATICS / MATHEMATICAL ANALYSIS

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

Cofactors and Laplace s expansion theorem

A Review of Matrix Analysis

1300 Linear Algebra and Vector Geometry

L2-7 Some very stylish matrix decompositions for solving Ax = b 10 Oct 2015

Announcements Wednesday, October 25

c c c c c c c c c c a 3x3 matrix C= has a determinant determined by

Introduction to Determinants

ECON 186 Class Notes: Linear Algebra

Fundamentals of Engineering Analysis (650163)

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

Topic 15 Notes Jeremy Orloff

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Review for Exam Find all a for which the following linear system has no solutions, one solution, and infinitely many solutions.

22A-2 SUMMER 2014 LECTURE 5

Methods for Solving Linear Systems Part 2

Matrices MA1S1. Tristan McLoughlin. November 9, Anton & Rorres: Ch

LA lecture 4: linear eq. systems, (inverses,) determinants

CHAPTER 8: Matrices and Determinants

Math 313 Chapter 1 Review

MATH2210 Notebook 2 Spring 2018

APPENDIX: MATHEMATICAL INDUCTION AND OTHER FORMS OF PROOF

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

Chapter 3. Determinants and Eigenvalues

Lesson 3. Inverse of Matrices by Determinants and Gauss-Jordan Method

1111: Linear Algebra I

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

Matrices. Chapter Definitions and Notations

5.3 Determinants and Cramer s Rule

LINEAR SYSTEMS, MATRICES, AND VECTORS

Linear Algebra, Summer 2011, pt. 2

MATH 341 MIDTERM 2. (a) [5 pts] Demonstrate that A and B are row equivalent by providing a sequence of row operations leading from A to B.

ENGR-1100 Introduction to Engineering Analysis. Lecture 21

ANSWERS. Answer: Perform combo(3,2,-1) on I then combo(1,3,-4) on the result. The elimination matrix is

Math 308 Midterm Answers and Comments July 18, Part A. Short answer questions

Matrices and Determinants

M. Matrices and Linear Algebra

Phys 201. Matrices and Determinants

Inverses and Determinants

Chapter 5. Matrices. 5.1 Basic matrix notation. This material is in Chapter 1 of Anton & Rorres.

Getting Started with Communications Engineering. Rows first, columns second. Remember that. R then C. 1

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

Introduction to Matrices and Linear Systems Ch. 3

SAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 1 Introduction to Linear Algebra

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

Elementary maths for GMT

Determinants - Uniqueness and Properties

SAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 1 Introduction to Linear Algebra

Notes on Determinants and Matrix Inverse

Determinants Chapter 3 of Lay

Roberto s Notes on Linear Algebra Chapter 4: Matrix Algebra Section 7. Inverse matrices

Differential Equations

Linear Algebra and Matrix Inversion

Chapter 2: Matrices and Linear Systems

ANSWERS (5 points) Let A be a 2 2 matrix such that A =. Compute A. 2

Things we can already do with matrices. Unit II - Matrix arithmetic. Defining the matrix product. Things that fail in matrix arithmetic

Chapter 4. Solving Systems of Equations. Chapter 4

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

L1-5. Reducing Rows 11 Aug 2014

Linear Systems and Matrices

MATH 2030: EIGENVALUES AND EIGENVECTORS

ENGR-1100 Introduction to Engineering Analysis. Lecture 21. Lecture outline

Linear Algebra: Lecture notes from Kolman and Hill 9th edition.

7.6 The Inverse of a Square Matrix

Roberto s Notes on Linear Algebra Chapter 9: Orthogonality Section 2. Orthogonal matrices

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

Linear Algebra for Beginners Open Doors to Great Careers. Richard Han

ANSWERS. E k E 2 E 1 A = B

A 2. =... = c c N. 's arise from the three types of elementary row operations. If rref A = I its determinant is 1, and A = c 1

1 GSW Sets of Systems

8-15. Stop by or call (630)

Determinants of 2 2 Matrices

Math 103, Summer 2006 Determinants July 25, 2006 DETERMINANTS. 1. Some Motivation

Matrix Operations and Equations

II. Determinant Functions

Matrix & Linear Algebra

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

CMU CS 462/662 (INTRO TO COMPUTER GRAPHICS) HOMEWORK 0.0 MATH REVIEW/PREVIEW LINEAR ALGEBRA

ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3

Matrix inversion and linear equations

1 Matrices and Systems of Linear Equations. a 1n a 2n

n n matrices The system of m linear equations in n variables x 1, x 2,..., x n can be written as a matrix equation by Ax = b, or in full

Numerical Methods Lecture 2 Simultaneous Equations

Chapter 2:Determinants. Section 2.1: Determinants by cofactor expansion

Lecture Notes in Linear Algebra

7.2 Matrix Algebra. DEFINITION Matrix. D 21 a 22 Á a 2n. EXAMPLE 1 Determining the Order of a Matrix d. (b) The matrix D T has order 4 * 2.

. =. a i1 x 1 + a i2 x 2 + a in x n = b i. a 11 a 12 a 1n a 21 a 22 a 1n. i1 a i2 a in

Numerical Methods Lecture 2 Simultaneous Equations

6.4 Determinants and Cramer s Rule

EXAM 2 REVIEW DAVID SEAL

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Determinants and Scalar Multiplication

A Brief Outline of Math 355

Transcription:

L3-1: Determinants: The Good, the Bad and the Ugly 12 Nov 2012 Man with no name: Tut, tut. Such ingratitude after all the times I saved your life. Il Buono, il bruto, il cattivo (1966) See Hefferon, Chapter 4, p. 293-302. Movie trivia question #1: This film is the third and final in the Spaghetti Western Dollars Trilogy. The Man with No Name character derives from a samurai movie made only a few years earlier. What is the single most striking difference in fighting style between the samurai protagonist and the Man with No Name? And what is the MwNN s reference to a perfect number? This is for squares only: The erminant of an nxn matrix is indicated by either the symbol A or A, which is not to be confused with A -- the norm of A. Strange people also use the shorthand symbol to indicate a erminant of a given matrix. In simplest terms, the erminant is a function of the elements of an nxn matrix that yields a single number (a scalar) that, well, ermines something about the matrix: The inverse A -1 exists for matrix A if and only if A is nonzero. (In case you don t recall if and only if (iff), it means we are on a logical twoway street: IF A is nonzero, A -1 exists and if A -1 exists, A is nonzero). So if the matrix represents a set of linear equations, the erminant ermines whether the system has a unique solution. The erminant is older than mathematical dirt: first seen in the Suan shu shu, a 3 rd century BC Chinese math textbook long before the concept of a matrix was introduced. Of course, it was our old friend Gauss who first introduced the word erminant. The erminant of a matrix can be a verrry useful number if it wasn t so difficult to calculate. How we ermine the erminants A bit of slogging through the mathematical mud lies ahead. Stay with it. For the 2x2 case, the erminant is the familiar multiplication along crossed diagonals:

a a 11 12 A A A a11a22 a12a21 a21 a22 Example: 1 2 4 6 2 3 4 1 3 4 6 2 2 4 Sooo, maybe A = A T? Note: for a 2x2 matrix, the erminant formula has 2 terms, each with 2 factors. For the 3x3 case, the erminant calculation is similar, albeit considerably uglier: a11 a12 a13 A a a a A A a a a a a a a a a a31 a32 a 33 a a a a a a a a a 21 22 23 11 22 33 12 23 31 13 21 32 11 23 32 12 21 33 13 22 31 which is something you can memorize, but not by choice. Stare at it long enough and you can maybe see the pattern (or maybe the colors help): de a a a a a a 22 23 21 23 21 22 t A a11 a12 a13 a32 a33 a31 a3 3 a31 a32 Thus: The erminant of a 3x3 matrix if found by taking each entry from the first row of the original matrix and multiplying it by the erminant of a 2x2 sub-matrix. The 2x2 subs are each constructed by removing a row and a column from the original matrix, corresponding to the row, column of first row entry. Then there is that flippity-floppity minus sign. Note: 3x3 matrix, erminant formula has 6 terms, each with 3 factors. Neat trick for 3x3 s, known as Sarrus Rule: Write an augmented matrix consisting of A and the first two columns of A (yielding a 3x5). Now you can use the crossed diagonal products to find the erminant. 2

a a a a a a a a A a a a A a a 11 12 13 11 12 13 11 12 21 22 23 aug 21 a22 a23 a 22 23 a31 a32 a 33 a31 a3 2 a33 a32 a 33 Multiply along the down-to-the-right diagonals: A = a 11 a 22 a 33 + a 12 a 23 a 32 + a 13 a 22 a 33 but wait, there s more: Multiply along the down-to-the-left diagonals: a11 a12 a13 a11 a12 a13 a11 a12 A a a a A a a a a a 21 22 23 aug 21 22 23 22 23 a31 a32 a 33 a 31 a32 a33 a32 a 33 Since we are going to the left, these terms are all negative: A = a 11 a 22 a 33 + a 12 a 23 a 32 + a 23 a 22 a 33 a 13 a 22 a 31 a 11 a 23 a 32 a 12 a 22 a 33 Here is a picture of Sarrus rule in action: Solid lines + Dashed lines - That was fun, but this rule doesn t work for anything larger than 3x3. We need a formula that can generalize to any size square and one that is not a nightmare to evaluate! Yeah, there is a formula for the of a 4x4 matrix, but it has 24 terms, each with 4 factors: So what seems to be the manner in which the number of terms increases with the order of the matrix? And why is this verrry bad news for computation of erminants of large matrices? We hunt for the elusive gold -- err, a general formula for erminants: Movie trivia question #2: What is the name on the grave said to contain the missing $200,000 in gold in the movie that gives this lab its name? 3

Define: The minor of a matrix is a portion of the matrix with a specific row and column removed. The notation for the i,j th minor of A, where row i and column j are removed, is A ij. Example: a a a A a a A 11 12 13 21 23 21 a22 23 12 a31 a33 a31 a32 a 33 a a The red entries in the original matrix (first row and second column) are deleted to form the minor A 12. Another way to write the 3x3 erminant is in terms of the minors: A a A A. 11 11 a12 12 a13 A13 This is a formula that generalizes to the nxn case: n 1 j A ( 1) a1j A1j j1 Welcome to the minor leagues (where there is no joy in Mudville) The formula for A above is further generalized to the technique known as expansion by minors or cofactor expansion. Choose any row (say row i) and form the same type of sum as above. n n i j ij ij ij ij j1 j1 i j Aij, A ( 1) a A a C where Cij ( 1) is known as the ij th cofactor of A. The cofactor is a erminant of the minor with the alternating sign (-1) i+j. The erminant may be calculated using cofactor expansion along any one row or column. Hint: pick one that has lots of 0s! Example Find 3 0 4 2 3 2 0 5 1 Use a cofactor expansion across the first row. 4

3 2 2 3 3 0 4 3( 13) 4(10) 1 5 1 0 5 Note the signs were ermined by (-1) 2, (-1) 3, (-1) 4. Before you celebrate finally having a formula that doesn t look too ugly, realize that this means the following: In order to calculate a erminant of a big nxn matrix, you have to calculate a lot of erminants of slightly smaller n-1 x n-1 matrices. Over and over again. Yippee! That may not or may not be ugly, but it is definitely not good. When we deal with very large matrices, this is on the order of n! flops (multiplications and additions) and that is most certainly bad! In case you wondered how this lab got its name. Find the erminant of the given matrix. 2 4 3 a. 3 1 2 1 4 1 Ans a. -5 b. 4 b. 4 3 0 6 5 2 9 7 3 c. 0 1 0 1 0 0 0 0 1 Properties of the erminant -- Important and useful The erminant of any identity matrix is 1. Product rule: AB A B -- actually a distributive property of the erminant operation with respect to matrix multiplication Constant multiplier: (ka) = k n A, for nxn matrix A and scalar k. Transpose: A = A T (yep, it was true when we stumbled across it above) Inverse: A = 1 / (A -1 ) ( A)( A -1 ) = AA -1 = I =1 -- also a result of the distributive property If a matrix has two equal rows (and is thus singular), its erminant is 0. 5

If a matrix has a row of all 0 s (and is thus singular), its erminant is 0. Do you think that generalizes (ie, singular matrices always have =0)? Question: what is the erminant of a matrix where two rows are scalar multiples? a b Suppose A What is A? Is this also true for columns that are scalar ca cb multiples? And here is what will get us out of the minors and into the bigs: The erminant of any triangular matrix is the product of the entries on the main diagonal. We love triangular matrices! So it is logical to ask: What do the row ops do to the erminant? Multiplying a row by a scalar results in multiplying the by the same scalar. Swapping any two rows yields the negative of the of the original matrix. Forming a linear combination of two rows does not change the erminant. Examples 1 3 A A6 5 9 3 9 scalar mult of a single row (3R 1( A) R 1): 18 3 A 5 9 5 9 row swap changes sign: B B6 A 1 3 5 9 linear combination, no change: C ( from B, R1R2 R2) C 6 B 6 12 This leads to a very good idea (at last!) for finding a erminant: Row reduce the square matrix A to upper triangular form via Gauss-Jordan elimination, keeping track of the row ops. Multiply the diagonal elements of the resulting triangular (we love em!) matrix. 6

Apply the above rules for sign changes based on scalar multiples and row swaps, if any, and you ve got your erminant. Example Reducing 2 1 1 3 2 1 1 3 1 2 3 0 0 5/2 7/2 3/2, 3 1 2 1 0 0 14 / 5 26 / 5 0 2 3 1 0 0 0 18/7 requires only linear combinations of rows, so that the erminant is unchanged. The product of the diagonal entries of this upper triangular matrix is the erminant of the original matrix: -36 Practice a a. Find the erminant of A c erminant. b d. Then do a single row swap and recalculate the 3 k 4 b. Find the erminant of 2 3 k will this matrix be singular? for a nonzero constant k. For what value of k 1 1 3 0 0 1 5 4 c. Find the erminant using row reduction. 1 2 8 5 3 1 2 3 2 0 0 8 1 7 5 0 d. Use the erminant to ermine (ha!) whether 3 8 6 0 0 7 5 4 is invertible. Ans a. ad bc and cb da b. k = +/- 1 d. not invertible 7

Cramer s Rule: solving Ax = b with erminants (in a nicer form than you learned in Alg 2) We first need to define a column replacement operation: Let A i (b) represent the replacement of the i th column in matrix A with column vector b. Then if A is nonzero, the matrix equation Ax = b has the unique solution vector x with components: Ai ( b) xi A Named for the Swiss mathematician (and big hair guy) Gabriel Cramer, this rule is historically important, but very inefficient for problems involving large matrices. And you thought all Swiss mathematicians were named Bernoulli! Note: 80s rocker Jon BonJovi was also a big hair guy, but does not have any mathematical formulae to his name. However, his picture is on a stamp (http://stampsearch.com/images/gag99mo2-stars10v.jpg), whilst Cramer has no stamp. What s better, being nominated for an Academy Award or finding a silly formula for erminants? Example a bx1 e a b, with 0 c d x 2 f c d e b a e f d ed bf c f af ce x1, x2 ad bc ad bc Not too bad: 14 flops to solve a 2x2 system. Less if you pre-calculate and store it (and you should do that first to be sure it is not zero). For matrices much bigger than 3x3, this process is ghastly. Cramer s rule can be used to find an inverse (but why would you?) A 1 1 C C C C C A C1n C 11 21 n1 12 n2 nn, where the C ji s are cofactors. 8

Note the reversal of the subscripts, which normally go row, column: The i,j th entry of A -1 is formed from the j,i th cofactor of A. This C ji matrix is sometimes called the adjugate of A. Great, another made up term for another matrix. Phooey on that! Practice 3 0 0 Find the inverse of A 1 1 0 using the erminant. Notice anything 2 3 2 interesting about this matrix and its inverse? Then solve Ax = b for b = 3 2. Ans x = {1, 3, -3}. 1 Answers to movie trivia questions #1: The MwNN carried only a single Colt revolver. The ronin samurai in the film Yojimbo traditionally carried two swords. MWNN: Six is the perfect number. Tuco: I thought three was the perfect number. MWNN: I ve got six bullets in my gun. Answer to movie trivia question #2: Arch Stanton. The gold wasn t actually in that grave. 9