670 likes | 1.01k Views
ENGG2012B Lecture 8 Determinant and Cramer’s rule. Kenneth Shum. Last lecture: Invertible matrix. Given an n n matrix A , if we can find a matrix A ’, such that then A is said to be invertible , or non-singular . We can prove that there is at most one such matrix, if exists.
E N D
ENGG2012BLecture 8Determinant and Cramer’s rule Kenneth Shum ENGG2012B
Last lecture: Invertible matrix • Given an nn matrix A, if we can find a matrix A’, such that then A is said to be invertible, or non-singular. • We can prove that there is at most one such matrix, if exists. • The matrix A’ is called the inverse of A. Multiplied byA Multiplied by A’ Multiplied byIn ENGG2012B
Algorithm for computing inverse • Input: an nn matrix A. • Create an n 2n matrix M = [ A | In ] • The left half is A • The right half is the n by n indentity matrix In • Try to reduce the expanded matrix Msuch that the left half is equal to In. • If succeed, the right half of M is the inverse of A. • If you cannot reduce the left half of M to In, then A is not invertible. ENGG2012B
Elementary matrix • Elementary row operations on a matrix A can be realized by multiplying A by a square matrix, called elementary matrix. • Every matrix A can be reduced to RREF by multiplying from the left a number of elementary matrices. • E1, E2, … are elementary matrices. • R is a matrix in RREF. • We can undo any elementary row operation. The reverse operation is also an elementary row operation. • In matrix term, the inverse of an elementary matrix is also an elementary matrix. • F1, F2,… are inverse of E1, E2…, respectively. ENGG2012B
Vector Notation • We will use two different notations for a point in the 3D space (x,y,z) z z y y x x ENGG2012B
Today’s aim • 2x2 and 3x3 determinants • Cramer’s rule • Extension to nxn determinant • Cramer’s rule • Adjoint formula for matrix inverse ENGG2012B
2X2 AND 3X3 DETERMINANT ENGG2012B
Area of parallelogram • The sides are vector (a,b) and (c,d). a c b (c,d) d d (a,b) b c a ENGG2012B
22 determinant as signed area • Definition: Example + – (2,4) Area = 10 Row 1 is the first vector Row 2 is the second vector - bc ad (3,1) ENGG2012B
Notations for 22 determinant Note 1: By viewing a a real number x as a 1x1 matrix, we have det(x) = x . Note 2: For real number x, |x| usually means theabsolute value of x, not the determinant. ENGG2012B
Example Determinant of the 2x2 identity matrix is 1 1 1 ENGG2012B
Example Determinant of a diagonal matrix is the area of a rectangle h w ENGG2012B
Zero column/row zero determinant Zero area ENGG2012B
Linearly dependent columns/rows zero determinant If the two columns (or two rows) are constant multiple of each other, the determinant is zero. Zero area ENGG2012B
Geometric meaning of 3x3 determinant • The magnitude of 33 determinant is the volume of a parallelepiped. z y x ENGG2012B
33 determinant Notation for 33 determinant : Definition: ENGG2012B
Definition of 3x3 determinant – – + + + – ENGG2012B
Determinant of Diagonal matrix • Volume of a rectangular box c b a ENGG2012B
Co-planar zero determinant • Determinant = 0 Volume = 0 the three vectors lie on the same plane z y A collection of vectorsare said to be co-planarif they lie on the same plane. x ENGG2012B
Application to computing inverse of 2x2 matrix • Given 22 matrix • A formula for A-1: If det A is nonzero, we have • Exchange the two diagonal entries a, d. • Take the negative of the two off-diagonal entries b, c. • Divide by the determinant. ENGG2012B
Solving system of equations by matrix inverse • Want to solve a system of linear equation in matrix form A x= b. • If the inverse of A exists, we can multiply both sides of A x= b by the inverse of A, and get Start with A x= b Multiply by A-1 from the left Matrix product is associative The defining property of inverse I times anything is the same thing ENGG2012B
Example • Solve • If we know the inverse of the 2x2 matrix, we can solve the linear system easily. ENGG2012B
PROPERTIES OF 2X2 AND 3X3 DETERMINANT ENGG2012B
Transpose matrix has the same determinant “The transpose of a matrix” means reflecting the matrixalong the diagonal. Row 1 and row 2 becomecolumn 1 and column 2, andvice versa. We write AT for the transpose of matrix A. – – + + + – Compare with ENGG2012B
Meta rule Any row property of determinant is a column property, and vice versa ENGG2012B
Example of transposing 2x2 matrix (1,4) Area = 10 (2,4) Area = 10 (3,2) (3,1) ENGG2012B
Example of transposing 3x3 matrix • In computing the volume of a parallelepiped, it does not matter whether we write the vector horizontally or vertically in the determinant z Volume of parallelepiped with vertices(0,0,0), (1,2,0), (2,0,1), (–1, 1, 3) equals tothe absolute value of y or x ENGG2012B
Exchanging two rows/columns sign of determinant is flipped The first kindof elementaryrow operation Example (1,3) (2,1) ENGG2012B
Multiply a row/column by a constant If we multiply a row or a column by a constant c, the value of determinant also increase by a factor of c (Here, c may be zero) (4,4) (0,1) This corresponds to the 2nd kind of elementaryrow operation if c is nonzero (1,1) ENGG2012B
Scale up/down all entries by a constant c • Given an n x n matrix A, if we multiply it by a constant c, the determinant is increased by a factor of cn, i.e., det(cA) = cn det(A). For example, if we multiply the sides of a box by a factor of 3, then the volume increases by a factor of 27. ENGG2012B
Adding a constant multiple of a row/column to another row/column If we add a constant multiple of a row (column) to the other row (column), the determinant does not change. The second row is obtained byadding three times [1 0] to [0 1]. (0,1) (3,1) The 3rd kindof elementaryrow operation (1,0) The rectangle and parallelogramhave the same height and same base. ENGG2012B
Summary ENGG2012B
Additive property If a row (or column) of a determinant is the sum of two rows (or columns), the determinant can be split as the sum of two determinants For example, if the first column is the sum of two column vectors, thenwe have ENGG2012B
Repeated columns/rows zero determinant If any two columns (or rows) are the identical, then the determinant is zero. Examples: ENGG2012B
Cramer’s rule • If the determinant of a 33 matrix A is non-zero, we can solve the linear system Ax = b by Cramer’s rule. • The solution to is or equivalently A x b Gabriel Cramer (1704-1752) ENGG2012B
Verification of the Cramer’s rule • Claim: The solution to is provided that the determinant of A is nonzero. We verify the formula for x1 in the next slide. Cramer’s rule in wikipedia ENGG2012B
Because x1, x2, x3 satisfy the system of linear equations, we have Then, By substitution By the additive property We can bring outa common factorin a column. det=0 if there arerepeated columns =0 =0 ENGG2012B
Proof continued Hence, There is no division by zero, because det A is non-zero by hypothesis. The verification of the formula for x2 and x3 can be done similarly. QED ENGG2012B
Det is a multi-linear function http://en.wikipedia.org/wiki/Multilinear_map • Combined with the second type of elementary row/column operation, The additive property can be strengthened to the multi-linear property. • If the i-th column of a determinant can be decomposed as then we can write the determinant as the sum of two determinants with all other entries not in the i-th column kept unchanged. i-th column i-th column i-th column ENGG2012B
Useful fact • The determinant of an upper/lower triangular matrix is the product of the diagonal entries. Examples ENGG2012B
GENERALIZATION TO NXN DETERMINANT ENGG2012B
We want a function which … Set of all nxn matrices produces a real number for each n x n matrix, satisfying the analogous properties as in the 2x2 and 3x3 determinants, such as … ? the real number line 4 2 3 -1 1 0 ENGG2012B
Axiom 1 (alternating property) • If any two rows are exchanged, then the determinant is multiplied by -1. ENGG2012B
Axiom 2 (multiplicative property) • A common factor in a row can be brought out of the determinant. ENGG2012B
Axiom 3 (additive property) • If the i-th row is the sum of row vectors ri and si, then the determinant can be decomposed into the sum of two determinants. ENGG2012B
Axiom 4 (identity matrix) • The determinant of the identity matrix is 1. ENGG2012B
A weaker form of Axiom 1 • Axiom 1’: If there are two identical rows, then the determinant is zero. ENGG2012B
A recursive definition of determinant • Expansion on the first row. ENGG2012B
Verification that the recursive definition satisfies the axioms • We can verify that the recursive definition for general nxn matrices satisfies the four axioms. • The verification can be carried out by induction. • Show that the determinant function for 2x2 matrices satisfies the four axioms. • Suppose that the axioms hold for (n-1)x(n-1), (n-2)x(n-2), … Show that they are also true if we define nxn determinant by expansion on the first row. • We illustrate the verification process for n=4. ENGG2012B
Verification of Axiom 4 (identity) True by definition True by induction hypothesis ENGG2012B