```html

Equation of a Line in Space

In three-dimensional space, a line can be uniquely defined by a point it passes through and its direction. There are several ways to represent the equation of a line in space.

Vector Form

Let a line pass through a point with position vector a and be parallel to a vector b. If r is the position vector of any arbitrary point P on the line, then the vector AP is parallel to b. The vector AP can be represented as r - a. Since r - a is parallel to b, we can write r - a = λb, where λ is a scalar parameter. Therefore, the vector equation of the line is:

r = a + λb

Here, a is the position vector of a known point on the line, b is the direction vector of the line, and λ is the parameter. As λ varies over all real numbers, r traces out all points on the line.

Cartesian Form

Let the line pass through a point A with coordinates (x0, y0, z0) and be parallel to a direction vector b with direction ratios p, q, r. Let P(x, y, z) be any arbitrary point on the line. The position vector of A is a = x0i + y0j + z0k, and the direction vector b can be written as b = pi + qj + rk. The position vector of P is r = xi + yj + zk. Substituting these into the vector equation r = a + λb: xi + yj + zk = (x0i + y0j + z0k) + λ(pi + qj + rk) xi + yj + zk = (x0 + λp)i + (y0 + λq)j + (z0 + λr)k Equating the coefficients of i, j, and k: x = x0 + λp => λ = (x - x0) / p y = y0 + λq => λ = (y - y0) / q z = z0 + λr => λ = (z - z0) / r Equating the expressions for λ, we get the Cartesian equation of the line:

(x - x0) / p = (y - y0) / q = (z - z0) / r

This is the symmetric form of the equation of a line. Here, (x0, y0, z0) are the coordinates of a point on the line, and p, q, r are the direction ratios of the line.

Line Passing Through Two Points

Consider a line passing through two distinct points A and B with position vectors a and b respectively. Let r be the position vector of any point P on the line. The vector AP is parallel to the vector AB. AP = r - a AB = b - a Since AP is parallel to AB, we can write: r - a = λ(b - a) Therefore, the vector equation of the line passing through two points with position vectors a and b is:

r = a + λ(b - a)

In Cartesian form, if the line passes through points A(x1, y1, z1) and B(x2, y2, z2), then any point P(x, y, z) on the line satisfies:

(x - x1) / (x2 - x1) = (y - y1) / (y2 - y1) = (z - z1) / (z2 - z1)

The direction ratios in this case are (x2 - x1), (y2 - y1), and (z2 - z1).

Shortcut: When a line passes through a point (x0, y0, z0) and its direction cosines are l, m, n, the equation of the line is (x - x0)/l = (y - y0)/m = (z - z0)/n. This is useful when direction ratios are not directly given but direction cosines are. Remember that direction ratios p, q, r are proportional to direction cosines l, m, n, such that l = p/√(p²+q²+r²), m = q/√(p²+q²+r²), n = r/√(p²+q²+r²).

Example 1:

Find the vector and Cartesian equations of the line passing through the point (2, -1, 3) and parallel to the vector 3i + 2j - 5k.

Solution: The position vector of the given point is a = 2i - j + 3k. The direction vector is b = 3i + 2j - 5k. The vector equation of the line is r = a + λb. r = (2i - j + 3k) + λ(3i + 2j - 5k) The direction ratios are p=3, q=2, r=-5. The point is (x0, y0, z0) = (2, -1, 3). The Cartesian equation of the line is: (x - 2) / 3 = (y - (-1)) / 2 = (z - 3) / -5 (x - 2) / 3 = (y + 1) / 2 = (z - 3) / -5

Example 2:

Find the Cartesian equation of the line passing through points (1, 2, 3) and (4, 5, 6).

Solution: The two points are (x1, y1, z1) = (1, 2, 3) and (x2, y2, z2) = (4, 5, 6). The Cartesian equation is: (x - 1) / (4 - 1) = (y - 2) / (5 - 2) = (z - 3) / (6 - 3) (x - 1) / 3 = (y - 2) / 3 = (z - 3) / 3 This can be simplified by dividing by 3: x - 1 = y - 2 = z - 3

Skew Lines

Skew lines are lines in three-dimensional space that are neither parallel nor intersecting. They do not lie in the same plane (non-coplanar). Imagine two roads that cross each other but at different heights, like an overpass and a regular road. They are not parallel, and they never meet.

Conditions for Skew Lines

Two lines are skew if and only if they satisfy the following conditions:

  1. They are not parallel. This means their direction vectors are not proportional.
  2. They do not intersect. If we try to find a common point, there will be no solution.

Distance Between Skew Lines

Let two skew lines L1 and L2 be given by their vector equations: L1: r = a1 + λb1 L2: r = a2 + μb2 where a1 and a2 are the position vectors of points on L1 and L2 respectively, and b1 and b2 are their direction vectors. The shortest distance between two skew lines is the length of the line segment that is perpendicular to both lines. This shortest distance is given by the projection of the vector connecting a point on L1 to a point on L2 onto the common perpendicular vector. The common perpendicular vector is parallel to b1 × b2. Let d = b1 × b2. The vector connecting a point on L1 to a point on L2 is a2 - a1. The shortest distance (d) between the skew lines is the absolute value of the scalar projection of (a2 - a1) onto d:

d = | ( (a2 - a1) ⋅ (b1 × b2) ) / |b1 × b2| |

The term (a2 - a1) ⋅ (b1 × b2) is the scalar triple product, which can also be written as [a2 - a1, b1, b2].

So, the formula for the distance between skew lines is:

d = | [a2 - a1, b1, b2] | / |b1 × b2|

Shortcut: The scalar triple product [u, v, w] can be easily calculated as the determinant of the matrix formed by the components of the vectors: [u, v, w] = det( [u1 u2 u3; v1 v2 v3; w1 w2 w3] ) For the distance formula, u = a2 - a1, v = b1, w = b2.

Cartesian Form for Distance Between Skew Lines

Let the two skew lines be given by: L1: (x - x1) / p1 = (y - y1) / q1 = (z - z1) / r1 L2: (x - x2) / p2 = (y - y2) / q2 = (z - z2) / r2 The position vectors of points on the lines are a1 = x1i + y1j + z1k and a2 = x2i + y2j + z2k. The direction vectors are b1 = p1i + q1j + r1k and b2 = p2i + q2j + r2k. The vector a2 - a1 = (x2 - x1)i + (y2 - y1)j + (z2 - z1)k. The distance formula in Cartesian form is:

d = | det( [ (x2 - x1) (y2 - y1) (z2 - z1) ; p1 q1 r1 ; p2 q2 r2 ] ) | / sqrt( (q1r2 - q2r1)2 + (r1p2 - r2p1)2 + (p1q2 - p2q1)2 )

The denominator is the magnitude of the cross product b1 × b2.

Example 3: Distance between Skew Lines

Find the shortest distance between the lines: L1: r = (i + 2j + 3k) + λ(2i - j + k) L2: r = (2i + 4j - k) + μ(3i + 2j + 2k)

Solution: From L1, a1 = i + 2j + 3k and b1 = 2i - j + k. From L2, a2 = 2i + 4j - k and b2 = 3i + 2j + 2k. Calculate a2 - a1: a2 - a1 = (2 - 1)i + (4 - 2)j + (-1 - 3)k = i + 2j - 4k. Calculate the scalar triple product [a2 - a1, b1, b2]: [a2 - a1, b1, b2] = det( [ 1 2 -4 ; 2 -1 1 ; 3 2 2 ] ) = 1((-1)(2) - (1)(2)) - 2((2)(2) - (1)(3)) + (-4)((2)(2) - (-1)(3)) = 1(-2 - 2) - 2(4 - 3) - 4(4 + 3) = 1(-4) - 2(1) - 4(7) = -4 - 2 - 28 = -34. Calculate the cross product b1 × b2: b1 × b2 = det( [ i j k ; 2 -1 1 ; 3 2 2 ] ) = i((-1)(2) - (1)(2)) - j((2)(2) - (1)(3)) + k((2)(2) - (-1)(3)) = i(-2 - 2) - j(4 - 3) + k(4 + 3) = -4i - j + 7k. Calculate the magnitude |b1 × b2|: |b1 × b2| = sqrt((-4)2 + (-1)2 + (7)2) = sqrt(16 + 1 + 49) = sqrt(66). The shortest distance d is: d = | -34 | / sqrt(66) = 34 / sqrt(66).

Distance Between Parallel Lines

If two lines are parallel, their direction vectors are proportional. Let the lines be: L1: r = a1 + λb L2: r = a2 + μb Note that the direction vector b is the same (or proportional) for both lines. The shortest distance between two parallel lines is the length of the perpendicular from a point on one line to the other line. Consider the vector connecting a point on L1 to a point on L2, which is a2 - a1. The distance (d) is the magnitude of the component of (a2 - a1) perpendicular to b. This can be found by taking the cross product of (a2 - a1) with b and dividing by the magnitude of b.

d = | ( (a2 - a1) × b ) | / |b|

Important Note: The distance between two lines is zero if and only if they intersect. If the lines are parallel, the distance formula for parallel lines must be used. If the lines are skew, the distance formula for skew lines must be used. Always check if the lines are parallel first by comparing their direction vectors. If they are not parallel and the shortest distance is zero, then they intersect.

Example 4: Distance between Parallel Lines

Find the shortest distance between the lines: L1: r = (i + 2j + 3k) + λ(2i - j + k) L2: r = (2i + 4j + 5k) + μ(4i - 2j + 2k)

Solution: The direction vector for L1 is b1 = 2i - j + k. The direction vector for L2 is b2 = 4i - 2j + 2k. We observe that b2 = 2 * (2i - j + k) = 2 * b1. Since the direction vectors are proportional, the lines are parallel. We can take b = 2i - j + k. From L1, a1 = i + 2j + 3k. From L2, a2 = 2i + 4j + 5k. Calculate a2 - a1: a2 - a1 = (2 - 1)i + (4 - 2)j + (5 - 3)k = i + 2j + 2k. Calculate the cross product (a2 - a1) × b: (a2 - a1) × b = det( [ i j k ; 1 2 2 ; 2 -1 1 ] ) = i((2)(1) - (2)(-1)) - j((1)(1) - (2)(2)) + k((1)(-1) - (2)(2)) = i(2 + 2) - j(1 - 4) + k(-1 - 4) = 4i + 3j - 5k. Calculate the magnitude |(a2 - a1) × b|: |(a2 - a1) × b| = sqrt(42 + 32 + (-5)2) = sqrt(16 + 9 + 25) = sqrt(50) = 5 * sqrt(2). Calculate the magnitude |b|: |b| = sqrt(22 + (-1)2 + 12) = sqrt(4 + 1 + 1) = sqrt(6). The shortest distance d is: d = (5 * sqrt(2)) / sqrt(6) = 5 * sqrt(2/6) = 5 * sqrt(1/3) = 5 / sqrt(3) = (5 * sqrt(3)) / 3.

```