How to find vector and parametric equations of a line segment

If you know the two endpoints of a line segment, you can describe every point in between with one parameter. We’ll write the vector equation first, then read the three parametric equations directly from its coordinates.

Use the endpoints to write a vector equation

Let r0 and r1 be the position vectors of the first and second endpoints. To reach a point on the segment, start at r0 and move a fraction t of the way toward r1.

r(t)=r0+t(r1-r0)r(t)=(1-t)r0+tr10≤t≤1

At t=0 we get the first endpoint, and at t=1 we get the second. Values between them trace the segment, including its midpoint at t=1/2.

Substitute the two points and combine components

Let’s use the endpoints P(1,2,-1) and Q(1,0,3). Their coordinates give us the two position vectors.

r0=⟨1,2,-1⟩r1=⟨1,0,3⟩

Substitute the vectors into the formula. Multiply each vector by its scalar, then add the matching components.

r(t)=(1-t)⟨1,2,-1⟩+t⟨1,0,3⟩r(t)=⟨1,2-2t,-1+4t⟩

In unit-vector notation, the three components are the coefficients of i, j, and k.

r(t)=i+(2-2t)j+(-1+4t)k

Read off the parametric equations and check the endpoints

The first component is x, the second is y, and the third is z. Each coordinate is a function of the same parameter t.

x=1y=2-2tz=-1+4t0≤t≤1

Plugging in t=0 gives (1,2,-1), and plugging in t=1 gives (1,0,3). The x-coordinate stays at 1 throughout, so the whole segment lies in the plane x=1.

A line segment from P to Q at constant xIn a side view of the plane x equals 1, P is at t equals 0, the midpoint is at t equals one half, and Q is at t equals 1.Side view in the plane x = 1zyQ (t = 1)t = ½P (t = 0)
As t runs from 0 to 1, the point goes from P through the midpoint to Q.