Vectors in 3D
You may need the mvcal package
Here are some exercises to be done with MAPLE.
We'll go over some of them in class or recitation.
Module 03 -- WorkSheet Name : ________________________________
1) a) Make up a vector v. Rewrite in the coordinates form ( , , ).
b) Store the vector in Maple.
> with (linalg) ;
> v := vector( [ , , ] ) ;
#(Type in the coordinates of the vector )
c) Make up another vector w. Make sure is not a scalar multiple of.
Rewrite w in the form ( , , ). Then store it in Maple.
> w := vector( [ , , ] ) ;
#d) Now calculate the following by hand :
v + w = ______________ 5 v - 3 w = ________________
e) Check your calculation with Maple :
> evalm (v + w) ;
> evalm ( 5*v - 3*w ) ;
#f) Calculate (by hand) v dot w = _______________.
g) Check your answer with Maple :
> dotprod (v, w) ;
#h) Calculate (by hand) the cosine of the angle between v and w :
cos(theta) = ______________
Tell from this answer if the angle between the two vectors is less than, equal
to or greater than Pi/2 .
Ans : ______________________ Explain : _______________
i) To find the exact value of theta:
> evalf( arccos( ) );
#To check your calculation with Maple :
> evalf( angle (v, w) );
#2) a) Make up two vectors : v, w. Make sure that w is not a scalar
multiple of v.
> with (linalg) ;
> v := vector( [ , , ] ) ; w := vector([ ,
, ]) ;
#The commands :
> with( mvcal) : arrows( { [ , , ] , [ , , ] } );
#will show the vectors and .
b) Calculate (by hand) the vector "projection of v onto w" = __.
c) Check your answer in b) with Maple :
> proj := evalm( dotprod(v, w)/dotprod(w,w) * w );
#d) Is it true that proj. v on w = proj. w on v?
Ans : _____________, Explain ____________________
e) When we calculate (v - proj(v,w)) dot w , the answer is 0, see :
> dotprod ( (v -proj), w ) ;
#Can you explain why ?
Reason _____________________________________________________
3) Use the vectors and in the last two problems.
> v := vector( [ , , ] ) ; w := vector( [ , , ] ) ;
#a) Calculate v cross w by hand. Let us call this vector u.
u = ________________
b) Check your calculation with :
> u := crossprod( v, w) ;
#To see the picture of , and , you can type in the coefficients of and :
> crossproduct( [ , , ], [ , , ] ,init = [0 ,0, 0] ) ;
#c)The last vector (0,0,0) in the previous command specifies
the staring point of all the vectors. If we choose a
different starting point, say ( 1,-2, 1), then u will be the
vector joining (1, -2, 1) to which point ?
Ans ____________________. Check your answer from the picture :
> crossproduct( [ , , ], [ , , ] , init = [1 ,-2, 1] ) ;
#d) Now, try the following calculations using Maple :
> dotprod( v, u) ; dotprod( w, u) ; dotprod( 0.21*v + 0.5*w, u) ;
> dotprod(100*v-0.6*w, u) ;
Can you explain why all the answers in the above calculations are zero ?
(Remember u = v x w.)
Reason : ___________________________________________________________