Chapter 1: Vectors, Lines and Planes
Section 1.3: Dot Product
Using the law of cosines, verify the equivalence of A·B and ABcos(θ)
Apply the law of cosines, namely,
c2=a2+b2−2 a b cosθ
to the triangle formed by the vectors A (in red), B (in green), and B−A (in black) in Figure 1.3.3(a). The angle θ is formed by the vectors A and B.
Setting a=A, b=B, and c=B−A in the law of cosines leads to the following.
Figure 1.3.3(a) Triangle formed by vectors A, B, and B−A
= a2+b2−2 a b cosθ
= A2+ B2 −2A B cos(θ)
= A·A+B·B−2A B cos(θ)
= −2A B cos(θ)
= A B cos(θ)
Maple Solution - Interactive
Load the Student LinearAlgebra package so that the norm of a vector defaults to the Euclidean norm. Then define the A and B as generic vectors in ℝ3.
Tools≻Load Package: Student Multivariate Calculus
Define A as per Table 1.1.1.
Context Panel: Assign Name
Define B as per Table 1.1.1.
Obtain the dot product of A and B
Common Symbols palette: Dot-product operator
Context Panel: Evaluate and Display Inline
A·B = a1⁢b1+a2⁢b2+a3⁢b3
Write the law of cosines in the form a b cosθ=a2+b2−c2/2.
Apply this to the vectors A, B, and B−A in the triangle in Figure 1.3.3(a).
Write the expression corresponding to the numerator a2+b2−c2 and press the Enter key.
Context Panel: Expand≻Expand
Using the equation label (implement with Control L), divide the expanded expression by 2
A 2+∥ B ∥2−B−A2
In terms of components, and using the law of cosines, these calculations show that
A·B=a1⁢b1+a2⁢b2+a3⁢b3=A B cos(θ)
Maple Solution - Coded
The following calculations will establish that
A·B=a1⁢b1+a2⁢b2+a3⁢b3=A B cos(θ), as per the remarks above about the use of the law of cosines.
Install the Student MultivariateCalculus package.
Define the vectors A and B.
Compute the dot product
Apply the DotProduct command".
Obtain A2, B2, and B−A2
Apply the Norm command to vectors A, B, and B−A.
Combine to obtain (∥ A ∥2+ B 2−∥B−A∥2)/2
Use equation labels and apply the expand command.
<< Previous Example Section 1.3
Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2023. 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
What kind of issue would you like to report? (Optional)