# Write parametric equations for the line through the distinct points P(x1, y1, z1) and Q(x2, y2, z2).

*print*Print*list*Cite

### 1 Answer

The parametric equations for a line in 3D space can be written as, (using P)

`x = x_1+at`

`y = y_1+bt`

`z = z_1+ct`

Now Q is also on the same line (with a different parameter value)

`x_2 = x_1+at'`

`y_2 = y_1+bt'`

`z_2 = z_1+ct'`

Solving for a using both x equations,

`(x-x_1)/t = (x_2-x_1)/(t')`

Now this gives,

`(x-x_1)/(x_2-x_1) = t/(t') = m`

From y and z equations also,

`(y-y_1)/(y_2-y_1) = t/(t') = m`

`(z-z_1)/(z_2-z_1) = t/(t') = m`

Therefore we write the two point formula as below,

`(x-x_1)/(x_2-x_1) = (y-y_1)/(y_2-y_1) = (y-y_1)/(y_2-y_1) = m`

Rearranging the above three equations will give us the parametric equation with `m` as a parameter.

`x = x_1+m(x_2-x_1)`

`y = y_1+m(y_2-y_1)`

`z = z_1+m(z_2-z_1)`

These are the required equations.

**Sources:**