Math Lecture 27 : Calculating Determinants

Similar documents
Math Lecture 26 : The Properties of Determinants

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

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

. =. 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

MH1200 Final 2014/2015

Components and change of basis

Dylan Zwick. Fall Ax=b. EAx=Eb. UxrrrEb

Chapter 2. Square matrices

Math/CS 466/666: Homework Solutions for Chapter 3

Determinants. Chia-Ping Chen. Linear Algebra. Professor Department of Computer Science and Engineering National Sun Yat-sen University 1/40

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

Determinants of 2 2 Matrices

Numerical Linear Algebra

Determinants. Recall that the 2 2 matrix a b c d. is invertible if

Determinants: Uniqueness and more

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

sum of squared error.

Inverses and Determinants

Evaluating Determinants by Row Reduction

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

Math 240 Calculus III

Determinants Chapter 3 of Lay

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

7.3. Determinants. Introduction. Prerequisites. Learning Outcomes

Formula for the inverse matrix. Cramer s rule. Review: 3 3 determinants can be computed expanding by any row or column

Determinants - Uniqueness and Properties

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Determinants: summary of main results

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

14: Hunting the Nullspace. Lecture

Linear Algebra Linear Algebra : Matrix decompositions Monday, February 11th Math 365 Week #4

1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i )

ENGR-1100 Introduction to Engineering Analysis. Lecture 21

Linear Equations and Matrix

