Line in 3D Calculator

Enter two points, or a point and a direction, to write the equation of the line.

Write the three coordinates, like (1, 2, 3).

Write the three coordinates, like (1, 2, 3).

Try

Result

You enteredline through (0,0,0) and (2,0,4)\text{line through } \left(0, 0, 0\right) \text{ and } \left(2, 0, 4\right)

r=(0,0,0)+t(2,0,4)\displaystyle \mathbf{r} = \left(0, 0, 0\right) + t\left(2, 0, 4\right)

Parametric

x=2t, y=0, z=4t\displaystyle x = 2t,\ y = 0,\ z = 4t

Symmetric

y=0, x2=z4\displaystyle y = 0,\ \frac{x}{2} = \frac{z}{4}
Show the work
  1. Direction from two points

    The line runs from P1P_1 to P2P_2, so the vector between them points along it. Subtract the coordinates of P1P_1 from those of P2P_2.

    d=P2−P1=(2,0,4)−(0,0,0)=(2,0,4)\begin{aligned} \mathbf{d} &= P_2 - P_1 \\ &= \left(2, 0, 4\right) - \left(0, 0, 0\right) \\ &= \left(2, 0, 4\right) \end{aligned}
  2. Vector form of a line

    A line is fixed by one point on it, a\mathbf{a}, and a direction, d\mathbf{d}. Every point on the line is a\mathbf{a} plus some multiple tt of d\mathbf{d}, and each value of tt gives one point.

    r=a+td=(0,0,0)+t(2,0,4)\begin{aligned} \mathbf{r} &= \mathbf{a} + t\mathbf{d} \\ &= \left(0, 0, 0\right) + t\left(2, 0, 4\right) \end{aligned}
  3. Parametric form

    Writing the vector equation one coordinate at a time gives three equations in tt.

    Using x=x0+td1, y=y0+td2, z=z0+td3x = x_0 + t d_1,\ y = y_0 + t d_2,\ z = z_0 + t d_3

    x=2t, y=0, z=4tx = 2t,\ y = 0,\ z = 4t
  4. Symmetric form

    Solving each parametric equation for tt and setting the results equal removes the parameter. A coordinate whose direction component is 0 never changes, so it is written on its own as a fixed value instead of a fraction.

    Using x−x0d1=y−y0d2=z−z0d3\frac{x - x_0}{d_1} = \frac{y - y_0}{d_2} = \frac{z - z_0}{d_3}

    y=0, x2=z4y = 0,\ \frac{x}{2} = \frac{z}{4}
  5. Result

    So the line is r=(0,0,0)+t(2,0,4)\mathbf{r} = \left(0, 0, 0\right) + t\left(2, 0, 4\right).

Worked examples