Angle Between Two Lines

The angle between two lines in three-dimensional geometry is defined as the angle between their direction vectors. If two lines do not pass through the same point, we imagine parallel lines through a common point; the angle between these parallel lines is taken as the angle between the original lines.

Vector Form

Let the two lines be L1:r=a1+λb1L_1: \vec{r} = \vec{a}_1 + \lambda\vec{b}_1 L2:r=a2+μb2L_2: \vec{r} = \vec{a}_2 + \mu\vec{b}_2 Here, b1\vec{b}_1 and b2\vec{b}_2 are direction vectors of the two lines. The acute angle θ\theta between the lines is the acute angle between b1\vec{b}_1 and b2\vec{b}_2, so cosθ=b1b2b1b2\cos\theta = \left| \frac{\vec{b}_1 \cdot \vec{b}_2}{|\vec{b}_1| \, |\vec{b}_2|} \right| The modulus sign is used because we usually take the acute angle between two lines.

Cartesian Form

If the lines are written as L1:xx1a1=yy1b1=zz1c1L_1: \frac{x - x_1}{a_1} = \frac{y - y_1}{b_1} = \frac{z - z_1}{c_1} L2:xx2a2=yy2b2=zz2c2L_2: \frac{x - x_2}{a_2} = \frac{y - y_2}{b_2} = \frac{z - z_2}{c_2} then their direction ratios are (a1,b1,c1)(a_1,b_1,c_1) and (a2,b2,c2)(a_2,b_2,c_2) respectively, and cosθ=a1a2+b1b2+c1c2a12+b12+c12a22+b22+c22\cos\theta = \left| \frac{a_1 a_2 + b_1 b_2 + c_1 c_2}{\sqrt{a_1^2 + b_1^2 + c_1^2} \, \sqrt{a_2^2 + b_2^2 + c_2^2}} \right|

Conditions for Perpendicularity and Parallelism

From the formula for the angle between two lines, we get the following important special cases.

1. Perpendicular Lines (θ=90\theta = 90^\circ)

If two lines are perpendicular, then the dot product of their direction vectors is zero.

  • Vector condition: b1b2=0\vec{b}_1 \cdot \vec{b}_2 = 0
  • Cartesian condition: a1a2+b1b2+c1c2=0a_1 a_2 + b_1 b_2 + c_1 c_2 = 0

2. Parallel Lines (θ=0\theta = 0^\circ)

If two lines are parallel, their direction vectors must be scalar multiples of one another.

  • Vector condition: b1=kb2for some scalar k\vec{b}_1 = k\vec{b}_2 \quad \text{for some scalar } k or equivalently b1×b2=0\vec{b}_1 \times \vec{b}_2 = \vec{0}
  • Cartesian condition: a1a2=b1b2=c1c2\frac{a_1}{a_2} = \frac{b_1}{b_2} = \frac{c_1}{c_2} provided the denominators are non-zero, or more generally, the ratios are proportional.

Skew Lines and Shortest Distance

In two dimensions, two lines either intersect or are parallel. In three dimensions, however, there is a third possibility: the lines may be skew.

Skew lines are lines which are neither parallel nor intersecting. They are also non-coplanar.

The shortest distance between two skew lines is the length of the common perpendicular segment joining them.

Shortest Distance Formula (Vector Form)

If the lines are L1:r=a1+λb1L_1: \vec{r} = \vec{a}_1 + \lambda\vec{b}_1 L2:r=a2+μb2L_2: \vec{r} = \vec{a}_2 + \mu\vec{b}_2 then a vector perpendicular to both lines is b1×b2.\vec{b}_1 \times \vec{b}_2. So the shortest distance is the absolute value of the projection of a2a1\vec{a}_2 - \vec{a}_1 on this common normal: d=(a2a1)(b1×b2)b1×b2d = \left| \frac{(\vec{a}_2 - \vec{a}_1) \cdot (\vec{b}_1 \times \vec{b}_2)}{|\vec{b}_1 \times \vec{b}_2|} \right| This formula is valid when the lines are not parallel.

If the numerator becomes zero and the lines are not parallel, then the distance is zero, which means the lines intersect.

Shortest Distance (Cartesian Form) & Parallel Lines

Shortest Distance Formula (Cartesian Form)

