PopsAndMatOps.nb

Mathematica file to accompany
"Living Links:  Applications of Matrix Operations to Population Studies"
by Angela B.Shiflet and George W.Shiflet
Wofford College, Spartanburg, South Carolina

w={20.00,6.57,4.69,3.08,0.99,0.02}

b={15.00,5.37,4.84,6.00,10.83,27.43}

column vector

bCol={{15.00}, {5.37}, {4.84}, {6.00} ,{10.83}, {27.43}}

Display as column vector

MatrixForm[bCol]

4 th element of b

b[[4]]

test if equal

b==b

b==w

b=={1.00,5.37,4.84,6.00,10.83,27.43}

addition of vectors

w+b

Multiplication by a scalar

100*w

100w

Dot Product

e={280,70};
b={291,9483};
e . b

Size of a vector

Length[e]

Matrices
Use semicolons to separate rows

S={{20.00,15.00},{6.57,5.27},{4.69,4.84},{3.08,6.00},{0.99,10.83},{0.02,27.43}};

MatrixForm[S]

Scalar Multiplication

100*S

100S

Matrix Sums

S+S

Matrix Multiplication

S.{{20},{18}}

MatrixForm[S.{{20},{18}}]

A={{20,0.25,0.30},{18,0.00,0.20}};

S.A

MatrixForm[S.A]

Transpose - switch rows and columns

MatrixForm[S]

Transpose[S]

MatrixForm[Transpose[S]]