Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
A very brief introduction to Matrix (Section 2.7) • Definitions • Some properties • Basic matrix operations • Zero-One (Boolean) matrices Matrix (Section 2.7) Definition: A matrix is a rectangular array of numbers. A matrix of m rows and n columns is called an mn matrix, denoted Amn. The element or entry at the ith row and jth column is denoted ai,j. The matrix can also be denoted A = [ai,j]. Example A3, 2 1 1 0 2 1 3 column row a2,3 = 2 Matrix Two matrices Amn and Bpq are equal if they have the same number of rows and columns (m = p and n = q), and their corresponding entries are equal (ai,j =bi,j for all i, j). Amn is a square matrix if m = n, denoted Am A square matrix A is said to be symmetric if ai,j = aj,i for all i and j. 1 2 3 A3,3 2 3 4 3 4 1 Matrix arithmetic (operations) Matrix addition. Amn and Bmn • must have the same numbers of rows and columns • add corresponding entries Amn + Bmn = Cmn = [ai,j + bi,j] A3, 2 5 1 1 4 5 6 0 2 B3, 2 1 6 A3, 2 B3, 2 1 8 1 3 2 3 3 0 Matrix subtraction is done similarly Matrix arithmetic (operations) Multiply a matrix by a number. • bA = [bai,j] (i.e., multiply the number to each entry.) Multiplication of two matrices. Amk and Bkn • number of columns of the first must equal number of rows of the second • the product is a matrix, denoted AB = Cmn • Entry ci,j is the sum of pair-wise products of the ith row of A and jth column of B ci , j ai ,1b1, j ai , 2b2, j ai ,k bk , j Matrix arithmetic (operations) Example A4,3 1 0 4 14 2 4 2 1 1 8 3 1 0 B3, 2 1 1 AB C4, 2 7 3 0 0 2 2 8 4 9 13 2 c1,1 a1,1b1,1 a1, 2b2,1 a1,3b3,1 1 2 0 1 4 3 14 c1, 2 a1,1b1, 2 a1, 2b2, 2 a1,3b3, 2 1 4 0 1 4 0 4 c2,1 a2,1b1,1 a2, 2b2,1 a2,3b3,1 2 2 11 1 3 8 Powers and Transposes Identity matrix: In • A square matrix of n rows and n columns • Diagonal entries are 1, all other entries are 0 (ii,i = 1 for all i, ii,j = 0 for all i != j.) • For matrix Amn, we have Im A = A In = A 1 0 0 I 3 0 1 0 0 0 1 A3, 2 1 1 0 2 1 3 Powers of (square) matrix An A0 = In =, Ar = AA···A r times I 3 A3, 2 1 0 1 1 2 A3, 2 3 Powers and Transposes Matrix transpose: Amn • the transpose of A, denoted At, is a n m matrix • At = [bi,j = aj,i] • ith row of A becomes ith column of At 1 1 t 1 0 1 A A3, 2 0 2 1 2 3 1 3 Theorem: A square matrix An is symmetric iff A = At Zero-One (Boolean) Matrix Definition: • Entries are Boolean values (0 and 1) • Operations are also Boolean Matrix join. • A B = [ai,j bi,j] Example: Matrix meet. • A B = [ai,j bi,j] A 1 0 1 0 1 0 B 0 1 0 1 1 0 A B 1 0 0 1 1 0 1 1 1 0 1 1 1 0 0 1 1 0 A B 1 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 1 0 Zero-One (Boolean) Matrix Matrix multiplication: Amk and Bkn • the product is a Zero-One matrix, denoted AB = Cmn • cij = (ai1 b1j) (ai2 b2i) … (aik bkj). Example: 1 A 0 1 0 1 0 B 1 1 0 0 1 1 1 1 A B 0 1 1 1 0 1 0