Your Assignment:
1) Execute the entire notebook.  Experiment if you like. 
2) Do Problem 21  & Problem 51 as best you can.
3) Hand in Prob.21 and Prob.51

Initialization: 
(Don't read this; just execute it)
(Click on the outer bracket--far right--and hit the ENTER key.

Define the cross product:

Needs["LinearAlgebra`CrossProduct`"]

Off[ General::spell ];
Off[ General::spell1];

Clear["Global`*"];

VectorPlot[list__List?VectorQ]:= VectorPlot[{list}];

VectorPlot[list_List?MatrixQ]:= 
Module[{xlist,length,totList},
 xlist=Join[{{0,0}},list];
 length=Length[xlist];
 totList=Table[ Sum[ xlist[[i]] ,{i,1,j}],{j,1,length}];
 Return[
  Show[Graphics[{Thickness[0.015],Line[totList]}
          ,{GridLines->Automatic
           ,Axes->True}]]
 ]
];

VectorPlot3D[list__List?VectorQ]:= VectorPlot3D[{list}];

VectorPlot3D[list_List?MatrixQ]:= 
Module[{xlist,length,totList},
 xlist=Join[{{0,0,0}},list];
 length=Length[xlist];
 totList=Table[ Sum[ xlist[[i]] ,{i,1,j}],{j,1,length}];
 Return[
  Show[Graphics3D[{Thickness[0.015],Line[totList]}
          ,{ FaceGrids->{{0,0,-1},{0,1,0},{-1,0,0}}
            ,BoxRatios->{1,1,1}
            ,Axes->True}]]
 ]
];

VectorLength[vector_List?VectorQ]:=Sqrt[vector.vector]

Protect[{VectorPlot,VectorPlot3D,VectorLength}];
Off[Clear::wrsym];

2-Dimensional Vectors: Warmup

Define three  2-Dimensional vectors:

Clear["Global`*"];

v1={1,0};
v2={1,1};
v3={-3,1};

VectorPlot[v1,v2,v3];

Find the length of the sum.  Does this match the plot???

VectorLength[v1+v2+v3]

Define 3 2-Dimensional vectors:

3-Dimensional Vectors:  Warmup

Clear["Global`*"];

VectorPlot3D[{1,1,1},{1,-1,-1},{1,2,3}];

Find the length of the sum.  Does this match the plot???

VectorLength[{1,1,1}+{1,-1,-1}+{1,2,3}]

Ch 3: Problem 5

Let us define the 3 vectors needed. We have to work a little bit for v3. Note how I convert from Radians to Degrees. Sorry, but the natural unit for trigonometric functions is Radians.

Clear["Global`*"];

v1={50,0};
v2={0,30};
v3={25 Cos[60/Degree], 25 Sin[60/Degree]} //N

Let us look at the path that the car took.  Can you estimate from the figure the length of the final displacement vector???

VectorPlot[v1,v2,v3];

Let 's compute the total length. Does it match the figure???

v4=v1+v2+v3;
{v4x,v4y}=v4

VectorLength[v1+v2+v3]

Let 's compute the angle. Note I have to convert from Radians to Degrees.

theta=ArcTan[v4y/v4x] /Degree  //N

Ch 3: Problem 9

Here, we get the magnitude and direction. Again, I have to convert

Clear["Global`*"];

r=7.3;
theta=250 Degree

a={r Cos[theta], r Sin[theta]} //N

{ax,ay}=a

Ch 3: Problem 21

This is easy with Mathematica. Give it a try.

Find the vector sum of  c={7.4, -3.8, -6.1} and d={4.4, -2.0, 3.3} where r=c+d

Ch 3: Problem 22

Let's define the necessary vectors.

Clear["Global`*"];

a={4,3};
b={-13,7};
c=a+b

Let's see what they look like. Can you guess at the angle and magnitude of the total vector c???

VectorPlot[a,b];

Let's calculate the length.

VectorLength[c] //N

To find the angle, we need the x and y components of c. Here is an easy way to do it.

{cx,cy}=c

The Tangent is the ratio of y/x.

tanTheta=cy/cx

Now we take the ArcTan (Inverse Tangent) and convert to degrees.

theta=ArcTan[tanTheta] /Degree //N

Note that we get the wrong Quadrant by using the math. Use the figure to see that the correct answer is:

theta+180

Ch 3: Problem 48

Let's define the necessary vectors.

Clear["Global`*"];

a={3,3,3};
b={2,1,3};

Let's calculate the length.

alength=VectorLength[a]

Let's calculate the length.

blength=VectorLength[b]

The cosine is given by:  (Note the DOT product between the vectors a and b.)

cosTheta=a.b/(VectorLength[a] VectorLength[b])

Now we take the ArcCos (Inverse Cosine) and convert to degrees.

theta=ArcCos[cosTheta] /Degree //N

Show[ VectorPlot3D[a],VectorPlot3D[b] ];

Ch 3: Problem 51

Let's define the necessary vectors.  Note that I make both a and b 3-dimensinal vectors by including a zero term for the z component. We only know how to compute a cross product in 3-dimensions.

Clear["Global`*"];

a={3,5,0};
b={2,4,0};

Part a)

The Cross product for vectors was defined by loading in the package LinearAlgebra`CrossProduct  with the command Needs["LinearAlgebra`CrossProduct`"]. Let us see what Mathematica knows about Cross.

?Cross

Let us compute axb.

Cross[a,b]

axb should be the negative of bxa. Is this true???

Cross[b,a]

If I had to do it by hand, I would first define the matrix:

matrix= {{vx,vy,vz},a,b};
matrix //MatrixForm

and then take the Det (determinant) of this matrix.

Det[matrix]

We get the same answer.

You do part b) and c). (They are very easy.)

Two vectors are given by: a={3,5,0} and b={2,4,0}
Find:      a.b      (the dot product)
            (a+b).b
Note, we use the period "." for the dot product. 
Or you can use Dot[a,b]

?.