Friday, July 26, 2024

Vectors+ 02 Angle between vectors: UNIZOR.COM - Math+ & Problems - Vectors

Notes to a video lecture on http://www.unizor.com

Vectors+ 02

Problem A

Unknown vector X(x1,x2) is defined as a linear combination of given non-collinear vectors A(a1,a2) and B(b1,b2):
X = a·A + b·B.
Find the coefficients γ and δ in representation of the same vector X as a linear combination of another pair of given non-collinear vectors C(c1,c2) and D(d1,d2):
X = γ·C + δ·D

Solution A

Straight forward method would be to express existing equations in coordinate form.
The following pair defines unknown x1 and x2 from equation X=a·A+b·B
x1 = a·a1 + b·b1
x2 = a·a2 + b·b2
Then, using them as known variables, the second pair of equations defines unknown coefficients γ and β from equation X=γ·C+δ·D
x1 = γ·c1 + δ·d1
x2 = γ·c2 + δ·d2
This is a simple algebraic problem of solving a system of two linear equations with two unknowns γ and δ.
Its solution is
γ =
d2·x1−d1·x2
c1·d2−c2·d1
δ =
c1·x2−c2·x1
c1·d2−c2·d1
where x1 and x2 were defined above in terms of a, b, a1, a2, b1, b2.


Problem B

Two vectors in two-dimensional space are presented on a picture below.

Find the cosine of an angle between them.

Solution B1

Recall that a scalar (dot) product of two vectors X and Y equals to a product of their magnitudes (moduli, lengths) by a cosine of an angle φ between them:
X · Y = |X| · |Y| · cos(φ)
from which we can easily express cosine of an angle between these vectors in terms of their scalar product and magnitudes.

On the other hand, the same scalar product and magnitudes can be expressed in coordinate form, which can be easily derived from a picture.

Our two vectors in coordinate form are
RED(4,−4)
BLUE(2,4)

Their scalar product is
RED · BLUE = 4·2 − 4·4 = −8

Their magnitudes are
|RED| = 4√2
|BLUE| = 2√5

Now, dividing scalar product by a product of magnitudes, we can get a cosine of an angle between these vectors.
cos(φ) = −8/(8√10) = −1/√10

Calculations show the approximate result
arccos(−0.316227766) =
= 108.434949°

that is slightly more than 90°, which does look like on the picture above.

Solution B2

Let's solve this problem trigonometrically.
Start with bringing both vectors to the same beginning point - the origin of coordinates. The RED vector will have the coordinates of its tip X(4,−4), while the BLUE one will have the coordinates of its tip Y(2,4).

So, we have to determine a cos(∠XOY)

To simplify our work, consider point Z(4,4).
Obviously, ∠XOZ=90° and
∠XOY = ∠YOZ + 90°
In its turn,
∠YOZ = α − β
Knowing sin(α), cos(α), sin(β) and cos(β), we can easily evaluate any trigonometric function of α−β and, from it, any trigonometric function of ∠XOY=α−β+90°.

Length of OY is 2√5. Therefore,
sin(α) = 4/(2√5) = 2/√5
cos(α) = 2/(2√5) = 1/√5
Length of OZ is 4√2. Therefore,
sin(β) = 4/(4√2) = 1/√2
cos(β) = 4/(4√2) = 1/√2

From this
sin(α−β) =
= sin(α)·cos(β) − cos(α)·sin(β) =
= (2/√5)·(1/√2) − (1/√5)·(1/√2) =
= 1/√10


Using trigonometric identity
cos(φ+90°) = −sin(φ)
we derive
cos(∠XOY) = cos(α−β+90°) =
= −sin(α−β) = −1/√10

which is exactly what we have calculated in Solution B1.

No comments: