CSCI 171 Presentation 9 Matrix Theory Matrix Theory • Matrix – Rectangular array – – – – – – ith row, jth column, i,j element Square matrix, diagonal Diagonal matrix Equality Zero Matrix (additive identity) Identity Matrix (multiplicative identity) Matrix Theory • Addition • Theorem 1 – i) A + B = B + A – ii) (A + B) + C = A + (B + C) – iii) A + 0 = 0 + A = A Matrix Theory • Multiplication • Theorem 2 – i) A(BC) = (AB)C – ii) A(B + C) = AB + AC – iii) (A + B)C = AC + BC Matrix Theory • Commutativity of Multiplication? • Let A be size m x p, B be size p x n • BA: – – – – May not be defined May be defined, but a different size than AB May be defined, same size as AB, but ABBA May be equal to AB Matrix Theory • Other properties / definitions: – If A is m x n, then ImA = AIn = A – If A is square (n x n): • • • • Ap = AAA…A (p factors) A0 = In ApAq = A(p+q) (Ap)q = Apq – (AB)p = ApBp if and only if AB = BA Matrix Theory • Transposition • Theorem 3 – i) (At)t = A – ii) (A + B)t = At + Bt – iii) (AB)t = BtAt • Symmetry (At = A) – A is symmetric if and only if ai,j = aj,i for all i and j Matrix Theory • Boolean Matrices (all elements are 0 or 1) • Operations on Boolean Matrices: – Let A and B be boolean Matrices – The join of A and B (C = A B): • Ci,j = 1 if Ai,j = 1 or Bi,j = 1 • Ci,j = 0 if Ai,j = 0 and Bi,j = 0 – The meet of A and B (C = A B): • Ci,j = 1 if Ai,j = 1 and Bi,j = 1 • Ci,j = 0 if Ai,j = 0 or Bi,j = 0 Matrix Theory • Boolean Matrices (all elements are 0 or 1) • Operations on Boolean Matrices: – Let A and B be boolean Matrices – The boolean product of A (m x p) and B (p x n) is (C = A B): • Ci,j = 1 if Ai,j =1 and Bk,j = 1 for some k, 1 k p • Ci,j = 0 otherwise Matrix Theory • Boolean Matrices (all elements are 0 or 1) • Theorem 4 If A, B, and C are boolean matrices of appropriate sizes, then: i) A B = B A ii) A B = B A iii) (A B) C = A (B C) iiii) (A B) C = A (B C)