with its initial point at the origin O(0,0,0) and terminal point at P(x,y,z). This vector makes angles α,β,γ with the positive x-, y-, and z-axes, respectively.
To measure these angles, we consider right-angled triangles by constructing a cuboid where OP is its diagonal. This is done by drawing three planes parallel to the xy-, yz-, and zx-planes passing through P(x,y,z), as shown in the given figure.
In triangle OAP, we have:
cosα=OPOA=x2+y2+z2x
In triangle OBP, we have:
cosβ=OPOB=x2+y2+z2y
In triangle OCP, we have:
cosγ=OPOC=x2+y2+z2z
Thus, the direction cosines of v are:
l=cosα=∣v∣x,m=cosβ=∣v∣y,n=cosγ=∣v∣z
where
∣v∣=x2+y2+z2.
These cosines describe the orientation of the vector with respect to the coordinate axes.
If cosα>0, then α is an acute angle with the x-axis.
If cosα<0, then α is an obtuse angle with the x-axis.
If cosα=0, the vector is perpendicular to the x-axis.
Similar interpretations hold for cosβ and cosγ.
Also, rewriting v using its magnitude and direction cosines:
Let us now define the concept of Direction Ratios in three-dimensional geometry.
Suppose there is a straight line in R3. Since a straight line has no preferred direction, it is described up to orientation. That is, we are interested in the orientation of the line, not its sense (direction from one end to the other).
To capture the orientation of a line, one may consider any vector that is parallel to it. This vector is not unique. In fact, infinitely many vectors are parallel to a given line, differing only by scalar multiples. If v is parallel to the line, then so is −v, 2v, 51v, and so on.
For example, if v=2i^+j^−k^ is parallel to a line, then so is 4i^+2j^−2k^, since this is just 2v. These vectors are collinear—they lie along the same line in space and preserve the same orientation.
The key observation here is that to describe the orientation of the line, we do not need the exact vector. We only need the proportionality among its components. This leads us to the notion of direction ratios.
Definition:
If a line is parallel to a vector whose components are proportional to a,b,c, then we say that the line has direction ratios(a,b,c).
Direction ratios are numbers that define the relative proportions of a vector's components in the x-, y-, and z-directions. They are free from scaling, i.e., the ratios (a,b,c) and (ka,kb,kc) represent the same direction ratios for any nonzero scalar k. Also, direction ratios do not distinguish between opposite directions—(a,b,c) and (−a,−b,−c) describe the same orientation.
Notation:
Direction ratios are often written as an ordered triple:
(a,b,c)
rather than using the ratio notation a:b:c. This reflects that what matters is the proportional structure among the components, not their magnitude or sign individually.
Example:
If a line has direction ratios (2,1,−1), then a vector parallel to it could be
v=2i^+j^−k^.
Alternatively, one could take
v=4i^+2j^−2k^,orv=−2i^−j^+k^.
All of these define the same orientation of the line.
Direction ratios describe the orientation of a line in space by giving any triple of numbers proportional to the components of a vector parallel to the line. They are independent of magnitude and sense.
The direction ratios of a straight line joining two points
A(x1,y1,z1) and B(x2,y2,z2)
is given by the triple
(x1−x2,y1−y2,z1−z2).
This is because the vector BA is parallel to the line passing through points A and B, and any vector parallel to a line can be used to find its direction ratio.
Let a,b,c be the direction ratios of an undirected line in space. Then the following statements hold:
Any vector of the form
v=ai^+bj^+ck^
is parallel to the line. Conversely, if a vector v is parallel to a line, then the components of v form a valid set of direction ratios for that line.
Two lines are parallel if and only if their direction ratios are proportional. That is, if one line has direction ratios (a1,b1,c1) and another has direction ratios (a2,b2,c2), then the lines are parallel if and only if
a2a1=b2b1=c2c1.
Two lines are perpendicular if and only if the dot product of their direction ratio vectors is zero. That is, lines with direction ratios (a1,b1,c1) and (a2,b2,c2) are perpendicular if and only if
a1a2+b1b2+c1c2=0.
Angle between two lines with direction ratios (a1,b1,c1) and (a2,b2,c2) is given by the cosine formula: