✖

Parametric equations of a line

The parametric equation of a line is the basic way of describing a line in the plane or in space.

Motivation

How could we describe a line in the plane? We know that two different points are enough to determine a line – let’s call them A and B. In other words: given two different points, exactly one line p passes through them:

A line through two points

How else could we describe this line, using vectors? We can add to the picture a vector u→ that is parallel to the line p.

A line with the vector \vec{\mathbf{u}}

The vector u→ has the same direction as the line p. That is quite nice, but direction alone is not enough. If we described the line p only by the vector u→, we would specify only its direction, not its position. We would have no way of telling these three lines apart:

Three lines with the same direction as the vector \vec{\mathbf{u}}

The new lines p1 and p2 have the same direction as the line p and the same direction as the vector u→. To define the line p uniquely, we also need to know at least one point that lies on it. If we say that the line p has the direction given by the vector u→ and passes through the point A, we define p uniquely. The lines p1 and p2 have the same direction, but neither of them passes through the point A.

We can write any line as p(A,u→), where A is a point on the line and u→ is a vector parallel to the line. For example, we could write the line p1 as p(G,u→) and the line p2 as p(E,u→) or p(F,u→) – we can use any point on the line.

The direction vector of a line

If we have a line p(A,u→), we call the vector u→ the direction vector of the line. The easiest way to find a direction vector is to find two points A, B that lie on the line p; the direction vector is then the directed line segment AB→. We get its coordinates by subtracting the coordinates of the points: u→=B−A. An example:

The line p

We have a line p with two points A, B on it. The direction vector will be equal to the directed line segment AB→, so we find the coordinates of u→ by calculating

u→=(u1,u2)=(6,6)−(2,4)=(4,2)

The vector u→ then has the same magnitude as the directed line segment AB→. We can draw the vector u→ in the picture like this:

The line with its direction vector

The end point of the vector u→ has coordinates (4, 2), exactly as we calculated, and you can see that the vector is parallel to the line. The direction vector only shows us the direction of the line, or perhaps better – its “tilt”. A direction vector only has to be parallel to the line. So if we took the segment BA→ instead of AB→, we would get the direction vector v→=A−B:

v→=(v1,v2)=(2,4)−(6,6)=(−4,−2)

Drawn in the picture:

Two direction vectors \vec{\mathbf{u}} and \vec{\mathbf{v}}

We can see that the green vector v→ is the opposite of the blue vector u→. Both are direction vectors of the line p, because both are parallel to p.

Parametric equations of a line

We have a line p, a point A that lies on it and a direction vector u→. What point do we get if we add the vector u→ to the point A? Let’s look at the picture:

The result of A + \vec{\mathbf{u}}

If we add a direction vector to a point on the line, we get a point X that also lies on the line. In effect, we are just “moving the point A in the direction of the vector by a distance equal to the magnitude of u→”. The point X therefore has coordinates:

X=(x,y)=A+u→=(2,1)+(1,3)=(3,4)

What would happen if we took just half of the vector u→, or twice the vector? Or −1 times the vector? Again, a picture shows it:

The sums of the point A and multiples of the vector \vec{\mathbf{u}}

We can see that whenever we add any multiple of the direction vector u→ to the point A, we always get a point on the line p. The red point A is the “starting point”, and the green points are the results of adding multiples of the blue direction vector u→ to A.

In fact, whichever point X on the line p we choose, we can always write it as the sum of the point A and the direction vector u→ multiplied by some scalar t, where t is a real number. For every point X on the line p we can say that there is a t ∈ ℝ such that

X=A+t⋅u→.

In other words, if we substituted all the real numbers for t in this equation one after another, we would get all the points that make up the line p – the whole line p. This equation is called the parametric equation of the line p(A,u→).

We can replace the previous equation with a system of equations. If the point X has coordinates (x, y), the point A has coordinates (a1, a2) and the vector u→ has coordinates (u1, u2), then we can write

(x,y)=(a1,a2)+t⋅(u1,u2),

which can be rewritten as the system of equations mentioned above (we write the x-coordinate and the y-coordinate separately):

x=a1+t⋅u1y=a2+t⋅u2

Every line in the plane can be described by such a system of equations.

Restricting the parameter

In the previous section we said that if we substitute all the real numbers for the parameter t in the parametric equation, we get a line. What would happen if we did not take all the real numbers, but only half of them – say, just the non-negative real numbers?

We would get a ray. Let’s go back to this picture…

The sums of the point A and multiples of the vector \vec{\mathbf{u}}

…and we can see that for all positive multiples (that is, positive t) of the direction vector u→ we got points X that lay “above” the point A. Conversely, when we added a negative multiple of u→ (that is, negative t), we got a point on the “opposite side”, “below” the point A. If we substitute all the non-negative numbers for t, that is, t ∈ [0, ∞), we get the ray r, highlighted in red:

The ray r

The dashed line shows the points we would get if we substituted all the negative numbers for t instead.

If we substituted all the numbers from the unit interval [0, 1] for t, we would get a line segment whose length equals the magnitude of the direction vector. We would get this red line segment:

A line segment

Examples

In the plane we have two points A(−1, 3) and B(2, 5).

  1. Find the parametric equations of the line p through the points A, B. First we find the direction vector. We take the directed line segment AB→, so the direction vector u→ has coordinates

    u→=(u1,u2)=B−A=(2,5)−(−1,3)=(3,2)

    The parametric equation of a line has the general form X=A+t⋅u→, so after substituting we get the equation

    X=(−1,3)+t⋅(3,2)

    which we can rewrite as a system like this:

    x1=−1+3tx2=3+2t

    Because we are describing a line, t ∈ ℝ. The picture follows a little further down.

  2. Find the parametric equations of the ray r that starts at the point A and passes through the point B. We use the same parametric equation and just restrict the parameter t. All that matters now is whether t ∈ [0, ∞) or t ∈ (−∞, 0].

    We obtained the direction vector from the directed line segment AB→, which means that the start point is A and the end point is B. That is exactly what we need – our ray should also start at A. So we do not have to reverse the direction using negative values of the parameter, and we take t from the non-negative interval t ∈ [0, ∞).

    The picture showing the solution of this problem and the previous one:

    The direction vector \vec{\mathbf{u}}, the line p and the ray r

  3. Find the midpoint of the line segment AB. There are two ways to do it. The first is to add the coordinates of the points A, B and divide the resulting coordinates by two. Let’s do that:

    S=(−1,3)+(2,5)2=(1,8)2=(12,4)

    But we can get the same point using the direction vector. We got it from the directed line segment AB→, which means that when we add A+u→, we get the point B. So if we add half of the direction vector to A, we get the midpoint of the line segment AB→:

    S=A+12u→=(−1,3)+12(3,2)=(−1,3)+(32,1)=(12,4)

    We can see that we got the same point. A picture to check:

    The midpoint S of the line segment AB

Chapters: Parametric equations of a line, General equation of a line, Normal vector of a line, Slope-intercept form of a line, Equation of a line in 3D