1 / 23

Matrices

Matrices. MSU CSE 260. Outline. Introduction Matrix Arithmetic: Sum, Product Transposes and Powers of Matrices Identity matrix, Transpose, Symmetric matrices Zero-one Matrices: Join, Meet, Boolean product Exercise 2.6. Introduction.

thuy
Télécharger la présentation

Matrices

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Matrices MSU CSE 260

  2. Outline • Introduction • Matrix Arithmetic: • Sum, Product • Transposes and Powers of Matrices • Identity matrix, Transpose, Symmetric matrices • Zero-one Matrices: • Join, Meet, Boolean product • Exercise 2.6

  3. Introduction Definition A matrix is a rectangular array of numbers. element in ith row, jth column Also written as A=aij m rows mn matrix n columns When m=n, A is called a square matrix.

  4. Matrix Equality • Definition Let A and B be two matrices. A=B if they have the same number of rows and columns, and every element at each position in A equals element at corresponding position in B.

  5. Matrix Addition, Subtraction Let A = aij, B = bij be mn matrices. Then: A + B = aij + bij, and A - B = aij - bij

  6. Matrix Multiplication Let A be a mk matrix, and B be a kn matrix,

  7. Matching Dimensions To multiply two matrices, inner numbers must match: Otherwise, not defined. 23 34 24 matrix have to be equal 24 23 34

  8. Multiplicative Properties Note that just because AB is defined, BA may not be. ExampleIf A is 34, B is 46, then AB=36, but BA is not defined (46 . 34). Even if both AB and BA are defined, they may not have the same size. Even if they do, matrices do not commute.

  9. Efficiency of Multiplication 34 23 • a11b12 + a12b22 + a13b32 = c12 • Takes 3 multiplications, and 2 additions for each element. • This has to be done 24 (=8) times (since product matrix is 24). So 243 multiplications are needed. • (mk) (kn) matrix product requires m.k.n multiplications.

  10. Best Order? Let A be a 2030 matrix, B 3040, C 4010. (AB)C or A(BC)? (2030 3040) 4010 32000 2030 (3040 4010) 18000 So, A(BC) is best in this case.

  11. Identity Matrix The identity matrix has 1’s down the diagonal, e.g.: For a mn matrix A, Im A = A In mmmn = mn nn

  12. Inverse Matrix Let A and B be nn matrices. If AB=BA=Inthen B is called the inverse of A, denoted B=A-1. Not all square matrices are invertible.

  13. Use of Inverse to Solve Equations Please note that a-1j is NOT necessarily (aj)-1.

  14. Transposes of Matrices Flip across diagonal Transposes are used frequently in various algorithms.

  15. Symmetric Matrix A is called symmetric. is symmetric. Note, for A to be symmetric, is has to be square. is trivially symmetric...

  16. Examples

  17. Power Matrix • For a nn square matrix A, the power matrix is defined as: Ar = A  A  …  A r times • A0 is defined as In.

  18. Zero-one Matrices • All entries are 0 or 1. • Operations are  and . • Boolean product is defined using:  for multiplication, and  for addition.

  19. Boolean Operations Terminology is from Boolean Algebra.Think “join” is “put together”, like union, and “meet” is “where they meet”, or intersect.

  20. Boolean Product (Should be a ‘dot’) Since this is “or’d”, you can stop when you find a ‘1’

  21. Boolean Product Properties • In general, A  B  B  A • Example

  22. Boolean Power • A Boolean power matrix can be defined in exactly the same way as a power matrix. For a nn square matrix A, the power matrix is defined as: A[r] = A  A  …  A r times A[0] is defined as In.

  23. Exercise 2.6

More Related