Determinants
CS 130: Mathematical Methods in Computer Science Linear Systems and Matrices Nestine Hope S. Hernandez Algorithms and Complexity Laboratory Department of Computer Science University of the Philippines, Diliman nshernandez@dcs.upd.edu.ph Day 3
Determinants
Linear Equations and Matrices
Determinants Properties of Determinants Cofactor Expansion The Inverse of a Matrix Solving Linear Systems
Determinants
Linear Systems and Matrices
Determinants Properties of Determinants Cofactor Expansion The Inverse of a Matrix Solving Linear Systems
Determinants
Determinant Let A = [aij ] be an n × n matrix. We define the determinant of A (written det(A) or |A|) by X det(A) = |A| = (±)a1j1 a2j2 · · · anjn , where the summation ranges over all permutations j1 j2 · · · jn of the set S = {1, 2, · · · , n}. The sign is taken as + or − according to whether the permutation j1 j2 · · · jn is even or odd. Note: Let S = {1, 2, · · · , n} be the set of integers from 1 to n, arranged in ascending order. A rearrangement j1 j2 · · · jn of the elements of S is called a permutation of S. A permutation j1 j2 · · · jn of S = {1, 2, · · · , n} is said to have an inversion if a larger integer jr precedes a smaller one js . A permutation is called even or odd according to whether the total number of inversions in it is even or odd.
Determinants
Examples
2 Ă— 2 matrix A=
a11 a21
a12 a22
Determinants
Examples
2 Ă— 2 matrix A=
a11 a21
a12 a22
det(A) = a11 a22 − a12 a21
Determinants
Examples
2 × 2 matrix A=
a11 a21
a12 a22
det(A) = a11 a22 − a12 a21
3 × 3 matrix
a11 B = a21 a31
a12 a22 a32
a13 a23 a33
Determinants
Examples
2 × 2 matrix A=
a11 a21
a12 a22
det(A) = a11 a22 − a12 a21
3 × 3 matrix
a11 B = a21 a31
a12 a22 a32
a13 a23 a33
det(B) = a11 a22 a33 + a12 a23 a31 + a13 a21 a32 −a11 a23 a32 − a12 a21 a33 − a13 a22 a31
Determinants
Some Properties The determinants of a matrix and its transpose are equal, that is, det(AT ) = det(A) where the transpose of A is obtained by interchanging the rows and columns of A.
Determinants
Some Properties The determinants of a matrix and its transpose are equal, that is, det(AT ) = det(A) where the transpose of A is obtained by interchanging the rows and columns of A.
If matrix B results from matrix A by interchanging two rows(columns) of A, then det(B) = − det(A).
Determinants
Some Properties The determinants of a matrix and its transpose are equal, that is, det(AT ) = det(A) where the transpose of A is obtained by interchanging the rows and columns of A.
If matrix B results from matrix A by interchanging two rows(columns) of A, then det(B) = − det(A). If matrix B is obtained from matrix A by multiplying a row(column) of A by a real number c, then det(B) = c det(A).
Determinants
Some Properties The determinants of a matrix and its transpose are equal, that is, det(AT ) = det(A) where the transpose of A is obtained by interchanging the rows and columns of A.
If matrix B results from matrix A by interchanging two rows(columns) of A, then det(B) = − det(A). If matrix B is obtained from matrix A by multiplying a row(column) of A by a real number c, then det(B) = c det(A). If B = [bij ] is obtained from A = [aij ] by adding to each element of the rth row(column) of A a constant c times the corresponding element of the sth row(column) r 6= s of A, then det(B) = det(A).
Determinants
More Properties
If two rows(columns) A are equal, then det(A) = 0.
Determinants
More Properties
If two rows(columns) A are equal, then det(A) = 0. If a row(column) of A consists entirely of zeros, then det(A) = 0.
Determinants
More Properties
If two rows(columns) A are equal, then det(A) = 0. If a row(column) of A consists entirely of zeros, then det(A) = 0. The determinant of a diagonal matrix is the product of the entries on its main diagonal.
Determinants
More Properties
If two rows(columns) A are equal, then det(A) = 0. If a row(column) of A consists entirely of zeros, then det(A) = 0. The determinant of a diagonal matrix is the product of the entries on its main diagonal. The determinant of an upper(lower) triangular matrix is the product of the entries on its main diagonal.
Determinants
More Properties
If two rows(columns) A are equal, then det(A) = 0. If a row(column) of A consists entirely of zeros, then det(A) = 0. The determinant of a diagonal matrix is the product of the entries on its main diagonal. The determinant of an upper(lower) triangular matrix is the product of the entries on its main diagonal. The determinant of a product of two matrices is the product of their determinants, det(AB) = det(A) det(B).
Determinants
More Properties
If two rows(columns) A are equal, then det(A) = 0. If a row(column) of A consists entirely of zeros, then det(A) = 0. The determinant of a diagonal matrix is the product of the entries on its main diagonal. The determinant of an upper(lower) triangular matrix is the product of the entries on its main diagonal. The determinant of a product of two matrices is the product of their determinants, det(AB) = det(A) det(B). If A is nonsingular, then det(A) 6= 0 and det(A−1 ) =
1 . det(A)
Determinants
The Cofactor
Definition Let A = [aij ] be an n × n matrix. Let Mij be the (n − 1) × (n − 1) submatrix of A obtained by deleting the ith row and jth column of A. The determinant det(Mij ) is called the minor of aij .
Determinants
The Cofactor
Definition Let A = [aij ] be an n × n matrix. Let Mij be the (n − 1) × (n − 1) submatrix of A obtained by deleting the ith row and jth column of A. The determinant det(Mij ) is called the minor of aij . The cofactor Aij of aij is defined as Aij = (−1)i+j det(Mij ).
Determinants
Cofactor Expansion
Let A = [aij ] be an n × n matrix. Then for each 1 ≤ i ≤ n, det(A) = ai1 Ai1 + ai2 Ai2 + · · · + ain Ain (expansion of det(A) along the ith row); and for each 1 ≤ j ≤ n, det(A) = a1j A1j + a2j A2j + · · · + anj Anj (expansion of det(A) along the jth column);
Determinants
Cofactor Expansion
Let A = [aij ] be an n × n matrix. Then for each 1 ≤ i ≤ n, det(A) = ai1 Ai1 + ai2 Ai2 + · · · + ain Ain (expansion of det(A) along the ith row); and for each 1 ≤ j ≤ n, det(A) = a1j A1j + a2j A2j + · · · + anj Anj (expansion of det(A) along the jth column);
Example
1 4 3 1
−2 4 0
1 0 2
0 2 −5
4 0 2
Determinants
The Adjoint
Definition Let A = [aij ] be an n × n matrix. The n × n matrix adj A, called the adjoint of A, is the matrix whose i, jth element is the cofactor Aji of aji . Thus A11 A21 · · · An1 A12 A22 · · · An2 adj A = : : : A1n A2n · · · Ann
Determinants
The Adjoint
Definition Let A = [aij ] be an n × n matrix. The n × n matrix adj A, called the adjoint of A, is the matrix whose i, jth element is the cofactor Aji of aji . Thus A11 A21 · · · An1 A12 A22 · · · An2 adj A = : : : A1n A2n · · · Ann
Example
1 A= 0 −3
5 1 2
2 0 0
Determinants
The Adjoint
Definition Let A = [aij ] be an n × n matrix. The n × n matrix adj A, called the adjoint of A, is the matrix whose i, jth element is the cofactor Aji of aji . Thus A11 A21 · · · An1 A12 A22 · · · An2 adj A = : : : A1n A2n · · · Ann
If A = [aij ] is an n × n matrix, then A(adj A) = (adj A)A = det(A)In .
Determinants
The Inverse
If A is an n Ă— n matrix and det(A) 6= 0, then A−1 =
1 (adj A). det(A)
Determinants
The Inverse
If A is an n × n matrix and det(A) 6= 0, then A−1 =
1 (adj A). det(A)
Example
1 A= 0 −3
5 1 2
2 0 0
Determinants
The Inverse
If A is an n Ă— n matrix and det(A) 6= 0, then A−1 =
1 (adj A). det(A)
A matrix A is nonsingular if and only if det(A) 6= 0.
Determinants
Cramer’s Rule Consider the linear system of n equations in n unknowns, a11 x1 + a12 x2 + · · · + a1n xn = b1 a21 x1 + a22 x2 + · · · + a2n xn = b2 : : : : an1 x1 + an2 x2 + · · · + ann xn = bn This linear system a11 a21 where A = : an1
can be written in matrix formas Ax = b a12 · · · a1n x1 b1 x2 b2 a22 · · · a2n , x = : , b = : : : an2 · · · ann xn bn
If det(A) 6= 0, then the system has the unique solution x1 =
det(A1 ) , det(A)
x2 =
det(A2 ) , det(A)
··· ,
xn =
det(An ) det(A)
where Ai is the matrix obtained from A by replacing the ith column of A by b.
Determinants
Exercises Solve the ff. linear systems: 1. −2x1 x1 −2x1 2. 3x x 2x
+ − +
+ + − 2y y y
3x2 2x2 x2 − − −
− x3 − x3 + x3 z z 2z
= 1 = 4 = −3
= −1 = 0 = 3
Determinants
List of Nonsingular Equivalences Suppose A is an n Ă— n matrix. Then the following statements are equivalent: 1. A is nonsingular. 2. A is row equivalent to In . 3. Ax = 0 has only the trivial solution. 4. The linear system Ax = b has a unique solution for every n Ă— 1 matrix b. 5. det(A) 6= 0.
Determinants
For Self-Study
Determinants
Scalar Multiplication
Definition If A = [aij ] is an m × n matrix and r is a real number, then the scalar multiple of A by r, rA, is the m × n matrix B = [bij ], where bij = r · aij , 1 ≤ i ≤ m, 1 ≤ j ≤ n. That is, B is obtained by multiplying each element of A by r.
Determinants
Properties of Scalar Multiplication
Theorem If r and s are real numbers and A and B are matrices, then (a) r(sA) = (rs)A (b) (r + s)A = rA + sA (c) r(A + B) = rA + rB (d) A(rB) = r(AB) = (rA)B
Determinants
Properties of Transpose
Theorem If r is a real number and A and B are matrices, then (a) (AT )T = A (b) (A + B)T = AT + B T (c) (AB)T = B T AT (d) (rA)T = rAT
Determinants
Properties of Transpose
A matrix A = [aij ] is called symmetric if AT = A. That is, A is symmetric if it is a square matrix for which aij = aji . If matrix A is symmetric, then the elements of A are symmetric with respect to the main diagonal of A.
Determinants
Questions? See you next meeting!