If the lines are L1:xx1a1=yy1b1=zz1c1L_1: \frac{x - x_1}{a_1} = \frac{y - y_1}{b_1} = \frac{z - z_1}{c_1} and L2:xx2a2=yy2b2=zz2c2,L_2: \frac{x - x_2}{a_2} = \frac{y - y_2}{b_2} = \frac{z - z_2}{c_2}, then the shortest distance between them is d=x2x1y2y1z2z1a1b1c1a2b2c2(b1c2b2c1)2+(c1a2c2a1)2+(a1b2a2b1)2d = \frac{\left| \begin{vmatrix} x_2 - x_1 & y_2 - y_1 & z_2 - z_1 \\ a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \end{vmatrix} \right|}{\sqrt{(b_1 c_2 - b_2 c_1)^2 + (c_1 a_2 - c_2 a_1)^2 + (a_1 b_2 - a_2 b_1)^2}} provided the lines are not parallel.

Distance Between Two Parallel Lines

If the lines are parallel, say L1:r=a1+λbL_1: \vec{r} = \vec{a}_1 + \lambda\vec{b} L2:r=a2+μb,L_2: \vec{r} = \vec{a}_2 + \mu\vec{b}, then the shortest distance is d=(a2a1)×bbd = \frac{|(\vec{a}_2 - \vec{a}_1) \times \vec{b}|}{|\vec{b}|} Here the numerator means the magnitude of the cross product.

Example 1: Angle Between Lines (Vector Form)

Find the angle between the lines r=(3i^+2j^4k^)+λ(i^+2j^+2k^)\vec{r} = (3\hat{i} + 2\hat{j} - 4\hat{k}) + \lambda(\hat{i} + 2\hat{j} + 2\hat{k}) and r=(5i^2j^)+μ(3i^+2j^+6k^)\vec{r} = (5\hat{i} - 2\hat{j}) + \mu(3\hat{i} + 2\hat{j} + 6\hat{k}).

Solution: Step 1: Identify the direction vectors. b1=i^+2j^+2k^,b2=3i^+2j^+6k^\vec{b}_1 = \hat{i} + 2\hat{j} + 2\hat{k}, \qquad \vec{b}_2 = 3\hat{i} + 2\hat{j} + 6\hat{k}

Step 2: Compute the dot product: b1b2=(1)(3)+(2)(2)+(2)(6)=3+4+12=19\vec{b}_1 \cdot \vec{b}_2 = (1)(3) + (2)(2) + (2)(6) = 3 + 4 + 12 = 19

Step 3: Compute the magnitudes: b1=12+22+22=9=3|\vec{b}_1| = \sqrt{1^2 + 2^2 + 2^2} = \sqrt{9} = 3 b2=32+22+62=49=7|\vec{b}_2| = \sqrt{3^2 + 2^2 + 6^2} = \sqrt{49} = 7

Step 4: Use the angle formula: cosθ=1937=1921\cos\theta = \left|\frac{19}{3 \cdot 7}\right| = \frac{19}{21}

Step 5: Hence, θ=cos1(1921)\theta = \cos^{-1}\left(\frac{19}{21}\right)

Answer: cos1(19/21)\cos^{-1}(19/21)

Example 2: Angle Between Lines (Cartesian Form)

Find the angle between the pair of lines x+33=y15=z+34\frac{x+3}{3} = \frac{y-1}{5} = \frac{z+3}{4} and x+11=y41=z52\frac{x+1}{1} = \frac{y-4}{1} = \frac{z-5}{2}.

Solution: Step 1: Extract the direction ratios. For the first line: (3,5,4)(3,5,4). For the second line: (1,1,2)(1,1,2).

Step 2: Compute the numerator: a1a2+b1b2+c1c2=3(1)+5(1)+4(2)=16a_1a_2 + b_1b_2 + c_1c_2 = 3(1) + 5(1) + 4(2) = 16

Step 3: Compute the magnitudes of the direction vectors: 32+52+42=50=52\sqrt{3^2+5^2+4^2} = \sqrt{50} = 5\sqrt{2} 12+12+22=6\sqrt{1^2+1^2+2^2} = \sqrt{6}

