worksheet03 - Worksheet#3 PHY102(Spr 2006 Matrices and...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Worksheet #3 - PHY102 (Spr. 2006) Matrices and linear algebra Last week we did vector operations with lists . This week we introduce you to matrices, their representation using lists and to some of the matrix operations which Mathematica is able to do. Let us Frst see how to represent matrices in Mathematica as a list . Type “m= {{ a,b } , { c,d }} ”. Now “type Matrix±orm[m]”. Note that all of the Math- ematica operations must be applied to the list form of the matrix (not the matrix form). You can see that you get the matrix m with its elements a, b, c, d in the usual form. You can think of this matrix as consisting of two row vectors (a,b) and (c,d). Type “m[[1]]” and check you get the Frst row vector (a,b). Now type “m[[1,1]]”; this will give you the 1st element of the Frst vector, namely a (notice that “m[[1]][[1]]” also does the same thing). Likewise, to access the element d , type “m[[2,2]]”. As you have done with vectors, you can perform algebraic operations on matrices. You can multiply
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/25/2008 for the course PHY 102 taught by Professor Duxbury during the Spring '08 term at Michigan State University.

Page1 / 3

worksheet03 - Worksheet#3 PHY102(Spr 2006 Matrices and...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online