P4 7.7 - The scalar product

P4 7.7 - The scalar product

Use the scalar product to connect vector components with angles and perpendicular directions. Choose the correct arrows for an angle, distinguish vectors from lines, and solve geometric problems by finding a perpendicular foot.

Component and angle definitions

How can component arithmetic tell us whether two directions make an acute angle or an obtuse one? A single number, the scalar product, carries this information.

Take a=3i\mathbf a=3\mathbf i and b=2i+2j\mathbf b=2\mathbf i+2\mathbf j. The products of matching components add to 3(2)+0(2)=63(2)+0(2)=6. Reverse b\mathbf b, and the same calculation gives −6-6. The sign responds to direction, even though neither arrow's length changes.

Scalar product

For a=(a1a2a3)\mathbf a=\begin{pmatrix}a_1\\a_2\\a_3\end{pmatrix} and b=(b1b2b3)\mathbf b=\begin{pmatrix}b_1\\b_2\\b_3\end{pmatrix}, their scalar product, or dot product, is

a⋅b=a1b1+a2b2+a3b3.\mathbf a\cdot\mathbf b=a_1b_1+a_2b_2+a_3b_3.

The answer is a scalar, not a vector. In two dimensions, omit the third product.

For nonzero vectors, draw both arrows from one point and let θ\theta, between 0∘0^\circ and 180∘180^\circ, be their angle. The cosine rule gives

∣a−b∣2=∣a∣2+∣b∣2−2∣a∣∣b∣cos⁡θ.|\mathbf a-\mathbf b|^2 =|\mathbf a|^2+|\mathbf b|^2-2|\mathbf a||\mathbf b|\cos\theta.

Expanding the squared components of a−b\mathbf a-\mathbf b gives the same first two terms, followed by −2(a1b1+a2b2+a3b3)-2(a_1b_1+a_2b_2+a_3b_3). Comparing the expressions explains the angle form.

Geometric scalar product

a⋅b=∣a∣∣b∣cos⁡θ(a≠0, b≠0).\mathbf a\cdot\mathbf b=|\mathbf a||\mathbf b|\cos\theta \quad(\mathbf a\ne\mathbf0,\ \mathbf b\ne\mathbf0).

The component and angle forms are not printed in the P1–P4 formula booklet: learn them.

The component definition also gives a⋅b=b⋅a\mathbf a\cdot\mathbf b=\mathbf b\cdot\mathbf a and a⋅a=∣a∣2\mathbf a\cdot\mathbf a=|\mathbf a|^2. It distributes over addition, so a⋅(b+c)=a⋅b+a⋅c\mathbf a\cdot(\mathbf b+\mathbf c)=\mathbf a\cdot\mathbf b+\mathbf a\cdot\mathbf c. Expanding (a+b)⋅(a+b)(\mathbf a+\mathbf b)\cdot(\mathbf a+\mathbf b) therefore gives the useful check ∣a+b∣2=∣a∣2+∣b∣2+2a⋅b|\mathbf a+\mathbf b|^2=|\mathbf a|^2+|\mathbf b|^2+2\mathbf a\cdot\mathbf b.

Worked example 1: a negative scalar product

Question. For a=(12−2)\mathbf a=\begin{pmatrix}1\\2\\-2\end{pmatrix} and b=(2−13)\mathbf b=\begin{pmatrix}2\\-1\\3\end{pmatrix}, find a⋅b\mathbf a\cdot\mathbf b.

Plan. Multiply corresponding entries and add the three products, retaining their signs.

a⋅b=1(2)+2(−1)+(−2)(3)=2−2−6=−6.\mathbf a\cdot\mathbf b=1(2)+2(-1)+(-2)(3)=2-2-6=-6.

Answer. −6-6.

Check. a+b=(311)\mathbf a+\mathbf b=\begin{pmatrix}3\\1\\1\end{pmatrix}, giving squared magnitude 1111. Independently, ∣a∣2+∣b∣2+2(a⋅b)=9+14−12=11|\mathbf a|^2+|\mathbf b|^2+2(\mathbf a\cdot\mathbf b)=9+14-12=11.

Change only the last component of b\mathbf b. This changes just one of the three products.

Worked example 2: a positive scalar product

Question. For the same a\mathbf a and c=(2−1−3)\mathbf c=\begin{pmatrix}2\\-1\\-3\end{pmatrix}, find a⋅c\mathbf a\cdot\mathbf c.

Plan. Keep the first two products and recalculate the final signed product.

a⋅c=1(2)+2(−1)+(−2)(−3)=2−2+6=6.\mathbf a\cdot\mathbf c=1(2)+2(-1)+(-2)(-3)=2-2+6=6.

Answer. 66.

Check. a+c=(31−5)\mathbf a+\mathbf c=\begin{pmatrix}3\\1\\-5\end{pmatrix}, giving squared magnitude 3535; independently, 9+14+2(6)=359+14+2(6)=35.