Step 4: Therefore, cosθ=16526=16512=16103=853\cos\theta = \frac{16}{5\sqrt{2}\,\sqrt{6}} = \frac{16}{5\sqrt{12}} = \frac{16}{10\sqrt{3}} = \frac{8}{5\sqrt{3}}

Step 5: Hence, θ=cos1(853)\theta = \cos^{-1}\left(\frac{8}{5\sqrt{3}}\right)

Answer: cos1(853)\cos^{-1}\left(\frac{8}{5\sqrt{3}}\right)

Example 3: Finding an Unknown for Perpendicular Lines

Find the value of pp so that the lines 1x3=7y142p=z32\frac{1-x}{3} = \frac{7y-14}{2p} = \frac{z-3}{2} and 77x3p=y51=6z5\frac{7-7x}{3p} = \frac{y-5}{1} = \frac{6-z}{5} are at right angles.

Solution: Step 1: Rewrite each line in standard symmetric form. For the first line: 1x3=(x1)3=x13\frac{1-x}{3} = \frac{-(x-1)}{3} = \frac{x-1}{-3} 7y142p=7(y2)2p=y22p/7\frac{7y-14}{2p} = \frac{7(y-2)}{2p} = \frac{y-2}{2p/7} So its direction ratios are (3,  2p/7,  2)(-3,\; 2p/7,\; 2)

For the second line: 77x3p=7(x1)3p=x13p/7\frac{7-7x}{3p} = \frac{-7(x-1)}{3p} = \frac{x-1}{-3p/7} 6z5=(z6)5=z65\frac{6-z}{5} = \frac{-(z-6)}{5} = \frac{z-6}{-5} So its direction ratios are (3p/7,  1,  5)(-3p/7,\;1,\;-5)

Step 2: For perpendicular lines, dot product of direction ratios must be zero: (3)(3p7)+(2p7)(1)+(2)(5)=0(-3)\left(-\frac{3p}{7}\right) + \left(\frac{2p}{7}\right)(1) + (2)(-5) = 0

Step 3: Simplify: 9p7+2p710=0\frac{9p}{7} + \frac{2p}{7} - 10 = 0 11p7=10\frac{11p}{7} = 10 11p=7011p = 70 p=7011p = \frac{70}{11}

Answer: 70/1170/11

Example 4: Proving Lines are Perpendicular

Show that the line through the points (1,1,2)(1, -1, 2) and (3,4,2)(3, 4, -2) is perpendicular to the line through the points (0,3,2)(0, 3, 2) and (3,5,6)(3, 5, 6).

Solution: Step 1: Direction ratios of the first line are 31=2,4(1)=5,22=43-1=2, \qquad 4-(-1)=5, \qquad -2-2=-4 So the first line has direction ratios (2,5,4)(2,5,-4).

Step 2: Direction ratios of the second line are 30=3,53=2,62=43-0=3, \qquad 5-3=2, \qquad 6-2=4 So the second line has direction ratios (3,2,4)(3,2,4).

Step 3: Check their dot product: 2(3)+5(2)+(4)(4)=6+1016=02(3) + 5(2) + (-4)(4) = 6 + 10 - 16 = 0

Step 4: Since the dot product is zero, the direction vectors are perpendicular. Hence the lines are perpendicular.

Answer: Proved.

Example 5: Shortest Distance Between Skew Lines (Vector)

Find the shortest distance between the lines L1:r=(i^+2j^+k^)+λ(i^j^+k^)L_1: \vec{r} = (\hat{i} + 2\hat{j} + \hat{k}) + \lambda(\hat{i} - \hat{j} + \hat{k}) and L2:r=(2i^j^k^)+μ(2i^+j^+2k^)L_2: \vec{r} = (2\hat{i} - \hat{j} - \hat{k}) + \mu(2\hat{i} + \hat{j} + 2\hat{k}).

Solution: Step 1: Identify the fixed vectors and direction vectors: a1=i^+2j^+k^,b1=i^j^+k^\vec{a}_1 = \hat{i} + 2\hat{j} + \hat{k}, \quad \vec{b}_1 = \hat{i} - \hat{j} + \hat{k} a2=2i^j^k^,b2=2i^+j^+2k^\vec{a}_2 = 2\hat{i} - \hat{j} - \hat{k}, \quad \vec{b}_2 = 2\hat{i} + \hat{j} + 2\hat{k}

Step 2: Compute a2a1=(21)i^+(12)j^+(11)k^=i^3j^2k^\vec{a}_2 - \vec{a}_1 = (2-1)\hat{i} + (-1-2)\hat{j} + (-1-1)\hat{k} = \hat{i} - 3\hat{j} - 2\hat{k}

Step 3: Find the cross product: b1×b2=i^j^k^111212\vec{b}_1 \times \vec{b}_2 = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ 1 & -1 & 1 \\ 2 & 1 & 2 \end{vmatrix} =i^((1)(2)(1)(1))j^((1)(2)(1)(2))+k^((1)(1)(1)(2))= \hat{i}((-1)(2) - (1)(1)) - \hat{j}((1)(2) - (1)(2)) + \hat{k}((1)(1) - (-1)(2)) =3i^+0j^+3k^= -3\hat{i} + 0\hat{j} + 3\hat{k}

Step 4: Its magnitude is b1×b2=(3)2+02+32=18=32|\vec{b}_1 \times \vec{b}_2| = \sqrt{(-3)^2 + 0^2 + 3^2} = \sqrt{18} = 3\sqrt{2}

Step 5: Compute the dot product: (a2a1)(b1×b2)=(1,3,2)(3,0,3)=3+06=9(\vec{a}_2 - \vec{a}_1) \cdot (\vec{b}_1 \times \vec{b}_2) = (1,-3,-2)\cdot(-3,0,3) = -3 + 0 - 6 = -9

Step 6: Apply the formula: d=932=32=322d = \left|\frac{-9}{3\sqrt{2}}\right| = \frac{3}{\sqrt{2}} = \frac{3\sqrt{2}}{2}

Answer: 322\frac{3\sqrt{2}}{2} units.

Example 6: Shortest Distance (Cartesian Form)

Find the shortest distance between the lines x+17=y+16=z+11\frac{x+1}{7} = \frac{y+1}{-6} = \frac{z+1}{1} and x31=y52=z71\frac{x-3}{1} = \frac{y-5}{-2} = \frac{z-7}{1}.

Solution: Step 1: Identify points and direction ratios. For line 1: A(1,1,1),(a1,b1,c1)=(7,6,1)A(-1,-1,-1), \quad (a_1,b_1,c_1)=(7,-6,1) For line 2: B(3,5,7),(a2,b2,c2)=(1,2,1)B(3,5,7), \quad (a_2,b_2,c_2)=(1,-2,1)

Step 2: Compute differences: x2x1=4,y2y1=6,z2z1=8x_2-x_1=4, \quad y_2-y_1=6, \quad z_2-z_1=8

Step 3: Evaluate the determinant in the numerator: 468761121\begin{vmatrix} 4 & 6 & 8 \\ 7 & -6 & 1 \\ 1 & -2 & 1 \end{vmatrix} =4612167111+87612= 4\begin{vmatrix} -6 & 1 \\ -2 & 1 \end{vmatrix} - 6\begin{vmatrix} 7 & 1 \\ 1 & 1 \end{vmatrix} + 8\begin{vmatrix} 7 & -6 \\ 1 & -2 \end{vmatrix} =4((6)(1)1(2))6(7111)+8(7(2)(6)(1))= 4((-6)(1)-1(-2)) - 6(7\cdot1-1\cdot1) + 8(7(-2)-(-6)(1)) =4(4)6(6)+8(8)=163664=116= 4(-4) - 6(6) + 8(-8) = -16 - 36 - 64 = -116

Step 4: Compute the denominator: (b1c2b2c1)2+(c1a2c2a1)2+(a1b2a2b1)2\sqrt{(b_1c_2-b_2c_1)^2 + (c_1a_2-c_2a_1)^2 + (a_1b_2-a_2b_1)^2} =((6)(1)(2)(1))2+((1)(1)(1)(7))2+((7)(2)(1)(6))2= \sqrt{((-6)(1)-(-2)(1))^2 + ((1)(1)-(1)(7))^2 + ((7)(-2)-(1)(-6))^2} =(4)2+(6)2+(8)2=16+36+64=116= \sqrt{(-4)^2 + (-6)^2 + (-8)^2} = \sqrt{16+36+64} = \sqrt{116}

Step 5: Hence, d=116116=116=229d = \left|\frac{-116}{\sqrt{116}}\right| = \sqrt{116} = 2\sqrt{29}

Answer: 2292\sqrt{29} units.

Example 7: Distance Between Parallel Lines

Find the distance between the lines L1:r=(i^+2j^4k^)+λ(2i^+3j^+6k^)L_1: \vec{r} = (\hat{i} + 2\hat{j} - 4\hat{k}) + \lambda(2\hat{i} + 3\hat{j} + 6\hat{k}) and L2:r=(3i^+3j^5k^)+μ(2i^+3j^+6k^)L_2: \vec{r} = (3\hat{i} + 3\hat{j} - 5\hat{k}) + \mu(2\hat{i} + 3\hat{j} + 6\hat{k}).

Solution: Step 1: Since both lines have the same direction vector, b=2i^+3j^+6k^,\vec{b} = 2\hat{i} + 3\hat{j} + 6\hat{k}, the lines are parallel.

Step 2: Compute a2a1=(31)i^+(32)j^+(5+4)k^=2i^+j^k^\vec{a}_2 - \vec{a}_1 = (3-1)\hat{i} + (3-2)\hat{j} + (-5+4)\hat{k} = 2\hat{i} + \hat{j} - \hat{k}

Step 3: Find the cross product: (a2a1)×b=i^j^k^211236(\vec{a}_2 - \vec{a}_1) \times \vec{b} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ 2 & 1 & -1 \\ 2 & 3 & 6 \end{vmatrix} =9i^14j^+4k^= 9\hat{i} - 14\hat{j} + 4\hat{k}

Step 4: Compute magnitudes: (a2a1)×b=92+(14)2+42=293|(\vec{a}_2 - \vec{a}_1) \times \vec{b}| = \sqrt{9^2 + (-14)^2 + 4^2} = \sqrt{293} b=22+32+62=49=7|\vec{b}| = \sqrt{2^2+3^2+6^2} = \sqrt{49} = 7

Step 5: Use the parallel-line distance formula: d=2937d = \frac{\sqrt{293}}{7}

Answer: 293/7\sqrt{293}/7 units.

Example 8: Checking if Lines Intersect

Show that the lines x12=y23=z34\frac{x-1}{2} = \frac{y-2}{3} = \frac{z-3}{4} and x45=y12=z\frac{x-4}{5} = \frac{y-1}{2} = z intersect.

Solution: Step 1: Write the second line in standard form: x45=y12=z01\frac{x-4}{5} = \frac{y-1}{2} = \frac{z-0}{1} So its direction ratios are (5,2,1)(5,2,1).

Step 2: For the first line, the direction ratios are (2,3,4)(2,3,4) and a point on it is (1,2,3)(1,2,3). For the second line, a point on it is (4,1,0)(4,1,0).

Step 3: Check the determinant condition for coplanarity/intersection: 411203234521=313234521\begin{vmatrix} 4-1 & 1-2 & 0-3 \\ 2 & 3 & 4 \\ 5 & 2 & 1 \end{vmatrix} = \begin{vmatrix} 3 & -1 & -3 \\ 2 & 3 & 4 \\ 5 & 2 & 1 \end{vmatrix} Evaluating, =3(38)(1)(220)+(3)(415)= 3(3-8) - (-1)(2-20) + (-3)(4-15) =1518+33=0= -15 - 18 + 33 = 0

Step 4: Since the determinant is zero, the lines are coplanar. Also, their direction ratios are not proportional, so they are not parallel. Therefore, the coplanar non-parallel lines must intersect.

Answer: Proved.

Example 9: Finding the Point of Intersection

Find the intersection point of the lines x12=y23=z34\frac{x-1}{2} = \frac{y-2}{3} = \frac{z-3}{4} and x45=y12=z\frac{x-4}{5} = \frac{y-1}{2} = z.

Solution: Step 1: Parametrize both lines. For the first line, let the common value be λ\lambda: x=2λ+1,y=3λ+2,z=4λ+3x=2\lambda+1, \quad y=3\lambda+2, \quad z=4\lambda+3 So a general point is P(2λ+1,  3λ+2,  4λ+3)P(2\lambda+1,\;3\lambda+2,\;4\lambda+3)

