Download presentation
Presentation is loading. Please wait.
1
Matrices CSLU 1100.003 Fall 2007 Cameron McInally
Fordham University
2
Matrices a list. a table. Matrix In English…
What is a list of items called? What is a list of lists called? a list. Item 1 Item 2 Item 3 Item 4 A B C D a table. List 1 List 2 List 3 List 4 Item 1 Item 2 Item 3
3
Matrices an array. a matrix. Matrix In Computer Science…
What is a row of elements called? What is an array of arrays called? Element 0 Element1 Element 2 Element 3 A B C D an array. a matrix. Array 0 Array 1 Array 2 Array 3 Element 0 Element 1 Element 2
4
Matrices M = Elements of a Matrix M(x,y) = item y in array x
The items. How do we reference a particular element in matrix M? Array 0 Array 1 Array 2 Array 3 Element 0 Element 1 Element 2 M = M(x,y) = item y in array x
5
Matrices M = Elements of a Matrix M(1,2) = M(0,0) = M(1,0) = M(3,2) =
Array 0 Array 1 Array 2 Array 3 A B C D E F G H I J K L M = M(1,2) = M(0,0) = M(1,0) = M(3,2) = J A B L
6
Matrices Examples
7
Matrices 3x2 3*2 = 6 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.
10
Matrices A and B can not be added together!!! 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 Homework (Always Due in One Week) 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?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.