Because both magnitudes are positive, the sign of the scalar product is the sign of cos⁡θ\cos\theta: positive when 0∘≤θ<90∘0^\circ\le\theta<90^\circ, zero at 90∘90^\circ, and negative when 90∘<θ≤180∘90^\circ<\theta\le180^\circ. The endpoints 0∘0^\circ and 180∘180^\circ describe parallel arrows pointing in the same and opposite directions respectively.

Watch out

a⋅b\mathbf a\cdot\mathbf b is a sum of component products. It is not the column (a1b1a2b2a3b3)\begin{pmatrix}a_1b_1\\a_2b_2\\a_3b_3\end{pmatrix}, and it does not generally equal ∣a∣∣b∣|\mathbf a||\mathbf b|.

Calculate one scalar for the next pair.

Angles between vectors and lines

An angle between directed vectors can be obtuse, while the acute angle between their lines ignores which way each direction arrow points.

Rearrange the geometric product to find the vector angle:

cos⁡θ=a⋅b∣a∣∣b∣.\cos\theta=\frac{\mathbf a\cdot\mathbf b}{|\mathbf a||\mathbf b|}.

Use cos⁡−1\cos^{-1} in the requested angle unit. Keep exact scalar products and magnitudes until the final calculation. A value outside [−1,1][-1,1] indicates an error, apart from a tiny rounding discrepancy at an endpoint.

Smaller angle between lines

For nonzero direction vectors b\mathbf b and d\mathbf d, the smaller angle α\alpha between the lines satisfies

cos⁡α=∣b⋅d∣∣b∣∣d∣,0∘≤α≤90∘.\cos\alpha=\frac{|\mathbf b\cdot\mathbf d|}{|\mathbf b||\mathbf d|}, \qquad 0^\circ\le\alpha\le90^\circ.

The same direction comparison works for skew lines after translating their direction arrows to a common point. This form is derived from the scalar product and is not separately printed in the formula booklet.

The endpoint 0∘0^\circ describes parallel directions, and 90∘90^\circ describes perpendicular directions. If a question instead names a triangle angle, use arrows pointing away from its stated vertex; that angle can be obtuse.

[DIAGRAM: asset_name: Reversing an arrow changes the vector angle; asset_slug: p4-vector-line-angles; caption: Reversing one arrow makes the vector angle supplementary, while the smaller line angle stays the same.; description: Two panels show a horizontal vector a and a vector b with angle theta equal to arccos four ninths, about 63.6 degrees. The second reverses b, giving vector angle 180 minus theta, about 116.4 degrees. Dashed extensions show the underlying lines and retain the same acute angle.]
Reversing one arrow makes the vector angle supplementary, while the smaller line angle stays the same.

Worked example 3: an acute vector angle

Question. For a=(122)\mathbf a=\begin{pmatrix}1\\2\\2\end{pmatrix} and b=(2−12)\mathbf b=\begin{pmatrix}2\\-1\\2\end{pmatrix}, find their vector angle and the acute angle between lines in their directions. Give angles to one decimal place.

Plan. Calculate the product and both magnitudes, then use the angle formula.

a⋅b=2−2+4=4,∣a∣=∣b∣=3.\mathbf a\cdot\mathbf b=2-2+4=4, \qquad |\mathbf a|=|\mathbf b|=3. θ=cos⁡−1(49)=63.6∘ to 1 d.p.\theta=\cos^{-1}\left(\frac49\right)=63.6^\circ\ \text{to 1 d.p.}

Answer. The vector angle and the acute line angle are both 63.6∘63.6^\circ.

Check. The scalar product is positive, so the vector angle must be acute. Also 9cos⁡θ=49\cos\theta=4 before rounding.

Reverse only b\mathbf b. This keeps its line and magnitude, but changes the sign of the product.

Worked example 4: an obtuse vector angle

Question. With the same a\mathbf a and c=−b=(−21−2)\mathbf c=-\mathbf b=\begin{pmatrix}-2\\1\\-2\end{pmatrix}, find their vector angle and the acute angle between lines in their directions, to one decimal place.

Plan. Use the signed product for vectors and its absolute value for the smaller line angle.

a⋅c=−4,∣c∣=3,θ=cos⁡−1(−49)=116.4∘.\mathbf a\cdot\mathbf c=-4,\qquad |\mathbf c|=3, \qquad\theta=\cos^{-1}\left(-\frac49\right)=116.4^\circ. α=180∘−θ=63.6∘.\alpha=180^\circ-\theta=63.6^\circ.

Answer. Vector angle 116.4∘116.4^\circ; acute line angle 63.6∘63.6^\circ, to one decimal place.

Check. The two vector angles add to 180∘180^\circ. Reversing a direction vector cannot change the underlying line.

The direction vectors determine the line angle; the starting position vectors do not.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account