Chapter 1: Vectors, Lines and Planes
Section 1.3: Dot Product
Example 1.3.2
If A=3 i+2 j+7 k and B=4 i−5 j+6 k,
Obtain A·B
Obtain θ, the angle between A and B
Verify that A2=A·A
Obtain the scalar projection of B on A
Obtain the vector projection of B on A
Obtain the component of B orthogonal to A
For A, obtain direction cosines, angles, and numbers.
Solution
Mathematical Solution
Part (a)
A·B=327·4−56 = 34+2−5+76=12−10+42=44
Part (b)
A2=A·A=327·327=9+4+49=62 ⇒A=62
B2=B·B=4−56·4−56=16+25+36=77 ⇒B=77
θ=cos−1A·BA B=cos−1(4462 77)≐0.88044 radians
Part (c)
In Part (b), the norm of A was found to be 62 by computing A·A.
In Section 1.1, the norm was defined as the square root of the sum of the squares of the components. Hence, calculate
A=32+42+72=9+4+49=62
Part (d)
The vectors A, B, BA and B⊥A are drawn in Figure 1.3.2(a).
The vectors A and B are drawn in red and green, respectively. The vector projection of B on A, namely, BA, which is collinear with A, is drawn as an arrow having a black outline and residing within the arrow representing A.
The scalar projection of B on A is the length of the vector projection, that is
BA = B·AA = 4462≐5.588
Figure 1.3.2(a) Vectors A, B, BA and B⊥A
Part (e)
The vector BA, the vector projection of B on A, is shown in Figure 1.3.2(a). It is obtained by the following calculation.
BA=B·AA·AA = 4462 A = 2231327
Part (f)
The component of B orthogonal to A is the vector B⊥A , shown in blue in Figure 1.3.1(a). It is obtained by the following calculation.
B⊥A=B−BA = 4−56 − 2231327 = 13158−19932
Part (g)
The direction cosines for A are the components of A/A = 3 i+2 j+7 k/62.
Direction Cosines
Direction Angles (in radians)
cosα=3/62
α=cos−13/62≐1.18
cosβ=2/62
β=cos−12/62≐1.31
cosγ=7/62
g=cos−17/62≐0.48
A common multiple of the direction cosines yields a set of direction numbers. Hence, the components of A itself constitute a set of direction numbers.
Maple Solution - Interactive
Data entry
Write A=… as per Table 1.1.1.
Context Panel: Assign Name
A=3,2,7→assign
Write B=… as per Table 1.1.1.
B=4,−5,6→assign
Compute the dot product
Common Symbols palette: Dot-product operator.
Context Panel: Evaluate and Display Inline
A·B = 44
Although Figure 1.3.2(a) could be constructed interactively, its construction is tedious. Below, in the section where a coded solution is given, Maple commands for drawing the figure more efficiently are given.
Begin by installing the Student MultivariateCalculus package since it contains an Angle command, which then becomes available in the Context Panel.
Tools≻Load Package: Student Multivariate Calculus
Loading Student:-MultivariateCalculus
Form a sequence of the names of the two vectors. Context Panel: Evaluate and Display Inline
Context Panel: Student Multivariate Calculus≻Lines & Planes≻Angle
Context Panel: Approximate≻5 (digits)
A,B = →anglearccos⁡2217⁢62⁢77→at 5 digits0.88044
With the Student MultivariateCalculus package installed, the norm of A can be accessed via the Context Panel or via the notation A, as per the note on norms in Section 1.1.
Obtain the square of the 2-norm via standard math notation
A2 = 62
Common Symbols palette: Dot-product operator
A·A = 62
Expression palette: Square root template
Obtain the 2-norm via the Context Panel
Write the name A. Context Panel: Evaluate and Display Inline
Context Panel: Student Multivariate Calculus≻Norm
A = →norm62
There is no Context Panel option for obtaining the square of the norm. Hence, the alternate calculation shows A=A·A instead of A2=A·A.
Implement BA = B·AA using math notation for the norm
Common Symbols palette: Dot product operator
Subscript norm operator with 2.
B·AA2 = 2231⁢62→at 5 digits5.5880
Implement BA = B·AA using Context Panel for the norm
B·A62 = 2231⁢62→at 5 digits5.5880
Implement BA = B·AA as B·AA·A to avoid norm notation
B·AA·A = 2231⁢62→at 5 digits5.5880
The task template, implemented in Table 1.3.2(a), provides a solution for both BA and B⊥A, and in addition, draws a graph of B and its two components.
Tools≻Tasks≻Browse: Linear Algebra≻Visualizations≻Projection Plot onto 1-D
Projection onto 1-D Subspace
Vector to be projected
Project onto
[x,y]other
Table 1.3.2(a) Projection Plot onto 1-D task template
Table 1.3.2(b) implements the calculation of BA via the recipe listed in Table 1.3.1.
B·AA·A A =
Table 1.3.1(b) Computation of BA via the recipe listed in Table 1.3.1.
Table 1.3.2(c) implements the calculation of BA via the Projection option in the Context Panel, an option available only when the Student MultivariateCalculus package is installed.
Write a sequence of the names of the vectors. Context Panel: Evaluate and Display Inline
Context Panel: Student Multivariate Calculus≻Lines & Planes≻Projection
B,A = →projection
Table 1.3.2(c) Computation of BA via the Projection option in the Context Panel
Calculate B⊥A=B−BA
B−B·AA·A A =
Compare this result to that provided in Table 1.3.2(a).
Type the name A. Context Panel: Evaluate and Display Inline
Context Panel: Student Multivariate Calculus≻Normalize
Context Panel: Assign to a Name≻T
A = →normalize →assign to a nameT
Set each direction cosine equal to the appropriate component of T, the normalization of A.
Context Panel: Solve≻Solve
Context Panel: Select Element≻1
cosα=T1→solveα=arccos⁡362⁢62→α=arccos⁡362⁢62→at 5 digitsα=1.1799
cosβ=T2→solveβ=arccos⁡131⁢62→β=arccos⁡131⁢62→at 5 digitsβ=1.3140
cosγ=T3→solveγ=arccos⁡762⁢62→γ=arccos⁡762⁢62→at 5 digitsγ=0.47571
Note: The symbol γ is a special mathematical quantity, which Maple therefore does not treat the same as it would a plane name. Here, it was converted to an atomic identifier, which freezes it as a name distinct from its meaning as a special symbol.
Maple Solution - Coded
As per Table 1.3.2, the Student MultivariateCalculus package contains a DotProduct command defined over the real numbers.
For completeness and clarity, the Coded solutions begin with the execution of a restart command.
Initialize
Execute a restart.
restart
Install the Student MultivariateCalculus package.
withStudent:-MultivariateCalculus:
Define the vectors A and B.
A,B≔3,2,7,4,−5,6:
Compute A·B
Apply the DotProduct command.
DotProductA,B = 44
The following code will draw the vectors in Figure 1.3.2(a). The additional text was added to the figure interactively via the Drawing toolbar.
use Student:-VectorCalculus, plots inmodulelocal A,B,V,p,q,r;A,B≔3,2,7,4,−5,6;V≔Student:-MultivariateCalculus:-ProjectionB,A;p≔spacecurveconvertB,list,convertV,list,numpoints=2, linestyle=dot,color=blue;q≔PlotVectorA,B,V,B−V,color=red,green,black,blue,transparency=.5;r≔displayp,q,scaling=constrained,axes=frame,labels=x,y,z,orientation=−20,75,0,tickmarks=5,4,7,lightmodel=none,glossiness=0;printr;end module:end use:
Recall that the Student MultivariateCalculus package was installed in Part (a).
Compute θ via the Angle command
AngleA,B = arccos⁡2217⁢62⁢77
Compute θ from first principles
arccosDotProductA,BNormA NormB = arccos⁡2217⁢62⁢77
NormA2 = 62
DotProductA,A = 62
DotProductA,BNormA = 2231⁢62
Compute BA via the Projection command in the Student MultivariateCalculus package
ProjectionB,A =
Compute BA from first principles
DotProductB,ADotProductA,A A =
Compute B⊥A via the Projection command in the Student MultivariateCalculus package
B−ProjectionB,A =
Compute B⊥A from first principles
B− DotProductB,ADotProductA,A A =
Use the Normalize command to obtain the vector T=A/A.
T≔NormalizeA:
Direction Angles
cosα=T1
cos⁡α=362⁢62
cos−1T1 = arccos⁡362⁢62→at 5 digits1.1799
cosβ=T2
cos⁡β=131⁢62
cos−1T2 = arccos⁡131⁢62→at 5 digits1.3140
cosγ=T3
cos⁡γ=762⁢62
cos−1T3 = arccos⁡762⁢62→at 5 digits0.47571
<< Previous Example Section 1.3 Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. 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
Download Help Document