Home page for accesible maths 1 Vectors

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

1.4 The scalar product

The next important operation on vectors is the scalar product, sometimes called the dot product of two vectors.

Definition 1.7

The scalar product of two vectors (x1xn), (y1yn) in Rn is the real number:

(x1xn)(y1yn)=x1y1++xnyn

Note that 𝐮𝐯 is a scalar (as the name suggests), not a vector!

Example 1.8

Compute uv for the following pairs of vectors: (i) u=(1  3),v=(-1  1), (ii) u=(0  2),v=(1  0), (iii) u=(4-3   1),v=(2  5-1).

Note that we can only calculate the scalar product of two vectors of the same size! So for example, (2  1)(1  0-1) makes no sense.

Theorem 1.9

The scalar product has the following properties:

(i) uv=vu for any u,vRn,

(ii) u(v+w)=uv+uw for any u, v, wRn,

(iii) u(λv)=λ(uv)=(λu)v for any u,vRn, λR.

(iv) uu=|u|2 for any uRn.

Proof

Suppose 𝐮=(u1un), 𝐯=(v1vn), 𝐰=(w1wn).

(i) 𝐮𝐯=u1v1++unvn=v1u1++vnun=𝐯𝐮.

(ii) 𝐮(𝐯+𝐰)=u1(v1+w1)++un(vn+wn)=u1v1++unvn+u1w1++unwn=𝐮𝐯+𝐮𝐰.

(iii) 𝐮(λ𝐯)=u1(λv1)++un(λvn)=λu1v1++λunvn=λ𝐮𝐯.

(iv) 𝐮𝐮=u12++un2. By definition, |𝐮|=u12++un2.

The scalar product and orthogonal vectors

The scalar product is extremely useful for calculating angles between vectors. A special case is when two vectors are at right-angles to each other. For example, consider two vectors going along the two coordinate axes in 2: the unit vector along the x-axis is (1  0), while the unit vector along the y-axis is (0  1). We note that the scalar product of these two vectors is zero: (1  0)(0  1)=10+01=0. Also, the x and y coordinate axes are at right angles to each other. More generally:

Example 1.10

If u is a unit vector at an angle θ to the x-axis and v is a unit vector at an angle (θ+π/2) to the x-axis (i.e. at right-angles to u) then:

𝐮=(cosθsinθ),𝐯=(cos(θ+π2)sin(θ+π2))=(-sinθcosθ)

So in particular, uv=-cosθsinθ+sinθcosθ=0.


This is an incredibly important property! It is also true in n.

Theorem 1.11

Let u and v be two vectors in Rn, and let θ, where 0θπ, be the angle between u and v. Then

𝐮𝐯=|𝐮||𝐯|cosθ

.

Proof

From the law of cosines from trigonometry it follows that

|𝐯-𝐮|2=|𝐮|2+|𝐯|2-2|𝐮||𝐯|cosθ.

Since |𝐯-𝐮|2=(𝐯-𝐮)(𝐯-𝐮) and |𝐮|2=𝐮𝐮 and |𝐯|2=𝐯𝐯, we can rewrite the above equation as

(𝐯-𝐮)(𝐯-𝐮)=𝐮𝐮+𝐯𝐯-2|𝐮||𝐯|cosθ.

Now

(𝐯-𝐮)(𝐯-𝐮) = 𝐯(𝐯-𝐮)-𝐮(𝐯-𝐮)
= 𝐯𝐯-𝐯𝐮-𝐮𝐯+𝐮𝐮
= 𝐮𝐮+𝐯𝐯-2𝐮𝐯.

Thus,

𝐮𝐮+𝐯𝐯-2𝐮𝐯=𝐮𝐮+𝐯𝐯-2|𝐮||𝐯|cosθ.

This gives the result.

Corollary 1.12

Two non-zero vectors u,vRn are orthogonal if and only if uv=0.

Cauchy-Schwarz inequality

The Cauchy-Schwarz inequality - which is a consequence of Thm. 1.11 - is a fundamental result which is often useful in problems of geometric nature.

Theorem 1.13 (Cauchy-Schwarz)

Let u,v be vectors in Rn. Then |uv||u||v|.

Proof

If 𝐮 is not a scalar multiple of 𝐯, then |cosθ|<1 and so the inequality holds. In fact, if 𝐮 and 𝐯 are both non-zero, then strict inequality holds in this case. When 𝐮 is a scalar multiple of 𝐯, then θ equals zero or π and |cosθ|=1, so equality holds in this case.

Let us look at the two extremes that can occur here, which are 𝐮𝐯=|𝐮||𝐯| and 𝐮𝐯=-|𝐮||𝐯|.

Max. value: 𝐮𝐯=|𝐮||𝐯| when 𝐮 and 𝐯 are parallel, and pointing in the same direction,

Min. value: 𝐮𝐯=-|𝐮||𝐯| when 𝐮 and 𝐯 are parallel, but pointing in opposite directions.

Example 1.14

Find the greatest and least values of 2x+3y-z on the sphere x2+y2+z2=1, and find the values of x,y,z for which these values occur.

Let 𝐮=(xyz). The condition x2+y2+z2=1 can be stated in vector form as: |𝐮|=1. The function 2x+3y-z is just 𝐮(2  3-1). But 𝐮(2  3-1)|𝐮||(2  3-1)|=4+9+1=14, so the greatest value of 2x+3y-z is 14. It occurs when 𝐮 is parallel to (2  3-1) and pointing in the same direction, so (xyz)=114(2  3-1).

Similarly, the least value of 2x+3y-z is -14, and it occurs when (xyz)=-114(2  3-1).

Example 1.15

Find the greatest and least values of 3x-y+z+1 on the sphere x2+y2+z2=11.

Using scalar products to calculate angles in Rn

Note that it follows from Thm. 1.11 that the angle θ, where 0θπ, between the non-zero vectors 𝐮 and 𝐯 is given by

θ=cos-1(𝐮𝐯|𝐮||𝐯|).
Example 1.16

Find the angle θ between the vectors u=(3  1) and v=(1  2).

Solution: uv=3+2=5, while |u|2=32+12=10, |v|2=12+22=5, hence |u||v|=52. It follows that cosθ=552=12. Hence θ=π4.

More commonly you may only be asked to determine the cosine of the angle between 𝐮 and 𝐯.

Example 1.17

Find cosθ, where θ is the angle between u=(1  2-1) and v=(-1  1-3).