y b where U. matrix inverse A 1 ( L. 1 U 1. L 1 U 13 U 23 U 33 U 13 2 U 12 1

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

Linear Algebraic Equations

MTH 464: Computational Linear Algebra

Math Computation Test 1 September 26 th, 2016 Debate: Computation vs. Theory Whatever wins, it ll be Huuuge!

Math Linear Algebra Final Exam Review Sheet

MATH 110: LINEAR ALGEBRA PRACTICE MIDTERM #2

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

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Conceptual Questions for Review

1 Last time: determinants

MATH2210 Notebook 2 Spring 2018

Math 520 Exam 2 Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

6: Introduction to Elimination. Lecture

Lecture Notes in Linear Algebra

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

22m:033 Notes: 3.1 Introduction to Determinants

Math Nullspace

Review. Example 1. Elementary matrices in action: (a) a b c. d e f = g h i. d e f = a b c. a b c. (b) d e f. d e f.

MATH10212 Linear Algebra B Homework 7

18.06SC Final Exam Solutions

Linear Algebra. Solving Linear Systems. Copyright 2005, W.R. Winfrey

LECTURE 4: DETERMINANT (CHAPTER 2 IN THE BOOK)

Chapter 4. Determinants

Math 502 Fall 2005 Solutions to Homework 3

Gaussian Elimination and Back Substitution

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Linear Algebra and Vector Analysis MATH 1120

Homework Set #8 Solutions

CS412: Lecture #17. Mridul Aanjaneya. March 19, 2015

Math Lecture 3 Notes

1 Last time: linear systems and row operations

9 Appendix. Determinants and Cramer s formula

Matrix Operations: Determinant

Matrix decompositions

Roundoff Analysis of Gaussian Elimination

Lecture 8: Determinants I

Determinant of a Matrix

MATH Topics in Applied Mathematics Lecture 12: Evaluation of determinants. Cross product.

1300 Linear Algebra and Vector Geometry

Maths for Signals and Systems Linear Algebra for Engineering Applications

Properties of the Determinant Function

Lectures on Linear Algebra for IT

Linear Algebra Math 221

MATH 310, REVIEW SHEET 2

Solution of Linear Equations

II. Determinant Functions

Graphics (INFOGR), , Block IV, lecture 8 Deb Panja. Today: Matrices. Welcome

Topic 15 Notes Jeremy Orloff

ANSWERS. E k E 2 E 1 A = B

Linear Algebra Primer

Introduction to Mathematical Programming

DETERMINANTS. , x 2 = a 11b 2 a 21 b 1

HOMEWORK 9 solutions

Math 3108: Linear Algebra

Determinants. Samy Tindel. Purdue University. Differential equations and linear algebra - MA 262

Graduate Mathematical Economics Lecture 1

Numerical Linear Algebra

Announcements Wednesday, October 25

Introduction to Parallel Programming in OpenMP Dr. Yogish Sabharwal Department of Computer Science & Engineering Indian Institute of Technology, Delhi

Lecture 12 (Tue, Mar 5) Gaussian elimination and LU factorization (II)

Matrix decompositions

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

Matrix Calculations: Determinants and Basis Transformation

Determinants. Beifang Chen

Linear Systems and Matrices

Transcription:

Math 2270 - Lecture 27 : Calculating Determinants Dylan Zwick Fall 202 This lecture covers section 5.2 from the textbook. In the last lecture we stated and discovered a number of properties about determinants. However, we didn t talk much about how to calculate them. In fact, the only general formula was the nasty formula mentioned at the beginning, namely det(a) = σ S n sgn(σ) n a iσ(i). i= We also learned a formula for calculating the determinant in a very special case. Namely, if we have a triangular matrix, the determinant is just the product of the diagonals. Today, we re going to discuss how that special triangular case can be used to calculate determinants in a very efficient manner, and we ll derive the nasty formula. We ll also go over one other way of calculating a determinnat, the cofactor expansion, that, to be honest, is not all that useful computationally, but can be very useful when you need to prove things. The assigned problems for this section are: Section 5.2 -, 3,, 5, 6

Calculating the Determinant from the Pivots In practice, the easiest way to calculate the determinant of a general matrix is to use elimination to get an upper-triangular matrix with the same determinant, and then just calculate the determinant of the upper-triangular matrix by taking the product of the diagonal terms, a.k.a. the pivots. If there are no row exchanges required for the LU decomposition of A, then A = LU, and det(a) = det(l)det(u). Both L and U are triangular, and all the terms on the diagonal of L are, so det(l) =. The terms on the diagonal of U, d, d 2,..., d n, are the pivots, and det(u) = d d 2 d n. So, det(a) = d d n. If a permutation is necessary then we have PA = LU, and det(p) = ±. So, in general, det(a) = ±d d n where the sign is determined by the permutation matrix P. Example - Use elimination to calculate the determinant of the matrix A = 2 4 2 4 9 3 2 3 7 Now, if no permutation is involved, so A = LU, then the first k pivots are completely determined by the upper left k k submatrix of the matrix A. If we denote the upper left k k submatrix of A by A k then we have 2

det(a k ) = d d k and the kth pivot is d k = det(a k) det(a k ). So, we can use pivots to calculate determinants, but we can also (assuming we don t need row exchanges) use determinants to calculate pivots! 2 The Big Honkin Formula Alright, it s been coming for a while now. The formal definition of the determinant is det(a) = σ S n sgn(σ) n a iσ(i). i= How do we get this? Well, let s start with the 2 2 case. We can use linearity twice to get: a b c d = a 0 c d + 0 b c d = a 0 c 0 + a 0 0 d + 0 b c 0 + 0 b 0 d In the final sum, the first and last matrices have columns with all 0s, and so those determinants are 0. Therefore, the determinant is a 0 0 d + 0 b c 0 = ad 0 0 + bc 0 0 = ad bc. 3

Now, we know 0 0 = as its formed by switching (transposing) columns and 2 of the identity matrix. So, by properties and 2 of the determinant, its value must be. Now, we can do essentially the same thing for a square matrix of any size. In the n = 3 case we split it up into 3 3 = 27 matrices where for each matrix in the split each row has only one non-zero term. If a column choice is repeated, the the matrix has determinant 0. So, the only ones that matter are when the nonero terms come from different columns. For the 3 3 case there are six such terms: a a 2 a 3 a 2 a 22 a 23 a 3 a 32 a 33 + = a a 22 a a 23 + a 32 + a 2 a 23 a 3 + a 2 a 32 a 2 a 2 a 33 + a 3 a 22 a 3 a 33 Using linearity we can write this as a 3 det(a) = a a 22 a 33 +a a 23 a 32 + a 2a 23 a 3 + a 2a 2 a 33 + a 3a 2 a 32 + a 3a 22 a 3 Each of the matrices above is a permutation matrix. The first is the identity. The second and third we can get from the identity with two row switches (for the second matrix the row switches are rows and 3, then rows and 2), and the fourth, fifth, and sixth we can get from the identity with one row switch. So, the determinants of the first three are +, and the determinants of the last three are. Therefore, the determinant formula for a 3 3 matrix is: a a 22 a 33 + a 2 a 23 a 3 + a 3 a 2 a 32 a a 23 a 32 a 2 a 2 a 33 a 3 a 22 a 3. 4

Now, the sign of a permutation σ is the parity of the number of transpositions required to get it from the identity. It is either even of odd. We say sgn(σ) = ± depending on if it requires an even or odd number of tranpositions to get it from the identity. The sign of the first three permutation matrices above are all +, as they require an even number of tranpositions (0, 2, and 2), while the sign of the last three permutation matrices are all, as they require an odd number of transpositions (,, and ). If P is a permutation matrix coming from the permutation σ, then det(p) = sgn(σ), and from this we get our big formula: det(a) = σ S n sgn(σ) n a iσ(i). Note that there are n! permutations in S n, and so as n gets larger this formula gets very big very fast. Example - Use the big formula to calculate the determinant of the matrix A = i= 2 4 2 4 9 3 2 3 7 5

3 Determinants by Cofactors Finally, we note that if we do some algebra to the formula derived above for the 3 3 determinant we get: det(a) = a (a 22 a 33 a 23 a 32 ) a 2 (a 23 a 3 a 2 a 33 ) + a 3 (a 2 a 32 a 22 a 3 ). The terms in parentheses are the determinants a 22 a 23 a 32 a 33, a 2 a 23 a 3 a 33, a 2 a 22 a 3 a 32 respectively. The matrices are the matrices we get from A if we eliminate column and row, column 2 and row, and column 3 and row, respectively. For a matrix A, we denote by M ij the submatrix acquired by eliminating row i and column j. We define the cofactor C ij = ( ) i+j det(m ij ). So, in the 3 3 case above, we have det(a) = a C + a 2 C 2 + a 3 C 3. A. And, in fact, this formula holds for any row and for any n n matrix det(a) = a i C i + a i2 C i2 + + a in C in. We can also use the formula moving down a column instead of along a row det(a) = a j C j + a 2j C 2j + + a nj C nj. 6

Example - For the matrix A = 2 4 2 4 9 3 2 3 7 calculate the determinant using a cofactor expansion along the first row, and then do it again with a cofactor expansion along the second column. 7