1 / 19

Matrices

Matrices. CSLU 1100.003 Fall 2007 Cameron McInally cameron.mcinally@nyu.edu Fordham University. Matrices. Matrix In English… What is a list of items called? What is a list of lists called?. a list. a table. Matrices. Matrix In Computer Science… What is a row of elements called?

dunne
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 CSLU 1100.003 Fall 2007 Cameron McInally cameron.mcinally@nyu.edu Fordham University

  2. Matrices • Matrix • In English… • What is a list of items called? • What is a list of lists called? a list. a table.

  3. Matrices • Matrix • In Computer Science… • What is a row of elements called? • What is an array of arrays called? an array. a matrix.

  4. Matrices • Elements of a Matrix • The items. • How do we reference a particular element in matrix M? M = M(x,y) = item y in array x

  5. Matrices • Elements of a Matrix M = M(1,2) = M(0,0) = M(1,0) = M(3,2) = J A B L

  6. Matrices • Examples

  7. Matrices • Size of a Matrix • We describe the size of a matrix by its width and its height. So…. size(A) = number_of_elements(A) = 3x2 3*2 = 6

  8. Matrices • Adding Matrices • Rule #1: The two matrices we wish to add must be the same size. • Rule #2: Add the corresponding elements in the two matrices to create a new matrix. • Rule #3: Memorize these.

  9. Matrices • Adding Matrices Example • Rule #1: Both matrices are 3x2. • Rule #2:

  10. Matrices • Adding Matrices Example • Rule #1:A is 3x2 and B is 2x3. A and B can not be added together!!!

  11. Matrices • Scalar Multiplication • Rule #0: A scalar is a single number. • Rule #1: Multiply each element in a matrix by a scalar.

  12. Matrices • Scalar Multiplication Example

  13. Matrices • Matrix Multiplication • Rule #1 : You can only multiple two matrices if the number of columns in the first matrix is equal to the number of rows in the second matrix.

  14. Matrices • Matrix Multiplication • Rule #1 Explained: • Can we multiply A x B? • Yes, we have a 2x3 matrix multiplied by a 3x2 matrix. The number of columns in the first one (3) matches the number of rows in the second one (3).

  15. Matrices • Matrix Multiplication • Rule #1 Explained: • Can we multiply D x A? • No it is a 3x3 multiplied by a 2x3. The number of columns in the first one (3) does not match the number of rows in the second one (2). Note: We can multiply A x D.

  16. Matrices • Matrix Multiplication What is A x B? First rewrite the matrices so that the first one is on the left of the result matrix and the second one is above the result matrix. Start with the first row on the left matrix and the first column on the above matrix. Multiply each pair of terms from 1..n and add them together. 30 10 6 -6

  17. Matrices • Matrix Multiplication Example • What is D*B?

  18. Matrices • Matrix Multiplication Practice What is AxC? What is CxA? What is AxD? What is DxA?

  19. Homework(Always Due in One Week) Matrices • Read Appendix B section “Matrix Operations” • Complete Section 6.1 pages 623: 1 (a – e), 2(a – d) [Hint: I is the Identity Matrix] • Why is I called the Identity Matrix?

More Related