Matrices A brief introduction Basilio Bona DAUIN – Politecnico di Torino Semester 1, 2016-17 B. Bona (DAUIN) Matrices Semester 1, 2016-17 1 / 41
Definitions Definition A matrix is a set of N real or complex numbers organized in m rows and n columns, with N = mn a 11 a 12 ··· a 1 n ··· a 21 a 22 a 2 n � a ij � A = ≡ i = 1 ,..., m j = 1 ,..., n ··· ··· ··· a ij ··· a m 1 a m 2 a mn A matrix is always written as a boldface capital letter, e.g., A . To indicate matrix dimensions we use the following symbols A m × n A ∈ F m × n A m × n A ∈ F m × n where F = R for real elements and F = C for complex elements. B. Bona (DAUIN) Matrices Semester 1, 2016-17 2 / 41
Transpose matrix Given a matrix A m × n the transpose matrix is the matrix obtained exchanging rows and columns a 11 a 21 ··· a m 1 a 12 a 22 ··· a m 2 A T n × m = . . . ... . . . . . . a 1 n a 2 n ··· a mn The following property holds ( A T ) T = A B. Bona (DAUIN) Matrices Semester 1, 2016-17 3 / 41
Square matrix A matrix is said to be square when m = n A square n × n matrix is upper triangular when a ij = 0 , ∀ i > j a 11 a 12 ··· a 1 n 0 a 22 ··· a 2 n A n × n = . . . ... . . . . . . 0 0 ··· a nn If a square matrix is upper triangular its transpose is lower triangular and viceversa 0 ··· 0 a 11 a 12 a 22 ··· 0 A T n × n = . . . ... . . . . . . ··· a 1 n a 2 n a nn B. Bona (DAUIN) Matrices Semester 1, 2016-17 4 / 41
Symmetric matrix A real square matrix is said to be symmetric if A = A T , or A − A T = O In a real symmetric matrix there are at least n ( n +1) independent 2 elements. If a matrix K has complex elements k ij = a ij +j b ij (where j = √− 1) its conjugate is K with elements k ij = a ij − j b ij . Given a complex matrix K , its adjoint matrix K ∗ is the conjugate T = K T transpose K ∗ = K A complex matrix is called self-adjoint or hermitian when K = K ∗ . Some textbooks indicate this matrix as K † or K H B. Bona (DAUIN) Matrices Semester 1, 2016-17 5 / 41
Diagonal matrix A square matrix is diagonal if a ij = 0 for i � = j 0 ··· 0 a 1 0 ··· 0 a 2 A n × n = diag( a i ) = . . . ... . . . . . . 0 0 ··· a n A diagonal matrix is always symmetric. B. Bona (DAUIN) Matrices Semester 1, 2016-17 6 / 41
Matrix Algebra Matrices form an algebra , i.e., a vector space endowed with the product operator . The main operations are: product by a scalar , sum , matrix product Product by a scalar c a 11 a 12 ··· a 1 n ca 11 ca 12 ··· ca 1 n a 21 a 22 ··· a 2 n ca 21 ca 22 ··· ca 2 n c A = c = . . . . . . ... ... . . . . . . . . . . . . a m 1 a m 2 ··· a mn ca m 1 ca m 2 ··· ca mn Sum a 11 + b 11 a 12 + b 12 ··· a 1 n + b 1 n a 21 + b 21 a 22 + b 22 ··· a 2 n + b 2 n A + B = . . . ... . . . . . . a m 1 + b m 1 a m 2 + b m 2 ··· a mn + b mn B. Bona (DAUIN) Matrices Semester 1, 2016-17 7 / 41
Sum Properties A + O = A A + B = B + A ( A + B )+ C = A +( B + C ) A T + B T ( A + B ) T = The neutral element O is called null or zero matrix . The matrix difference is defined introducing the scalar α = − 1: A − B = A +( − 1) B . B. Bona (DAUIN) Matrices Semester 1, 2016-17 8 / 41
Matrix Product Matrix product The operation follows the rule “ row by column ”: the generic c ij element of the product matrix C m × p = A m × n · B n × p is n ∑ c ij = a ik b kj k =1 The following identity holds: α ( A · B ) = ( α A ) · B = A · ( α B ) B. Bona (DAUIN) Matrices Semester 1, 2016-17 9 / 41
Product Properties A · B · C = ( A · B ) · C = A · ( B · C ) A · ( B + C ) = A · B + A · C ( A + B ) · C = A · C + B · C ( A · B ) T = B T · A T In general: the matrix product is NOT commutative : A · B � = B · A , except some particular case; A · B = A · C does not imply B = C , except some particular case; A · B = O does not imply A = O or B = O , except some particular case. B. Bona (DAUIN) Matrices Semester 1, 2016-17 10 / 41
Identity Matrix The neutral element wrt the matrix product is called identity matrix usually written as I n or I when there are no ambiguities on the dimension. Identity matrix 1 0 ··· 0 0 ··· ··· 0 I = . . . ... . . . . . . 0 0 ··· 1 Given a rectangular matrix A m × n the following relations hold A m × n = I m A m × n = A m × n I n B. Bona (DAUIN) Matrices Semester 1, 2016-17 11 / 41
Matrix Power Given a square matric A ∈ R n × n , the k -th power is k A k = ∏ A ℓ =1 One matrix is said to be idempotent iff A 2 = A → A k = A . B. Bona (DAUIN) Matrices Semester 1, 2016-17 12 / 41
Matrix Trace Trace The trace of a square matrix A n × n is the sum of its diagonal elements n ∑ tr ( A ) = a kk k =1 Trace satisfy the following properties tr ( a A + b B ) = a tr ( A )+ b tr ( B ) tr ( AB ) = tr ( BA ) tr ( A ) = tr ( A T ) tr ( A ) = tr ( T − 1 AT ) for T non-singular (see below for explanation) B. Bona (DAUIN) Matrices Semester 1, 2016-17 13 / 41
Row/column cancellation Given the square matrix A ∈ R n × n , we call A ( ij ) ∈ R ( n − 1) × ( n − 1) the matrix obtained deleting the la i -the row and the j -the columns of A . Example: given 1 − 5 3 2 -6 4 9 -7 A = 7 − 4 -8 2 0 − 9 -2 − 3 deleting row 2, column 3 we obtain 1 − 5 2 A (23) = 7 − 4 2 0 − 9 − 3 B. Bona (DAUIN) Matrices Semester 1, 2016-17 14 / 41
Minors and Determinant A minor of order p of a generic matrix A m × n is defined as the determinant D p of a square sub-matrix obtained selecting any p rows and p columns of A m × n There exist as many minors as the possible choices of p on m rows and p on n columns The definition of determinant will be given soon. Given a matrix A m × n its principal minors of order k are the determinants D k , with k = 1 , ··· , min { m , n } , obtained selecting the first k rows and k columns of A m × n . B. Bona (DAUIN) Matrices Semester 1, 2016-17 15 / 41
Example Given the 4 × 3 matrix 1 − 3 5 7 2 4 A = − 1 3 2 8 − 1 6 we compute a generic minor D 2 , for example that obtained selecting the first and rows 1 and 3 and columns 1 and 2 (in red). First we form the submatrix � � 1 − 3 D = − 1 3 and then we compute the determinant D 2 = det( D ) = 3 × 1 − ( − 3 ×− 1) = 0 B. Bona (DAUIN) Matrices Semester 1, 2016-17 16 / 41
Example Given the 4 × 3 matrix 1 − 3 5 7 2 4 A = − 1 3 2 8 − 1 6 we compute the principal minors minors D k , k = 1 , 2 , 3, D 1 = 1 � � 1 − 3 D 2 = det = 23 7 2 1 − 3 5 = 161 D 3 = det 7 2 4 − 1 3 2 B. Bona (DAUIN) Matrices Semester 1, 2016-17 17 / 41
Complement We call the complement C rc of a generic ( r , c ) element of a square matrix A n × n the determinant of the matrix obtained deleting its r -the row and the c -th column, i.e., det A ( rc ) D rc = det A ( rc ) . The cofactor of the ( r , c ) element of a square matrix A n × n is the signed product C rc = ( − 1) r + c D rc B. Bona (DAUIN) Matrices Semester 1, 2016-17 18 / 41
Example Given the 3 × 3 matrix 1 2 3 4 5 6 A = 7 8 9 some of the cofactors are C 11 = ( − 1) 2 (45 − 48) = − 3 C 12 = ( − 1) 3 (36 − 42) = 6 C 31 = ( − 1) 4 (12 − 15) = − 3 B. Bona (DAUIN) Matrices Semester 1, 2016-17 19 / 41
Adjugate/Adjunct/Adjoint The cofactor matrix of A is the n × n matrix C whose ( i , j ) entry C ij is the ( i , j ) cofactor of A C ij = ( − 1) i + j D ij The adjugate or adjunct or adjoint of a square matrix A is the transpose of C , that is, the n × n matrix whose ( i , j ) entry is the ( j , i ) cofactor of A , A adj = C ji = ( − 1) i + j D ji ij The adjoint matrix of A is the matrix X that satisfies the following equality AX = XA = det( A ) I B. Bona (DAUIN) Matrices Semester 1, 2016-17 20 / 41
Example Given the 3 × 3 matrix 1 3 2 A = 4 6 5 7 9 8 its adjoint is 3 − 6 3 A adj = 3 − 6 3 − 6 12 − 6 B. Bona (DAUIN) Matrices Semester 1, 2016-17 21 / 41
Determinant The determinant of a square matrix A x × n can be computed in different ways. Choosing any row i , the definition “by row” is: n n a ik ( − 1) i + k det( A ( ik ) ) = ∑ ∑ det( A ) = a ik A ik k =1 k =1 Choosing any column j , the definition “by column” is:: n n a kj ( − 1) k + j det( A ( kj ) ) = ∑ ∑ det( A ) = a kj A kj k =1 k =1 Since these definitions are recursive, involving the determinants of increasingly smaller minors, we define the determinant of a 1 × 1 matrix A = a , simply as det A = a . B. Bona (DAUIN) Matrices Semester 1, 2016-17 22 / 41
Recommend
More recommend