P1 2.1, P1 2.2 - Straight-line equations

P1 2.1, P1 2.2 - Straight-line equations

Use coordinates and direction conditions to determine a straight line exactly. P1 2.1 develops point-gradient and general equations; P1 2.2 supplies the parallel and perpendicular conditions that let you choose the required direction.

Gradient through two points

One point lies on infinitely many straight lines: what extra information chooses just one? A second distinct point fixes the direction, while a gradient can specify that direction directly.

From (1,2)(1,2) to (5,8)(5,8), the horizontal change is 44 and the vertical change is 66. The line rises 6/4=3/26/4=3/2 units for every unit moved to the right. Any right-angled triangle along the same nonvertical line has the same rise-to-run ratio, because the triangles are similar.

Gradient

The gradient of a nonvertical straight line is its change in vertical coordinate divided by its change in horizontal coordinate. Positive gradients rise from left to right; negative gradients fall. A horizontal line has gradient zero.

Use the coordinates in a consistent order.

Gradient through two points

For distinct points (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2), with x2≠x1x_2\ne x_1,

m=y2−y1x2−x1.m=\frac{y_2-y_1}{x_2-x_1}.

Not in the formula booklet: learn it.

The sign is part of the direction, rather than an optional detail.

[DIAGRAM: asset_name: Rise and run for positive and negative gradients; asset_slug: gradient-triangles; caption: The same positive run can give either a positive rise or a negative rise.; description: Two coordinate panels show lines through one comma two and five comma eight, then one comma two and five comma minus four. Right triangles label run four and rises six and minus six, giving gradients three halves and minus three halves.]
The same positive run can give either a positive rise or a negative rise.

Worked example 1: a rising line

Question. Find the gradient through A(1,2)A(1,2) and B(5,8)B(5,8).

Plan. Subtract the coordinates of AA from those of BB in both numerator and denominator.

m=8−25−1=64=32.m=\frac{8-2}{5-1}=\frac64=\frac32.

Answer. m=3/2m=3/2.

Check. A run of 44 at this gradient gives rise (3/2)×4=6(3/2)\times4=6, taking height 22 to height 88.

Change only BB's height from 88 to −4-4. The run stays 44, but the rise is now negative.

Worked example 2: a falling line

Question. Find the gradient through A(1,2)A(1,2) and B(5,−4)B(5,-4).

Plan. Keep the same coordinate order, including the negative height.

m=−4−25−1=−64=−32.m=\frac{-4-2}{5-1}=\frac{-6}{4}=-\frac32.

Answer. m=−3/2m=-3/2.

Check. Reverse both subtractions: (2−(−4))/(1−5)=6/(−4)=−3/2(2-(-4))/(1-5)=6/(-4)=-3/2, the same gradient.

For points with the same horizontal coordinate, the denominator would be zero. Such a line is vertical, has equation x=kx=k, and has no finite gradient. Two identical points do not determine a unique line.

Watch out

Do not reverse only one subtraction. (y2−y1)/(x1−x2)(y_2-y_1)/(x_1-x_2) changes the sign and gives the wrong direction.

Read a negative coordinate as a signed value before subtracting.

Point-gradient and general forms

A line's equation says that every point on it has the same rise-to-run relationship with a fixed known point.

If (x1,y1)(x_1,y_1) is fixed on the line, its changes to any other point are x−x1x-x_1 and y−y1y-y_1. Multiplying the gradient relation by the horizontal change gives y−y1=m(x−x1)y-y_1=m(x-x_1). This form also includes the known point itself: both sides are then zero.

Point-gradient equation

A nonvertical line through (x1,y1)(x_1,y_1) with gradient mm has equation

y−y1=m(x−x1).y-y_1=m(x-x_1).

A straight line can also be written in general form

ax+by+c=0,ax+by+c=0,

where a,b,ca,b,c are constants and a,ba,b are not both zero. General form includes vertical lines, when b=0b=0.

Not in the formula booklet: learn these forms.

In y=mx+cy=mx+c, mm is the gradient and cc is the vertical-axis intercept. In general form, the letter cc is just a constant term; it is not generally the intercept. Equivalent equations can differ by a nonzero overall factor.

Worked example 3: converting to general form

Question. Find the line through (1,2)(1,2) and (5,8)(5,8), in the form ax+by+c=0ax+by+c=0.

Plan. Calculate the gradient, use either given point in point-gradient form, then clear the fraction and collect terms.

m=8−25−1=32.m=\frac{8-2}{5-1}=\frac32. y−2=32(x−1)insert the point and gradient2y−4=3x−3multiply by 23x−2y+1=0collect on one side\begin{aligned} y-2&=\frac32(x-1) &&\text{insert the point and gradient}\\ 2y-4&=3x-3 &&\text{multiply by }2\\ 3x-2y+1&=0 &&\text{collect on one side} \end{aligned}

Answer. 3x−2y+1=03x-2y+1=0.

Check. At (1,2)(1,2), 3−4+1=03-4+1=0. Rearranging gives y=(3/2)x+1/2y=(3/2)x+1/2, confirming the gradient. The other given point also satisfies 3(5)−2(8)+1=03(5)-2(8)+1=0.

Change only the second point's height, from 88 to −4-4. The gradient changes sign; the first point stays fixed.

Worked example 4: a negative gradient

Question. Find the line through (1,2)(1,2) and (5,−4)(5,-4), in general form.

Plan. Calculate the new signed gradient, then use the same point-gradient form.

m=−4−25−1=−32.m=\frac{-4-2}{5-1}=-\frac32. y−2=−32(x−1)  ⟹  2y−4=−3x+3  ⟹  3x+2y−7=0.y-2=-\frac32(x-1)\implies2y-4=-3x+3\implies3x+2y-7=0.

