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 (1,2,3) and (4,6,8)\text{line through } \left(1, 2, 3\right) \text{ and } \left(4, 6, 8\right)

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

Parametric

x=1+3t, y=2+4t, z=3+5t\displaystyle x = 1 + 3t,\ y = 2 + 4t,\ z = 3 + 5t

Symmetric

x−13=y−24=z−35\displaystyle \frac{x - 1}{3} = \frac{y - 2}{4} = \frac{z - 3}{5}
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=(4,6,8)−(1,2,3)=(3,4,5)\begin{aligned} \mathbf{d} &= P_2 - P_1 \\ &= \left(4, 6, 8\right) - \left(1, 2, 3\right) \\ &= \left(3, 4, 5\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=(1,2,3)+t(3,4,5)\begin{aligned} \mathbf{r} &= \mathbf{a} + t\mathbf{d} \\ &= \left(1, 2, 3\right) + t\left(3, 4, 5\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=1+3t, y=2+4t, z=3+5tx = 1 + 3t,\ y = 2 + 4t,\ z = 3 + 5t
  4. Symmetric form

    Solving each parametric equation for tt and setting the three results equal removes the parameter.

    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}

    x−13=y−24=z−35\begin{aligned} \frac{x - 1}{3} &= \frac{y - 2}{4} \\ &= \frac{z - 3}{5} \end{aligned}
  5. Result

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

Worked examples