Skip to content
Family Table Math
Auto

Equations of Lines in 2-Space

You already know y=mx+by = mx + b. Vectors give you new ways to describe the same line: by a point and a direction, or by a point and a vector perpendicular to the line. These forms look like extra work in 2-space, but they’re the ones that carry over to 3-space, where slope stops making sense.

Components are written in square brackets, like [3,2][3, 2], as in most Ontario textbooks. Some books write (3,2)(3, 2) or ⟨3,2⟩\langle 3, 2 \rangle; they mean the same thing.

A line is fixed by one point on it and its direction. Let P0(x0,y0)P_0(x_0, y_0) be a point on the line, with position vector r⃗0=[x0,y0]\vec{r}_0 = [x_0, y_0], and let m⃗=[m1,m2]\vec{m} = [m_1, m_2] be a direction vector: any non-zero vector parallel to the line. Then every point on the line has position vector

r⃗=r⃗0+tm⃗,t∈R\vec{r} = \vec{r}_0 + t\vec{m}, \qquad t \in \mathbb{R}

Here r⃗=[x,y]\vec{r} = [x, y] and tt is a parameter. Think of it as a set of instructions: start at P0P_0 and walk tt copies of m⃗\vec{m}. Positive tt goes one way, negative tt the other, and t=0t = 0 gives P0P_0 itself.

Write the vector equation one component at a time:

x=x0+tm1,y=y0+tm2,t∈Rx = x_0 + t m_1, \qquad y = y_0 + t m_2, \qquad t \in \mathbb{R}

These are the parametric equations of the line. They’re handy for finding points: pick a value of tt and compute xx and yy.

The scalar equation (or Cartesian equation) of a line is

Ax+By+C=0Ax + By + C = 0

The vector n⃗=[A,B]\vec{n} = [A, B] is a normal vector: it is perpendicular to the line.

Here’s why. Take a fixed point P0(x0,y0)P_0(x_0, y_0) and any point P(x,y)P(x, y) on the line. The vector P0P→=[x−x0, y−y0]\overrightarrow{P_0P} = [x - x_0,\ y - y_0] lies along the line, so it is perpendicular to n⃗\vec{n}, and their dot product is zero:

n⃗⋅P0P→=0A(x−x0)+B(y−y0)=0Ax+By+(−Ax0−By0)=0\begin{aligned} \vec{n} \cdot \overrightarrow{P_0P} &= 0 \\ A(x - x_0) + B(y - y_0) &= 0 \\ Ax + By + (-Ax_0 - By_0) &= 0 \end{aligned}

The bracket is a constant, CC. So to write a scalar equation, you need a normal vector and one point.

The line 2x - 3y + 7 = 0 with a direction vector and a normal vector at the point (-2, 1) −4 −2 2 4 −2 2 4 P₀(−2, 1) m = [3, 2] n = [2, −3] 2x − 3y + 7 = 0
The line 2x−3y+7=02x - 3y + 7 = 0: the direction vector runs along it, the normal sticks out at right angles.

Switching between a normal and a direction

Section titled “Switching between a normal and a direction”

In 2-space, swapping the components and changing one sign turns a normal into a direction vector (and back):

n⃗=[A,B]⟺m⃗=[B,−A]  or  [−B,A]\vec{n} = [A, B] \quad\Longleftrightarrow\quad \vec{m} = [B, -A] \ \text{ or } \ [-B, A]

Check: [A,B]⋅[B,−A]=AB−BA=0[A, B] \cdot [B, -A] = AB - BA = 0, so they are perpendicular. The slope of the line is m2m1\dfrac{m_2}{m_1}, which also equals −AB-\dfrac{A}{B} (when the line isn’t vertical).

FromToHow
vectorparametricread off the components
vector or parametricscalarget n⃗\vec{n} from m⃗\vec{m}, then find CC using the point
parametricscalaror: solve one equation for tt and substitute into the other
scalarvectorget m⃗\vec{m} from n⃗\vec{n}; find any point (set x=0x = 0 or y=0y = 0)

None of these forms is unique. A different point, or a direction vector that is a non-zero multiple of m⃗\vec{m}, gives a different-looking equation for the same line.

  • Two lines are parallel when their direction vectors (or their normals) are scalar multiples of each other.
  • Two lines are perpendicular when their direction vectors have a dot product of zero (equivalently, their normals do).

Parallel lines can still be the same line. To tell, check whether a point on one line is on the other.

  • Scalar equation: substitute the point; it’s on the line if you get 00.
  • Vector or parametric equation: solve each component equation for tt. The point is on the line only if every component gives the same tt.

A line passes through A(4,−1)A(4, -1) and is parallel to m⃗=[2,5]\vec{m} = [2, 5].

  • (a) Write its vector and parametric equations.
  • (b) Find two more points on the line.
  • (c) Are (10,14)(10, 14) and (0,−10)(0, -10) on the line?

Solution.

(a) Use r⃗0=[4,−1]\vec{r}_0 = [4, -1]:

r⃗=[4,−1]+t[2,5],t∈Rx=4+2t,y=−1+5t\vec{r} = [4, -1] + t[2, 5], \quad t \in \mathbb{R} \qquad\qquad x = 4 + 2t, \quad y = -1 + 5t

(b) t=1t = 1 gives (6,4)(6, 4). t=−1t = -1 gives (2,−6)(2, -6).

(c) For (10,14)(10, 14): 4+2t=104 + 2t = 10 gives t=3t = 3, and −1+5t=14-1 + 5t = 14 gives t=3t = 3. Same tt, so the point is on the line.

For (0,−10)(0, -10): 4+2t=04 + 2t = 0 gives t=−2t = -2, but then y=−1+5(−2)=−11≠−10y = -1 + 5(-2) = -11 \ne -10. The point is not on the line.

Write a vector equation of the line 3x+4y−12=03x + 4y - 12 = 0.

Solution. The normal is n⃗=[3,4]\vec{n} = [3, 4], so a direction vector is m⃗=[4,−3]\vec{m} = [4, -3].

For a point, set x=0x = 0: 4y=124y = 12, so y=3y = 3. The point (0,3)(0, 3) is on the line.

r⃗=[0,3]+t[4,−3],t∈R\vec{r} = [0, 3] + t[4, -3], \quad t \in \mathbb{R}

Check: t=1t = 1 gives (4,0)(4, 0), and 3(4)+4(0)−12=03(4) + 4(0) - 12 = 0 ✓.

Find the scalar equation of the line r⃗=[−2,1]+t[3,2]\vec{r} = [-2, 1] + t[3, 2].

Solution. The direction is m⃗=[3,2]\vec{m} = [3, 2], so a normal is n⃗=[2,−3]\vec{n} = [2, -3]. The scalar equation has the form

2x−3y+C=02x - 3y + C = 0

The point (−2,1)(-2, 1) is on the line, so 2(−2)−3(1)+C=02(-2) - 3(1) + C = 0, which gives C=7C = 7:

2x−3y+7=02x - 3y + 7 = 0

Another way: from the parametric equations x=−2+3tx = -2 + 3t and y=1+2ty = 1 + 2t, solve the first for tt: t=x+23t = \dfrac{x + 2}{3}. Substitute:

y=1+2(x+2)33y=3+2x+4multiply by 30=2x−3y+7\begin{aligned} y &= 1 + \frac{2(x + 2)}{3} \\ 3y &= 3 + 2x + 4 && \text{multiply by } 3 \\ 0 &= 2x - 3y + 7 \end{aligned}

Both methods agree. This is the line in the figure above.

Example 4: Parallel and perpendicular through a point

Section titled “Example 4: Parallel and perpendicular through a point”

Let LL be the line 2x−y+6=02x - y + 6 = 0 and let P(5,−2)P(5, -2).

  • (a) Find the scalar equation of the line through PP parallel to LL.
  • (b) Find a vector equation of the line through PP perpendicular to LL.

Solution.

(a) A parallel line has the same normal, [2,−1][2, -1], so its equation is 2x−y+C=02x - y + C = 0. Substitute PP: 2(5)−(−2)+C=02(5) - (-2) + C = 0, so C=−12C = -12.

2x−y−12=02x - y - 12 = 0

(b) A perpendicular line runs in the direction of LL‘s normal, so use m⃗=[2,−1]\vec{m} = [2, -1]:

r⃗=[5,−2]+t[2,−1],t∈R\vec{r} = [5, -2] + t[2, -1], \quad t \in \mathbb{R}

Check: LL has direction [1,2][1, 2], and [1,2]⋅[2,−1]=2−2=0[1, 2] \cdot [2, -1] = 2 - 2 = 0 ✓.

Using the normal as the direction vector. In Ax+By+C=0Ax + By + C = 0, the vector [A,B][A, B] is perpendicular to the line, not along it. Swap the components and change one sign to get a direction vector.

Checking only one component. To test a point with parametric equations, you need the same tt from every component. In Example 1, (0,−10)(0, -10) gives t=−2t = -2 from xx, but that tt fails the yy equation.

Thinking there’s only one right answer. r⃗=[0,3]+t[4,−3]\vec{r} = [0, 3] + t[4, -3] and r⃗=[4,0]+s[−8,6]\vec{r} = [4, 0] + s[-8, 6] are the same line. If your answer looks different from the back of the book, check that your point satisfies their equation and your direction is a multiple of theirs.

Sign slips when finding C. Substitute carefully: for 2x−y+C=02x - y + C = 0 at (5,−2)(5, -2) you get 10+2+C=010 + 2 + C = 0, so C=−12C = -12, not −8-8.

Assuming parallel means different. Two lines with parallel direction vectors might be the same line. Test a point from one in the other.

1. (Warm-up) For the line r⃗=[3,−2]+t[1,4]\vec{r} = [3, -2] + t[1, 4]:

  • (a) State a point on the line and a direction vector.
  • (b) Write the parametric equations.
  • (c) Find the point where t=2t = 2.
Solution

(a) Point (3,−2)(3, -2); direction vector [1,4][1, 4].

(b) x=3+tx = 3 + t, y=−2+4ty = -2 + 4t.

(c) x=3+2=5x = 3 + 2 = 5 and y=−2+8=6y = -2 + 8 = 6, so (5,6)(5, 6).

2. (Warm-up) State a normal vector and a direction vector for the line 5x−2y+7=05x - 2y + 7 = 0.

Solution

Normal: n⃗=[5,−2]\vec{n} = [5, -2]. Direction: swap and change a sign, m⃗=[2,5]\vec{m} = [2, 5].

Check: [5,−2]⋅[2,5]=10−10=0[5, -2] \cdot [2, 5] = 10 - 10 = 0 ✓.

3. (Warm-up) The line LL has parametric equations x=2−3tx = 2 - 3t, y=1+2ty = 1 + 2t. Is (−1,7)(-1, 7) on LL? Is (8,−3)(8, -3)?

Solution

For (−1,7)(-1, 7): 2−3t=−12 - 3t = -1 gives t=1t = 1, but then y=1+2=3≠7y = 1 + 2 = 3 \ne 7. Not on LL.

For (8,−3)(8, -3): 2−3t=82 - 3t = 8 gives t=−2t = -2, and y=1+2(−2)=−3y = 1 + 2(-2) = -3 ✓. On LL.

4. (Core) Find vector, parametric, and scalar equations of the line through A(−3,2)A(-3, 2) and B(1,8)B(1, 8).

Solution

AB→=[4,6]\overrightarrow{AB} = [4, 6], so [2,3][2, 3] is also a direction vector (half of it).

r⃗=[−3,2]+t[2,3]x=−3+2t,y=2+3t\vec{r} = [-3, 2] + t[2, 3] \qquad x = -3 + 2t, \quad y = 2 + 3t

A normal is [3,−2][3, -2], so 3x−2y+C=03x - 2y + C = 0. Using AA: −9−4+C=0-9 - 4 + C = 0, so C=13C = 13:

3x−2y+13=03x - 2y + 13 = 0

Check with BB: 3(1)−2(8)+13=03(1) - 2(8) + 13 = 0 ✓.