Answer. 3x+2y−7=03x+2y-7=0.

Check. The point gives 3+4−7=03+4-7=0; solving for yy gives y=−(3/2)x+7/2y=-(3/2)x+7/2, with the required negative gradient. The second point gives 3(5)+2(−4)−7=03(5)+2(-4)-7=0.

For a line through two given points, first calculate its gradient as in Part 1, then use either point here. Check the other point in the final equation: it tests both stages at once.

Watch out

A point with negative horizontal coordinate gives x−(−2)=x+2x-(-2)=x+2. Preserve the subtraction in the formula before simplifying signs.

Give an equation rather than only a gradient or intercept.

Parallel and perpendicular directions

Parallel lines have the same direction; perpendicular lines meet at a right angle.

Two nonvertical lines with the same gradient have equal rises for every horizontal run. They are parallel if they are distinct; if they also share a point, they are the same line.

For a nonhorizontal line, imagine a direction triangle with horizontal change pp and vertical change qq. Rotating its direction through a right angle gives horizontal change −q-q and vertical change pp. The new gradient is p/(−q)=−1/(q/p)p/(-q)=-1/(q/p). This is why “perpendicular” means a negative reciprocal, rather than just a sign change.

Parallel and perpendicular gradients

For nonvertical lines, parallel directions satisfy

m1=m2.m_1=m_2.

For two nonvertical lines with nonzero gradients, perpendicular directions satisfy

m1m2=−1,m2=−1m1.m_1m_2=-1,\qquad m_2=-\frac1{m_1}.

Horizontal and vertical lines are perpendicular to one another; the product rule cannot be used with an undefined vertical gradient.

Not in the formula booklet: learn it.

If the reference line is in general form, isolate yy before reading its gradient.

Worked example 5: a parallel direction

Question. Find the gradient of a line parallel to 3x+2y=73x+2y=7.

Plan. Rearrange the given line into y=mx+cy=mx+c, then keep its gradient.

3x+2y=7  ⟹  y=−32x+72.3x+2y=7\implies y=-\frac32x+\frac72.

Answer. The parallel gradient is −3/2-3/2.

Check. Increasing xx by 22 requires yy to decrease by 33 to keep 3x+2y3x+2y constant. This gives Δy/Δx=−3/2\Delta y/\Delta x=-3/2.

Change only the direction condition from parallel to perpendicular. The reference line is unchanged.

Worked example 6: a perpendicular direction

Question. Find the gradient of a line perpendicular to 3x+2y=73x+2y=7.

Plan. Take the negative reciprocal of the reference gradient −3/2-3/2.

m2=−1−3/2=23.m_2=-\frac1{-3/2}=\frac23.

Answer. The perpendicular gradient is 2/32/3.

Check. (−3/2)(2/3)=−1(-3/2)(2/3)=-1, as required.

For example, a line perpendicular to y=4y=4 is vertical; it cannot be described by setting a finite gradient to the negative reciprocal of zero.

Watch out

The perpendicular gradient to −3/2-3/2 is 2/32/3, not 3/23/2. Change both the sign and the reciprocal; verify the product is −1-1.

First identify the reference gradient, then apply the direction condition.

Lines through a point with a direction condition

A point and a direction condition together determine one line, so combine the last two parts in that order: direction first, point second.

A common source of error is to insert the given point into the reference line. That point need not lie on the reference line; it belongs to the new line you are constructing.

Worked example 7: a parallel through a point

Question. Find the equation of the line through (2,1)(2,1) parallel to 3x+2y=73x+2y=7.

Plan. Use the reference gradient −3/2-3/2, then insert the new point.

y−1=−32(x−2)  ⟹  2y−2=−3x+6  ⟹  3x+2y−8=0.y-1=-\frac32(x-2)\implies2y-2=-3x+6\implies3x+2y-8=0.

Answer. 3x+2y−8=03x+2y-8=0.

Check. (2,1)(2,1) gives 6+2−8=06+2-8=0. Both reference and new line have gradient −3/2-3/2, but their constant terms differ, so they are distinct parallel lines.

Change only the requirement from parallel to perpendicular. The reference line and new point stay the same.

Worked example 8: a perpendicular through a point

Question. Find the equation of the line through (2,1)(2,1) perpendicular to 3x+2y=73x+2y=7.

Plan. Use gradient 2/32/3, then apply point-gradient form.

y−1=23(x−2)  ⟹  3y−3=2x−4  ⟹  2x−3y−1=0.y-1=\frac23(x-2)\implies3y-3=2x-4\implies2x-3y-1=0.

Answer. 2x−3y−1=02x-3y-1=0.

Check. (2,1)(2,1) gives 4−3−1=04-3-1=0. The gradients multiply to (−3/2)(2/3)=−1(-3/2)(2/3)=-1, checking the direction separately.

For the exceptional directions, write the equation directly: the line through (2,1)(2,1) perpendicular to y=5y=5 is x=2x=2; the line through it perpendicular to x=5x=5 is y=1y=1.

Problem-solving

Check two independent features in the final equation: does it contain the required point, and does it have the required direction? One check cannot replace the other.

The opening question is now answered: a second point, or an independent direction condition, selects one line through a given point.

Quick Recap

  • Gradient is vertical change divided by horizontal change, using a consistent coordinate order.
  • Use y−y1=m(x−x1)y-y_1=m(x-x_1), then rearrange if general form is requested.
  • Parallel directions have equal gradients; perpendicular nonzero finite gradients multiply to −1-1.
  • Handle horizontal and vertical lines directly and check both point and direction.