Chapter 1: Vectors, Lines and Planes
Section 1.2: Vector Arithmetic
|
Example 1.2.10
|
|
Obtain , the vector from P: to Q:, then draw it and the position vectors to points P and Q.
|
|
|
|
Solution
|
|
|
Mathematical Solution
|
|
•
|
In Figure 1.2.10(a), the red and green arrows represent the position vectors to points P and Q, respectively.
|
•
|
The black arrow, , the vector from point P to point Q, is the requisite vector.
|
•
|
The gray vector, #, is the translation of back to the origin.
|
•
|
Vector addition gives , so # = .
|
•
|
Translating # yields , the vector from point P to point Q.
|
|
>
|
use plots, Student:-VectorCalculus in
module()
local P,Q,PQ,PQO,p1,p2;
P:=<2,3,-4>;
Q:=<-5,1,7>;
PQO:=Q-P;
PQ:=RootedVector(root=[2,3,-4],Q-P);
p1:=PlotVector([P,Q,PQ,PQO],color=[red,green,black,gray],width=.4);
p2:=display(p1,scaling=constrained,labels=[x,y,z],orientation=[-30,75,0],axes=frame,tickmarks=[5,4,10],lightmodel=none,glossiness=0);
print(p2);
end module:
end use:
|
|
Figure 1.2.10(a) Vectors P, Q, and
|
|
|
|
|
|
|
|
Maple Solution - Interactive
|
|
Enter the data
|
•
|
Context Panel: Assign to a Name≻P
|
|
|
•
|
Context Panel: Assign to a Name≻Q
|
|
|
Obtain
|
•
|
Write the difference of position vectors Q and P.
|
•
|
Context Panel: Evaluate and Display Inline
|
|
=
|
|
|
Obtaining Figure 1.2.10(a) interactively requires that the three main arrows be drawn separately, their colors changed interactively via the Context Panel, and combined via drag-and-drop.
•
|
Type P, Q, and , as appropriate, and press the Enter key
|
•
|
Context Panel: Plots≻Arrow from origin (for P and Q)
Context Panel: Plots≻Arrow from point (for )≻
|
|
•
|
Copy/paste each arrow.
Select arrow
|
|
|
|
|
|
|
|
Changing the color of a three-dimensional arrow drawn via the Context Panel is difficult because the arrow has to be selected via the mouse. The arrow has two parts, the shaft and the head. Naive selection will change the color of one but not the other. Make two separate selections and color-changes per arrow.
|
|
Maple Solution - Coded
|
|
The following sequence of commands will draw the principal vectors in Figure 1.2.10(a). The RootedVector command creates a vector whose "tail" or root is part of the data structure. The PlotVector command makes provision for assigning arbitrary colors to individual vectors.
|
|
|
|
|
|
<< Previous Example Section 1.2
Next Section >>
© Maplesoft, a division of Waterloo Maple Inc., 2025. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
|