5. (Core) Convert x=4−2tx = 4 - 2t, y=−1+5ty = -1 + 5t to a scalar equation.

Solution

The direction is [−2,5][-2, 5], so a normal is [5,2][5, 2]. The equation is 5x+2y+C=05x + 2y + C = 0. Using (4,−1)(4, -1): 20−2+C=020 - 2 + C = 0, so C=−18C = -18:

5x+2y−18=05x + 2y - 18 = 0

Check with t=1t = 1, the point (2,4)(2, 4): 10+8−18=010 + 8 - 18 = 0 ✓.

6. (Core) Write the line y=−23x+4y = -\dfrac{2}{3}x + 4 as a scalar equation and as a vector equation.

Solution

Multiply by 33: 3y=−2x+123y = -2x + 12, so

2x+3y−12=02x + 3y - 12 = 0

Normal [2,3][2, 3], so direction [3,−2][3, -2] (which matches the slope −23-\dfrac{2}{3}). The yy-intercept gives the point (0,4)(0, 4):

r⃗=[0,4]+t[3,−2]\vec{r} = [0, 4] + t[3, -2]

7. (Core) Decide whether each pair of lines is parallel, perpendicular, or neither. If parallel, decide whether they’re the same line.

  • (a) 4x−6y+1=04x - 6y + 1 = 0 and r⃗=[0,2]+t[3,2]\vec{r} = [0, 2] + t[3, 2]
  • (b) r⃗=[1,1]+t[2,−5]\vec{r} = [1, 1] + t[2, -5] and x=3+10sx = 3 + 10s, y=4sy = 4s
Solution

(a) The first line has normal [4,−6][4, -6], so direction [6,4]=2[3,2][6, 4] = 2[3, 2]. The directions are parallel. Test (0,2)(0, 2) in the first equation: 0−12+1=−11≠00 - 12 + 1 = -11 \ne 0. So the lines are parallel and distinct.

(b) [2,−5]⋅[10,4]=20−20=0[2, -5] \cdot [10, 4] = 20 - 20 = 0, so the lines are perpendicular.

8. (Challenge) Find the point where the line r⃗=[1,−2]+t[2,1]\vec{r} = [1, -2] + t[2, 1] meets the line 3x−4y−1=03x - 4y - 1 = 0.

Solution

Any point on the first line is (1+2t, −2+t)(1 + 2t,\ -2 + t). Substitute into the second equation:

3(1+2t)−4(−2+t)−1=03+6t+8−4t−1=02t+10=0t=−5\begin{aligned} 3(1 + 2t) - 4(-2 + t) - 1 &= 0 \\ 3 + 6t + 8 - 4t - 1 &= 0 \\ 2t + 10 &= 0 \\ t &= -5 \end{aligned}

The point is (1−10, −2−5)=(−9,−7)(1 - 10,\ -2 - 5) = (-9, -7).

Check: 3(−9)−4(−7)−1=−27+28−1=03(-9) - 4(-7) - 1 = -27 + 28 - 1 = 0 ✓.

9. (Challenge) A survey drone near Guelph starts at the point (2,1)(2, 1) on a map grid measured in kilometres and flies in a straight line with velocity [3,4][3, 4] km/h, so after tt hours its position is r⃗=[2,1]+t[3,4]\vec{r} = [2, 1] + t[3, 4].

  • (a) Where is the drone after 1.5 hours?
  • (b) What is its speed?
  • (c) Does it fly over a cabin at (14,17)(14, 17)? If so, when?
Solution

(a) r⃗=[2,1]+1.5[3,4]=[2+4.5, 1+6]=[6.5,7]\vec{r} = [2, 1] + 1.5[3, 4] = [2 + 4.5,\ 1 + 6] = [6.5, 7], so the point (6.5,7)(6.5, 7).

(b) Speed is the magnitude of the velocity: ∣[3,4]∣=9+16=5|[3, 4]| = \sqrt{9 + 16} = 5 km/h.

(c) 2+3t=142 + 3t = 14 gives t=4t = 4, and 1+4t=171 + 4t = 17 gives t=4t = 4. Same tt, so yes: the drone passes over the cabin after 4 hours.