Consider: C := A * B matrix multiplication gives the i th row and k th column spot in C as the scalar results of the dot product of the i th row in A with the k th column in B. Rather, matrix multiplication is the result of the dot products of rows in one matrix with columns of another. It is not an element by element multiplication as you might suspect it would be. No matrix dimension restrictions Some examples: 1-D! #'%,! $ # ' 1x3 becomes => 3x1 % 2-D " */! 0 (/# 0 $/), " $ */! "/' 0 (/# "/! 2x3 becomes => 3x2 "/' "/! "/% 0 $/) "/% In general "% (, ) " $ (, %) In Mathcad, The transpose is can be keystroked by Ctrl - 1 (the number one) " #")' %*($ B Ctrl-1 = '() #% "* )( '$ Lecture 2 Mathcad basics and Matrix Operations page 12 of 18ģ Multiplication Multiplication of matrices is not as simple as addition or subtraction. " " $!!!#!% '" The Mathcad commands to perform these matrix assignments and the addition are: A := Ctrl-M (choose 2 x 3) B := Ctrl-M (choose 2 x 3) C := A + B C = Rule: A, B, and C must all have the same dimensions Transpose Transposing a matrix means swapping rows and columns of a matrix. If A and B are both matrices of the same dimensions (size), then Lecture 2 Mathcad basics and Matrix Operations page 11 of 18Ģ C := A + B produces C, where the i th row and j th column are just the addition of the elements (numbers) in the i th row and j th column of A and B Given:!!" #, and " ' ( ) $%!! *!+!' so that the addition is : #,-!. Adding matrices Add two matrices together is just the addition of each of their respective elements. Here we will learn some basic matrix operations: Adding and Subtracting, Transpose, Multiplication. Different pieces of information are then retrieved by pointing to different parts of the matrix by row and column. That is, many pieces of information are stored under a single name. We ve seen the matrix before in Lecture 1 as a 2-D array. Operators + Addition, - Subtraction, * Multiplication, / Division, ^ Power ( ) Specify evaluation order Order of Operations ( ) ^ highest level, first priority * / next priority level + - last operations to be performed y := 2 x := 3 * y^2 x = 12 y := 2 x := (3*y)^2 x = 36 y := 2 x := 3 * y + 2 x = 8 z := 3*6+6*2/4 z = 21 x := 5^2/2 x = 12.5 Matrix operations: Mathcad is designed to be a tool for quick and easy manipulation of matrix forms of data. 1 Lecture 2 Mathcad basics and Matrix Operations Announcements No class or lab Wednesday, 8/29/01 I will be posting a lab worksheet on the web site on Tuesday for you to work through on your own.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |