Introduction to the Equation of a Line

In two-dimensional geometry, a line can be determined by a point and a slope, or by two distinct points.

In three-dimensional geometry, the same idea appears in a slightly richer form. A line is uniquely determined if:

  1. it passes through a known point and has a known direction, or
  2. it passes through two distinct points.

The direction of a line in space is described by a vector parallel to it. Once we know one point on the line and one direction vector, the entire line is fixed.

The equation of a line is commonly written in two equivalent forms:

  • Vector form
  • Cartesian (or symmetric) form

Both forms describe the same set of points in space and can be converted into one another.

Line through a Given Point and Parallel to a Given Vector

Vector Form

Let a line pass through a point AA whose position vector is a\vec{a}, and let the line be parallel to a vector b\vec{b}. If PP is any point on the line with position vector r\vec{r}, then the vector AP\overrightarrow{AP} must be parallel to b\vec{b}. Hence, AP=λb\overrightarrow{AP} = \lambda \vec{b} for some real parameter λ\lambda. Since r=a+AP,\vec{r} = \vec{a} + \overrightarrow{AP}, we get the vector equation of the line: r=a+λb.\vec{r} = \vec{a} + \lambda \vec{b}.

Here, λ\lambda is called the parameter. Different values of λ\lambda give different points on the line.

Cartesian Form

Suppose the point AA has coordinates (x1,y1,z1)(x_1, y_1, z_1), so that a=x1i^+y1j^+z1k^.\vec{a} = x_1\hat{i} + y_1\hat{j} + z_1\hat{k}. Also suppose the direction vector is b=ai^+bj^+ck^,\vec{b} = a\hat{i} + b\hat{j} + c\hat{k}, where a,b,ca, b, c are direction ratios of the line. If P(x,y,z)P(x,y,z) is any point on the line, then r=xi^+yj^+zk^.\vec{r} = x\hat{i} + y\hat{j} + z\hat{k}. Substituting in r=a+λb,\vec{r} = \vec{a} + \lambda \vec{b}, and comparing coefficients of i^,j^,k^\hat{i}, \hat{j}, \hat{k}, we get x=x1+λa,y=y1+λb,z=z1+λc.x = x_1 + \lambda a, \qquad y = y_1 + \lambda b, \qquad z = z_1 + \lambda c. So, xx1=λa,yy1=λb,zz1=λc.x-x_1 = \lambda a, \qquad y-y_1 = \lambda b, \qquad z-z_1 = \lambda c. Eliminating λ\lambda, we obtain the symmetric Cartesian equation: xx1a=yy1b=zz1c.\frac{x-x_1}{a} = \frac{y-y_1}{b} = \frac{z-z_1}{c}.

If a,b,ca, b, c are replaced by the direction cosines l,m,nl, m, n, then the equation becomes xx1l=yy1m=zz1n.\frac{x-x_1}{l} = \frac{y-y_1}{m} = \frac{z-z_1}{n}. In that case the common value is the actual directed distance from the fixed point along the line, because l,m,nl, m, n are components of a unit direction vector.

Line Passing Through Two Given Points

Vector Form

Let the line pass through two points AA and BB whose position vectors are a\vec{a} and b\vec{b} respectively. Then the direction of the line is given by AB=ba.\overrightarrow{AB} = \vec{b} - \vec{a}. Using the point-direction form of a line, the vector equation becomes r=a+λ(ba).\vec{r} = \vec{a} + \lambda(\vec{b} - \vec{a}).

This is the standard vector equation of the line through the two given points.

Cartesian Form

If A(x1,y1,z1),B(x2,y2,z2),A(x_1, y_1, z_1), \qquad B(x_2, y_2, z_2), then the direction ratios of the line are x2x1,y2y1,z2z1.x_2-x_1, \qquad y_2-y_1, \qquad z_2-z_1. Therefore the Cartesian equation is xx1x2x1=yy1y2y1=zz1z2z1.\frac{x-x_1}{x_2-x_1} = \frac{y-y_1}{y_2-y_1} = \frac{z-z_1}{z_2-z_1}.

This is valid provided the denominators are interpreted carefully when one of them is zero.

Important Considerations and General Point on a Line

  • When a denominator is zero: If one direction ratio is zero, say a=0a=0, then the expression xx10\frac{x-x_1}{0} means xx1=0x-x_1=0, so x=x1x=x_1. It does not mean division in the usual arithmetic sense; it is shorthand notation used in symmetric line equations.

  • General point on a line: If xx1a=yy1b=zz1c=λ,\frac{x-x_1}{a} = \frac{y-y_1}{b} = \frac{z-z_1}{c} = \lambda, then any point on the line can be written as (x,y,z)=(x1+aλ,  y1+bλ,  z1+cλ).(x,y,z) = (x_1 + a\lambda,\; y_1 + b\lambda,\; z_1 + c\lambda).

This parametric representation is extremely useful in finding intersections with planes, distances, feet of perpendiculars, and reflections.

Example 1: Vector and Cartesian Equation (Point & Direction)

Find the vector and the Cartesian equations of the line through the point (5,2,4)(5, 2, -4) and which is parallel to the vector 3i^+2j^8k^3\hat{i} + 2\hat{j} - 8\hat{k}.

Solution: Step 1: The given point is A(5,2,4).A(5,2,-4). Its position vector is a=5i^+2j^4k^.\vec{a} = 5\hat{i} + 2\hat{j} - 4\hat{k}.

Step 2: The given direction vector is b=3i^+2j^8k^.\vec{b} = 3\hat{i} + 2\hat{j} - 8\hat{k}. So the direction ratios are 3,2,83,2,-8.

Step 3: Use the vector form of the line: r=a+λb.\vec{r} = \vec{a} + \lambda \vec{b}. Hence, r=(5i^+2j^4k^)+λ(3i^+2j^8k^).\vec{r} = (5\hat{i} + 2\hat{j} - 4\hat{k}) + \lambda(3\hat{i} + 2\hat{j} - 8\hat{k}).

Step 4: Use the Cartesian symmetric form: xx1a=yy1b=zz1c.\frac{x-x_1}{a} = \frac{y-y_1}{b} = \frac{z-z_1}{c}. Substituting x1=5,y1=2,z1=4x_1=5, y_1=2, z_1=-4 and a=3,b=2,c=8a=3, b=2, c=-8, we get x53=y22=z+48.\frac{x-5}{3} = \frac{y-2}{2} = \frac{z+4}{-8}.

Answer: Vector: r=(5i^+2j^4k^)+λ(3i^+2j^8k^)\vec{r} = (5\hat{i} + 2\hat{j} - 4\hat{k}) + \lambda(3\hat{i} + 2\hat{j} - 8\hat{k}). Cartesian: x53=y22=z+48\frac{x-5}{3} = \frac{y-2}{2} = \frac{z+4}{-8}.

Example 2: Vector and Cartesian Equation (Two Points)

Find the vector and the Cartesian equations of the line that passes through the origin and (5,2,3)(5, -2, 3).

Solution: Step 1: Let the two points be O(0,0,0),A(5,2,3).O(0,0,0), \qquad A(5,-2,3). The position vectors are 0and5i^2j^+3k^.\vec{0} \quad \text{and} \quad 5\hat{i} - 2\hat{j} + 3\hat{k}.

Step 2: The direction vector of the line is OA=5i^2j^+3k^.\overrightarrow{OA} = 5\hat{i} - 2\hat{j} + 3\hat{k}.

Step 3: The vector equation is r=λ(5i^2j^+3k^).\vec{r} = \lambda(5\hat{i} - 2\hat{j} + 3\hat{k}). This is because the line passes through the origin.

Step 4: The direction ratios are 5,2,35,-2,3, and the point is (0,0,0)(0,0,0), so the Cartesian equation is x5=y2=z3.\frac{x}{5} = \frac{y}{-2} = \frac{z}{3}.

Answer: Vector: r=λ(5i^2j^+3k^)\vec{r} = \lambda(5\hat{i} - 2\hat{j} + 3\hat{k}). Cartesian: x5=y2=z3\frac{x}{5} = \frac{y}{-2} = \frac{z}{3}.

Example 3: Cartesian to Vector Conversion

The Cartesian equation of a line is x+32=y54=z+62\frac{x+3}{2} = \frac{y-5}{4} = \frac{z+6}{2}. Find the vector equation for the line.

Solution: Step 1: Compare with the standard form xx1a=yy1b=zz1c.\frac{x-x_1}{a} = \frac{y-y_1}{b} = \frac{z-z_1}{c}. From x+32=y54=z+62,\frac{x+3}{2} = \frac{y-5}{4} = \frac{z+6}{2}, we get x1=3,y1=5,z1=6.x_1 = -3, \qquad y_1 = 5, \qquad z_1 = -6. So one point on the line is (3,5,6)(-3,5,-6).

Step 2: The direction ratios are the denominators: 2,4,2.2,4,2. So a direction vector is 2i^+4j^+2k^.2\hat{i} + 4\hat{j} + 2\hat{k}.

Step 3: Therefore the vector equation is r=(3i^+5j^6k^)+λ(2i^+4j^+2k^).\vec{r} = (-3\hat{i} + 5\hat{j} - 6\hat{k}) + \lambda(2\hat{i} + 4\hat{j} + 2\hat{k}).

Answer: r=(3i^+5j^6k^)+λ(2i^+4j^+2k^)\vec{r} = (-3\hat{i} + 5\hat{j} - 6\hat{k}) + \lambda(2\hat{i} + 4\hat{j} + 2\hat{k}).

Example 4: Standardizing Cartesian Equations

Find the Cartesian equation of the line passing through the point (2,4,5)(-2, 4, -5) and parallel to the line given by x+33=4y5=z+86\frac{x+3}{3} = \frac{4-y}{5} = \frac{z+8}{6}.

Solution: Step 1: Rewrite the given line in standard form. Since 4y=(y4),4-y = -(y-4), we have 4y5=y45.\frac{4-y}{5} = \frac{y-4}{-5}. So the line becomes x+33=y45=z+86.\frac{x+3}{3} = \frac{y-4}{-5} = \frac{z+8}{6}. Therefore, its direction ratios are 3,5,6.3, -5, 6.

Step 2: A parallel line has the same direction ratios. The required line passes through (2,4,5).(-2,4,-5).

Step 3: Using the symmetric form, x(2)3=y45=z(5)6.\frac{x-(-2)}{3} = \frac{y-4}{-5} = \frac{z-(-5)}{6}. Hence, x+23=y45=z+56.\frac{x+2}{3} = \frac{y-4}{-5} = \frac{z+5}{6}.

Answer: x+23=y45=z+56\frac{x+2}{3} = \frac{y-4}{-5} = \frac{z+5}{6}.

Example 5: Intersection with a Plane (xy-plane)

Find the point where the line passing through the points A(3,4,1)A(3, 4, 1) and B(5,1,6)B(5, 1, 6) crosses the xy-plane.

Solution: Step 1: Find the direction ratios of the line through AA and BB: 53=2,14=3,61=5.5-3=2, \qquad 1-4=-3, \qquad 6-1=5. So the line is x32=y43=z15=λ.\frac{x-3}{2} = \frac{y-4}{-3} = \frac{z-1}{5} = \lambda.

Step 2: Write a general point on the line: x=3+2λ,y=43λ,z=1+5λ.x = 3 + 2\lambda, \qquad y = 4 - 3\lambda, \qquad z = 1 + 5\lambda. So any point is P(3+2λ,  43λ,  1+5λ).P(3+2\lambda,\;4-3\lambda,\;1+5\lambda).

Step 3: The xy-plane is given by z=0.z=0. So, 1+5λ=0    λ=15.1 + 5\lambda = 0 \implies \lambda = -\frac{1}{5}.

Step 4: Substitute into xx and yy: x=3+2(15)=325=135,x = 3 + 2\left(-\frac15\right) = 3 - \frac25 = \frac{13}{5}, y=43(15)=4+35=235.y = 4 - 3\left(-\frac15\right) = 4 + \frac35 = \frac{23}{5}. Thus the required point is (135,235,0).\left(\frac{13}{5}, \frac{23}{5}, 0\right).

Answer: (135,235,0)\left(\frac{13}{5}, \frac{23}{5}, 0\right).

Example 6: Equation of Coordinate Axes

Find the Cartesian equation of the y-axis.

Solution: Step 1: The y-axis passes through the origin (0,0,0).(0,0,0).

Step 2: Its direction vector is along j^\hat{j}, so the direction ratios are 0,1,0.0,1,0.

Step 3: Therefore the symmetric equation is x00=y01=z00.\frac{x-0}{0} = \frac{y-0}{1} = \frac{z-0}{0}. That is, x0=y1=z0.\frac{x}{0} = \frac{y}{1} = \frac{z}{0}.

This is equivalent to the system x=0,z=0,x=0, \qquad z=0, with yy free, which is exactly the y-axis.

Answer: x0=y1=z0\frac{x}{0} = \frac{y}{1} = \frac{z}{0}, equivalently x=0,z=0x=0, z=0.

Example 7: Line Parallel to an Axis

Find the Cartesian equation of a line passing through (2,1,3)(2, -1, 3) and parallel to the z-axis.

Solution: Step 1: A line parallel to the z-axis has direction ratios 0,0,1.0,0,1.

Step 2: The given point is (2,1,3).(2,-1,3).

Step 3: Using the symmetric form, x20=y(1)0=z31.\frac{x-2}{0} = \frac{y-(-1)}{0} = \frac{z-3}{1}. So, x20=y+10=z31.\frac{x-2}{0} = \frac{y+1}{0} = \frac{z-3}{1}. This means x=2,y=1,x=2, \qquad y=-1, and zz can vary freely.

Answer: x20=y+10=z31\frac{x-2}{0} = \frac{y+1}{0} = \frac{z-3}{1}, equivalently x=2,y=1x=2, y=-1.

Example 8: Checking Collinearity using Line Equations

Show that the points A(1,2,3)A(1, 2, 3), B(4,0,4)B(4, 0, 4), and C(2,4,2)C(-2, 4, 2) are collinear using the equation of a line.

Solution: Step 1: First find the line through AA and BB. Direction ratios of ABAB are 41=3,02=2,43=1.4-1=3, \qquad 0-2=-2, \qquad 4-3=1. So its equation is x13=y22=z31.\frac{x-1}{3} = \frac{y-2}{-2} = \frac{z-3}{1}.

Step 2: Check whether point C(2,4,2)C(-2,4,2) satisfies this equation: 213=33=1,\frac{-2-1}{3} = \frac{-3}{3} = -1, 422=22=1,\frac{4-2}{-2} = \frac{2}{-2} = -1, 231=1.\frac{2-3}{1} = -1. All three ratios are equal.

Step 3: Since point CC satisfies the equation of the line through AA and BB, it lies on the same line. Hence the three points are collinear.

Answer: Proved.

Example 9: Foot of Perpendicular from a Point to a Line

Find the coordinates of the foot of the perpendicular drawn from the point P(0,2,3)P(0, 2, 3) to the line x+35=y12=z+43\frac{x+3}{5} = \frac{y-1}{2} = \frac{z+4}{3}.

Solution: Step 1: Let the foot of the perpendicular be QQ on the given line. Write the line in parametric form: x+35=y12=z+43=λ.\frac{x+3}{5} = \frac{y-1}{2} = \frac{z+4}{3} = \lambda. Then x=5λ3,y=2λ+1,z=3λ4.x = 5\lambda - 3, \qquad y = 2\lambda + 1, \qquad z = 3\lambda - 4. So, Q=(5λ3,  2λ+1,  3λ4).Q = (5\lambda-3,\;2\lambda+1,\;3\lambda-4).

Step 2: Since PQPQ is perpendicular to the line, the vector PQ=(5λ3,  2λ1,  3λ7)\overrightarrow{PQ} = (5\lambda-3,\;2\lambda-1,\;3\lambda-7) must be perpendicular to the direction vector of the line d=(5,2,3).\vec{d} = (5,2,3).

Step 3: Therefore, PQd=0.\overrightarrow{PQ} \cdot \vec{d} = 0. So, 5(5λ3)+2(2λ1)+3(3λ7)=0.5(5\lambda-3) + 2(2\lambda-1) + 3(3\lambda-7) = 0. Expanding, 25λ15+4λ2+9λ21=0,25\lambda - 15 + 4\lambda - 2 + 9\lambda - 21 = 0, 38λ38=0,38\lambda - 38 = 0, λ=1.\lambda = 1.

Step 4: Substitute λ=1\lambda=1 into the point QQ: Q=(53,  2+1,  34)=(2,3,1).Q = (5-3,\;2+1,\;3-4) = (2,3,-1).

Answer: (2,3,1)(2, 3, -1).

Example 10: Image of a Point in a Line

Find the image of the point P(0,2,3)P(0, 2, 3) in the line x+35=y12=z+43\frac{x+3}{5} = \frac{y-1}{2} = \frac{z+4}{3}.

Solution: Step 1: To find the image of a point in a line, first find the foot of the perpendicular from the point to the line. Let that foot be QQ. From the previous example, the foot is Q(2,3,1).Q(2,3,-1).

Step 2: If PP' is the image of PP in the line, then the line acts as the perpendicular bisector of the segment PPPP'. Hence QQ is the midpoint of PPPP'. Let P=(x,y,z).P' = (x',y',z'). Then, using the midpoint formula, 0+x2=2    x=4,\frac{0+x'}{2} = 2 \implies x' = 4, 2+y2=3    y=4,\frac{2+y'}{2} = 3 \implies y' = 4, 3+z2=1    z=5.\frac{3+z'}{2} = -1 \implies z' = -5.

Therefore, P=(4,4,5).P' = (4,4,-5).

Answer: (4,4,5)(4, 4, -5).