For the second line, let the common value be μ\mu: x=5μ+4,y=2μ+1,z=μx=5\mu+4, \quad y=2\mu+1, \quad z=\mu So a general point is Q(5μ+4,  2μ+1,  μ)Q(5\mu+4,\;2\mu+1,\;\mu)

Step 2: At the point of intersection, coordinates must be equal: 2λ+1=5μ+4...(1)2\lambda+1 = 5\mu+4 \quad ...(1) 3λ+2=2μ+1...(2)3\lambda+2 = 2\mu+1 \quad ...(2) 4λ+3=μ...(3)4\lambda+3 = \mu \quad ...(3)

Step 3: From (3), μ=4λ+3\mu = 4\lambda + 3 Substitute into (1): 2λ+1=5(4λ+3)+42\lambda+1 = 5(4\lambda+3) + 4 2λ+1=20λ+192\lambda+1 = 20\lambda+19 18λ=18-18\lambda = 18 λ=1\lambda = -1 Then μ=4(1)+3=1\mu = 4(-1)+3 = -1

Step 4: Verify in (2): 3(1)+2=1,2(1)+1=13(-1)+2 = -1, \qquad 2(-1)+1 = -1 So it is consistent.

Step 5: Substitute λ=1\lambda=-1 in the first line: x=2(1)+1=1x = 2(-1)+1 = -1 y=3(1)+2=1y = 3(-1)+2 = -1 z=4(1)+3=1z = 4(-1)+3 = -1

Answer: (1,1,1)(-1, -1, -1)

Example 10: Complex Skew Lines Problem

Find the shortest distance between the lines defined by r=(1t)i^+(t2)j^+(32t)k^\vec{r} = (1-t)\hat{i} + (t-2)\hat{j} + (3-2t)\hat{k} and r=(s+1)i^+(2s1)j^(2s+1)k^\vec{r} = (s+1)\hat{i} + (2s-1)\hat{j} - (2s+1)\hat{k}.

Solution: Step 1: Rewrite each line in standard vector form. For the first line, r=(i^2j^+3k^)+t(i^+j^2k^)\vec{r} = (\hat{i} - 2\hat{j} + 3\hat{k}) + t(-\hat{i} + \hat{j} - 2\hat{k}) So, a1=i^2j^+3k^,b1=i^+j^2k^\vec{a}_1 = \hat{i} - 2\hat{j} + 3\hat{k}, \qquad \vec{b}_1 = -\hat{i} + \hat{j} - 2\hat{k}

For the second line, r=(i^j^k^)+s(i^+2j^2k^)\vec{r} = (\hat{i} - \hat{j} - \hat{k}) + s(\hat{i} + 2\hat{j} - 2\hat{k}) So, a2=i^j^k^,b2=i^+2j^2k^\vec{a}_2 = \hat{i} - \hat{j} - \hat{k}, \qquad \vec{b}_2 = \hat{i} + 2\hat{j} - 2\hat{k}

Step 2: Compute a2a1=(0)i^+j^4k^\vec{a}_2 - \vec{a}_1 = (0)\hat{i} + \hat{j} - 4\hat{k}

Step 3: Compute the cross product: b1×b2=i^j^k^112122\vec{b}_1 \times \vec{b}_2 = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ -1 & 1 & -2 \\ 1 & 2 & -2 \end{vmatrix} =2i^4j^3k^= 2\hat{i} - 4\hat{j} - 3\hat{k}

Step 4: Its magnitude is b1×b2=22+(4)2+(3)2=29|\vec{b}_1 \times \vec{b}_2| = \sqrt{2^2 + (-4)^2 + (-3)^2} = \sqrt{29}

Step 5: Compute the scalar triple product: (a2a1)(b1×b2)=(0,1,4)(2,4,3)=04+12=8(\vec{a}_2 - \vec{a}_1) \cdot (\vec{b}_1 \times \vec{b}_2) = (0,1,-4)\cdot(2,-4,-3) = 0 - 4 + 12 = 8

Step 6: Therefore, d=829=829d = \left|\frac{8}{\sqrt{29}}\right| = \frac{8}{\sqrt{29}}

Answer: 8/298/\sqrt{29} units.