Laboratory 2
Vectors, Dot Products, and Cross Products
Name:

Code

vector[a_,b_,c_:0]:=If[c==0,Return[Graphics[{Arrowheads[Medium],Arrow[{a,b}]}]],Return[Graphics[{Hue[c],Arrowheads[Medium],Arrow[{a,b}]}]]]

vector3d[a_,b_,c_:0]:=Module[{d},
d=Norm[b-a];
If[c==0,Return[Graphics3D[{Thick,Black,Line[{a,b}],Translate[Rotate[Scale[Table[{EdgeForm[],Polygon[{{.25Cos[j(Pi/6)],.25Sin[j(Pi/6)],0},{.25Cos[(j+1)(Pi/6)],.25Sin[(j+1)(Pi/6)],0},{0,0,1}}]},{j,0,11}],d/10,{0,0,0}],{{0,0,1},b-a}],(9b+a)/10]}]],
Return[Graphics3D[{Thick,Hue[c],Line[{a,b}],Translate[Rotate[Scale[Table[{EdgeForm[],Polygon[{{.25Cos[j(Pi/6)],.25Sin[j(Pi/6)],0},{.25Cos[(j+1)(Pi/6)],.25Sin[(j+1)(Pi/6)],0},{0,0,1}}]},{j,0,11}],d/10,{0,0,0}],{{0,0,1},b-a}],(9b+a)/10]}]]
]
]

Experiment 2.1

1. For the vectors (OverVector[v])=(1,-3) and (OverVector[w])=(2,-4), plot the vectors (OverVector[v]), (OverVector[w]), and (OverVector[v])-(OverVector[w]) on the same graph, with the last of these in red. Plot the vector starting at (OverVector[w]) and ending at (OverVector[v]) on the graph as well. What is the relationship between this vector and the vector (OverVector[v])-(OverVector[w])?

2. For given vectors (OverVector[v])=(1,1,0) and (OverVector[w])=(-1,0,2), plot the vectors (OverVector[v]), (OverVector[w]), (OverVector[v])+(OverVector[w]), and (OverVector[v])-(OverVector[w]) on the same graph, with the last of these in red. Plot the vector starting at (OverVector[w]) and ending at (OverVector[v]) on the graph as well. What is the relationship between this vector and the vector (OverVector[v])-(OverVector[w])?

Experiment 2.2

1. Let (OverVector[v])=(2,1,0) and (OverVector[w])=(-1,-3,1). Compute  (OverVector[v])·(OverVector[w]), (OverVector[v])×(OverVector[w]), the length of (OverVector[v]), the length of (OverVector[w]), and the angle between two vectors in degree measure. Give a graph that shows (OverVector[v]), (OverVector[w]), and the vector (OverVector[v])×(OverVector[w]).

Experiment 2.3a

1. Find a unit vector that is perpendicular to each of (OverVector[a])=(1,2,1) and (OverVector[b])=(-2,2,-1). Include a graph.

Experiment 2.3b

1. Find the area of the triangle whose vertices are the points (1,3,5), (3,3,0), and (-2,0,5).

Experiment 2.3c

Use Mathematica to prove that |(OverVector[v])×(OverVector[w])((|)^2)=|(OverVector[v])((|)^2)|(OverVector[w])((|)^2)-((((OverVector[v])·(OverVector[w])))^2), where v,w, are arbitrary vectors in space.