This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1 Section 5.4: Multiplying Matrices 4 2 3 2 4 1* 3 1 3 * 4 2 * 2 4 * 3 1*1 29 This is a row vector times a column vector The row vector has dimension (1,4) The column vector has dimension (4,1) Because the inner dimensions (4 and 4) are equal, the multiplication is valid. Previous Slide Section 5.4: Multiplying Matrices Next Slide Invalid matrix multiplication (1x4)*(1x4) 3 2 4 1* 4 2 3 1 invalid 2 Because the inner dimensions (first matrix has 4 columns and second matrix has 1 row) are not equal, the multiplication is invalid. However, you can do an element by element multiplication of these vectors, in MatLab using the .* operator. 3 2 4 1 .* 4 2 3 1 12 4 12 1 Previous Slide Section 5.4: Multiplying Matrices Next Slide An exercise For each these two problems, determine the inner dimensions. If they are equal, do the multiplication by hand and in MatLab 3 2 1 5 2 1 5 1 3 * 2 2 3 4 2 2 3 4 5 2 1 5 2 2 3 4 * 2 1 3 2 1 3 2 4 (2x4)*(4x2)=? (2x4)*(2x4)=? Previous Slide Section 5.4: Multiplying Matrices Next Slide Inner dimensions must agree 2 1 5 2 1 5 1 3 * 2 2 3 4 2 2 3 4 4 5 * 2 2 *1 1* 2 5 * 3 29 5 *1 2 * 3 1* 2 5 * 4 33 2 * 2 2 *1 3* 2 4 * 3 24 2 *1 2 * 3 3* 2 4 * 4 30 Previous Slide Section 5.4: Multiplying Matrices Next Slide 5 End of Slide Show for Section 5.4 This is a good time to work on Exercise 5.4 Previous Slide Section 5.4: Multiplying Matrices Next Slide 6 End of Slide Show for Section 5.4 This is a good time to work on Exercise 5.4 Previous Slide Section 5.4: Multiplying Matrices Next Slide ...
View
Full
Document
This note was uploaded on 05/19/2008 for the course ENGR 25 taught by Professor All during the Spring '08 term at Lehigh University .
 Spring '08
 ALL

Click to edit the document details