Unizor - Scalar Product of Vectors - Geometry
Channel: Zor Shekhtman on UNIZOR Education
Date: 07/01/2014

The purpose of this lecture is to derive a geometric interpretation of a scalar product. We will consider two- and three-dimensional cases separately.

Assume that in the two-dimensional space we have two vectors. Vector a has a length ||a||=A and directed at an angle α from the positive direction of the X-axis. Another vector b has a length ||b||=B and directed at an angle β from the positive direction of the X-axis. Our task is to express their scalar product in terms of their length and an angle between them - their geometrical properties unrelated to coordinates.

Since we know how to express a scalar product in terms of coordinates, let's find the coordinates of these two vectors in terms of their lengths and angles of direction, which will lead us to an expression of a scalar product in the same terms.
The first vector can be represented in coordinate form as
a = (A·cos(α), A·sin(α)).
The second vector can be represented in coordinate form as
b = (B·cos(β), B·sin(β)).
Their scalar product would we equal then
a · b = A·cos(α)·B·cos(β) + A·sin(α)·B·sin(β)

If an angle from the vector a to the vector b is φ, we can replace the angle β with α+φ.
This results in the following modification of the expression for a scalar product.
a · b = A·cos(α)·B·cos(α+φ) + A·sin(α)·B·sin(α+φ)

Using formulas for cosine and sine of a sum of two angles, the above expression is transformed as follows:
a · b =
A·B·cos(α)·
[cos(α)·cos(φ)−sin(α)·sin(φ)] +
A·B·sin(α)·
[sin(α)·cos(φ)+cos(α)·sin(φ)] =

= A·B·cos²(α)·cos(φ) −
A·B·cos(α)·sin(α)·sin(φ) +
A·B·sin²(α)·cos(φ) +
A·B·sin(α)·cos(α)·sin(φ) =
A·B·[cos²(α)+sin²(α)]·cos(φ) =

= A·B·cos(φ)

So, the final expression is
a · b = A·B·cos(φ)

Let's specify the position of a vector a = (a1,a2,a3) in a three-dimensional coordinate system by its length A and two angles: an azimuth angle from the positive direction of the X-axis to a projection of a vector onto XY plane α1 and an altitude angle it forms with an XY plane α2.
In terms of these parameters we can now determine the three coordinates of this vector:
a1 = A·cos(α2)·cos(α1)
a2 = A·cos(α2)·sin(α1)
a3 = A·sin(α2)
Analogously, we can specify the position of a vector b = (b1,b2,b3).
b1 = B·cos(β2)·cos(β1)
b2 = B·cos(β2)·sin(β1)
b3 = B·sin(β2)

The scalar product of these two vectors, as stated in the previous lecture, in terms of coordinates equals
a · b = a1·b1+a2·b2+a3·b3

This same scalar product can be expressed in terms of lengths and angles using the above representation of coordinates:
a · b = A·B·
[cos(α2)·cos(α1)·cos(β2)·cos(β1)+
cos(α2)·sin(α1)·cos(β2)·sin(β1)+
sin(α2)·sin(β2)]

Consider now a triangle formed by an origin of coordinates (0,0,0) and two endpoints of our vectors (a1,a2,a3) and (b1,b2,b3).
The two sides going along the vectors from the origin of the coordinates have lengths A and B, while the square of the third side, according to a known formula of a distance between the two points defined by their coordinates equals to
C² = (a1−b1)²+(a2−b2)²+(a3−b3)²
Let the angle between our two vectors be φ. Applying the Law of Cosines to this triangle, we obtain
C² = A²+B²−2·A·B·cos(φ) or
(a1−b1)²+(a2−b2)²+(a3−b3)² =
A²+B²−2·A·B·cos(φ)

Substituting representation of the coordinates in terms of lengths and angles derived above, we obtain

(a1−b1)² = [A·cos(α2)·cos(α1)−
B·cos(β2)·cos(β1)]² =
A²cos²(α2)cos²(α1)−
2ABcos(α2)cos(α1)cos(β2)cos(β1)+
B²cos²(β2)cos²(β1)

(a2−b2)² = [A·cos(α2)·sin(α1)−
B·cos(β2)·sin(β1)]² =
A²cos²(α2)sin²(α1)−
2ABcos(α2)sin(α1)cos(β2)sin(β1)+
B²cos²(β2)sin²(β1)

(a3−b3)² =
[A·sin(α2)−B·sin(β2)]² =
A²sin²(α2)−2ABsin(α2)sin(β2)+
B²sin²(β2)

The Law of Cosines mentioned above states that the sum of these three expressions equals to
A²+B²−2·A·B·cos(φ)
Performing this summation, notice that
A²cos²(α2)cos²(α1)+
A²cos²(α2)sin²(α1)+
A²sin²(α2) =
A²cos²(α2)[cos²(α1)+sin²(α1)]+
A²sin²(α2) =
A²cos²(α2)+A²sin²(α2) = A²

Similarly,
B²cos²(β2)cos²(β1)+
B²cos²(β2)sin²(β1)+
B²sin²(β2) =
B²cos²(β2)[cos²(β1)+sin²(β1)]+
B²sin²(β2) =
B²cos²(β2)+B²sin²(β2) = B²

Therefore, the sum of three expressions above making a square of a distance from the endpoint of one vector to the endpoint of another equals to
A² + B² − 2AB·
·[cos(α2)cos(α1)cos(β2)cos(β1)+
cos(α2)sin(α1)cos(β2)sin(β1)+
sin(α2)sin(β2)] =
A²+B²−2·A·B·cos(φ)

From this we conclude that
cos(α2)cos(α1)cos(β2)cos(β1)+
cos(α2)sin(α1)cos(β2)sin(β1)+
sin(α2)sin(β2) = cos(φ)

Using this in the expression for a scalar product of our vectors, we obtain the formula for a scalar product in terms of lengths of vectors and an angle between them:
a · b = A·B·cos(φ)