Notes to a video lecture on http://www.unizor.com
Vectors+ 03 – Direction Cosines
Problem A
Find three-dimensional vector V(v1,v2,v3) by its magnitude (modulus, length) l and three direction cosines of angles it forms with three axes of coordinates cos(α), cos(β) and cos(γ), where
α is an angle between V and X-axis,
β is an angle between V and Y-axis,
γ is an angle between V and Z-axis.
Solution A
Consider a unit vector along X-axis i(1,0,0).
Its scalar (dot) product with vector V(v1,v2,v3) is
V(v1,v2,v3)·i(1,0,0) = v1
On the other hand, this scalar product is equal to
V·i = |V|·|i|·cos(α) = l·cos(α)
Therefore,
v1 = l·cos(α)
Analogously, considering scalar product of vector V(v1,v2,v3) with unit vectors j(0,1,0) on Y-axis, we’ll get
v2 = l·cos(β)
Similarly, considering scalar product of vector V(v1,v2,v3) with unit vectors k(0,0,1) on Z-axis, we’ll get
v3 = l·cos(γ)
Problem B
A triangle on a coordinate plane is given by coordinates of its three vertices A(a1,a2), B(b1,b2), C(c1,c2).
Find point X(x1,x2) on segment AB that divides this segment in a ratio p/q.
Note B
Use vector algebra.
Solution B
Consider every segment on the picture above as a vector with a direction specified by the order of vertices used in notation.
For example, CA is a vector from vertex C to vertex A.
As a vector, its coordinates are (a1−c1,a2−c2).
Also, notice that vectors AX and XB are collinear, hence the ratio between the length of segment AX to the length of XB is the same as the ratio of vectors AX and XB.
Using this approach, we can form the following equations
CX = CA + AX
CX + XB = CB
q·AX = p·XB
The above system of three vector equations is a linear one and contains three unknown vectors: CX, AX and XB.
Simple transformations will immediately yield the solution.
Resolving the second equation for CX and substituting into the first one result in a system of two equations
CB − XB = CA + AX
q·AX = p·XB
Using the last equation to express AX in terms of XB as AX = (p/q)·XB, we get a single linear equation with one unknown
CB − XB = CA + (p/q)·XB
The solution for XB is
XB = (CB − CA) / (1+p/q)
Expressing the above equation in coordinate form allows to find coordinates of point X(x1,x2).
b1−x1 = [(b1−c1) − (a1−c1)] / (1+p/q)
from which follows
x1 = b1 − [(b1−c1) − (a1−c1)] / (1+p/q)
or
x1 = [(p/q)·b1+a1] / (1+p/q)
or
x1 = (q·a1 + p·b1) / (p+q)
Analogously,
x2 = (q·a2 + p·b2) / (p+q)