CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j...

10
CSCI 171 Presentation 9 Matrix Theory

Transcript of CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j...

Page 1: CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.

CSCI 171

Presentation 9

Matrix Theory

Page 2: CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.

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)

Page 3: CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.

• Addition

• Theorem 1– i) A + B = B + A– ii) (A + B) + C = A + (B + C)– iii) A + 0 = 0 + A = A

Matrix Theory

Page 4: CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.

• Multiplication

• Theorem 2– i) A(BC) = (AB)C– ii) A(B + C) = AB + AC– iii) (A + B)C = AC + BC

Matrix Theory

Page 5: CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.

• 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

Page 6: CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.

• 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

Page 7: CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.

• 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

Page 8: CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.

• 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

Page 9: CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.

• 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

Page 10: CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.

• Boolean Matrices (all elements are 0 or 1)

• Theorem 4If A, B, and C are boolean matrices of appropriate sizes, then:i) A B = B Aii) A B = B Aiii) (A B) C = A (B C)iiii) (A B) C = A (B C)

Matrix Theory