Writing a parallel or perpendicular line through a point
You have a line and a point. What is the equation of the line through that point that runs alongside the first one, or crosses it square?
Where you are 11 in Linear relationships
When you reach for it
You are given a line and a point, and you want a second line through the point that either never meets the first (parallel) or crosses it at a right angle (perpendicular). The question comes up all over coordinate geometry. The altitude of a triangle is the line through a corner perpendicular to the opposite side. The tangent to a circle is the line through a point of the circle perpendicular to the radius. The shortest path from a point to a line runs along the perpendicular. The opposite sides of a rectangle are parallel and its neighboring sides are perpendicular.
Two facts you already have do all the work. A line is fixed by one point on it and its slope, and point-slope form turns that point and slope into an equation. And the slope you need comes straight from the given line: parallel lines have equal slopes, and perpendicular lines have slopes that multiply to -1. So the whole move is: find the slope you need, then use the point.
The procedure
Take the line \ell with equation \displaystyle y = \frac{1}{2}x + 1 and the point P(2, 7), which is not on \ell (since \displaystyle \frac{1}{2} \cdot 2 + 1 = 2, not 7). We want the line through P parallel to \ell and the line through P perpendicular to it.
Read the slope of the given line. In slope-intercept form y = mx + b the slope is the coefficient of x, so \ell has slope \displaystyle \frac{1}{2}. If the line comes in standard form Ax + By = C, solve for y first; if it comes as two points, use the slope formula.
Choose the slope the new line needs. Two lines that are not vertical are parallel exactly when they have the same slope and different intercepts, so the parallel line has slope \displaystyle \frac{1}{2}. Two lines that are not vertical are perpendicular exactly when their slopes multiply to -1, so the perpendicular line has slope m_2 with \displaystyle \frac{1}{2} \cdot m_2 = -1, that is m_2 = -2: flip the fraction and change its sign, the negative reciprocal.
Put that slope and the point into point-slope form. The line through (x_1, y_1) with slope m is
and the reason is the meaning of slope. A point (x, y) other than (x_1, y_1) is on that line exactly when the slope from (x_1, y_1) to it is m, that is, when \displaystyle \frac{y - y_1}{x - x_1} = m. Multiplying both sides by x - x_1 gives the equation above, which the point (x_1, y_1) itself also satisfies, as 0 = 0. For P(2, 7), the parallel line is
and the perpendicular line is
So the parallel line is \displaystyle y = \frac{1}{2}x + 6 and the perpendicular line is y = -2x + 11. The second step on each line uses the distributive property and then adds 7 to both sides.
Check both requirements. The point: \displaystyle \frac{1}{2} \cdot 2 + 6 = 7 and -2 \cdot 2 + 11 = 7, so both lines pass through P. The slopes: \displaystyle \frac{1}{2} equals \displaystyle \frac{1}{2}, and \displaystyle \frac{1}{2} \cdot (-2) = -1. The parallel line also has intercept 6, not 1, so it is a different line from \ell.
The perpendicular line crosses \ell at a point F, the foot of the perpendicular. To find it, set the two expressions for y equal, since at the crossing point both equations hold:
and then \displaystyle y = \frac{1}{2} \cdot 4 + 1 = 3, so the foot is F(4, 3). The length PF is the distance from P to \ell: by the distance formula, \displaystyle PF = \sqrt{(4 - 2)^2 + (3 - 7)^2} = \sqrt{20} = 2\sqrt{5}.
There is only one answer each time. A point and a slope fix a line, because point-slope form produces one equation from them. Any other line through P either has a different slope, and then it is neither parallel to \ell (it meets it) nor perpendicular to it (the product is not -1), or it is the vertical line through P, which is neither, since \ell is not horizontal or vertical. So through a point there is exactly one parallel and exactly one perpendicular.
When the given line is horizontal or vertical
A horizontal line y = k has slope 0. The parallel through (x_1, y_1) is again horizontal, y = y_1. The perpendicular is vertical, x = x_1, and it has no slope at all: the negative reciprocal of 0 would be \displaystyle -\frac{1}{0}, which does not exist. The slope rule is silent here because it was stated for lines that are not vertical, and the answer comes from the axes themselves, which are a horizontal and a vertical line meeting at a right angle.
A vertical line x = h has no slope, so read the answer off the same way: the parallel through (x_1, y_1) is x = x_1 and the perpendicular is y = y_1.
Staying in standard form
When the given line is Ax + By = C, with A and B not both 0, there is a shortcut that avoids fractions and covers the horizontal and vertical cases in the same breath. Through the point (x_1, y_1), the parallel is
and the perpendicular is
In each, the right side is just the left side worked out at the point, so the point is on the line. The parallel keeps A and B, so when B \neq 0 its slope is \displaystyle -\frac{A}{B}, the same as the given line’s, and when B = 0 both lines are vertical. The perpendicular swaps A and B and changes one sign. When A and B are both non-zero its slope is \displaystyle \frac{B}{A}, and
When A = 0 the given line is horizontal and the new one is Bx = Bx_1, that is x = x_1, vertical. When B = 0 the given line is vertical and the new one is -Ay = -Ay_1, that is y = y_1, horizontal. Every case comes out right without being treated separately.
Worked examples
Parallel to a line in slope-intercept form
Write an equation of the line through (4, -1) parallel to y = 3x + 5, in slope-intercept form.
SolutionThe given line has slope 3, and a parallel line has the same slope. Put slope 3 and the point (4, -1) into point-slope form. Here y_1 = -1, so y - y_1 is y - (-1) = y + 1:
The line is y = 3x - 13. Check: 3 \cdot 4 - 13 = -1, so the point is on it. Its intercept is -13, not 5, so it really is a second line and not the given one again.
Perpendicular, with a fractional slope
Write an equation of the line through (-6, 2) perpendicular to \displaystyle y = \frac{3}{2}x - 4.
SolutionThe given slope is \displaystyle \frac{3}{2}. Its negative reciprocal is \displaystyle -\frac{2}{3}, and indeed \displaystyle \frac{3}{2} \cdot \left(-\frac{2}{3}\right) = -1. Point-slope form with x_1 = -6 gives x - (-6) = x + 6:
The line is \displaystyle y = -\frac{2}{3}x - 2. The fraction cleared in the second line because 6 is a multiple of 3; with a different point the intercept would have been a fraction too, and that would be just as correct. Check: \displaystyle -\frac{2}{3} \cdot (-6) - 2 = 4 - 2 = 2.
A line given in standard form
Through the point (-2, 5), write the line (a) parallel to and (b) perpendicular to 3x + 4y = 12. Give each in slope-intercept form and in standard form.
SolutionSolve the given equation for y to read its slope: 4y = -3x + 12, so \displaystyle y = -\frac{3}{4}x + 3 and the slope is \displaystyle -\frac{3}{4}.
(a) The parallel line has slope \displaystyle -\frac{3}{4}:
The standard-form shortcut keeps 3x + 4y and works out the right side at the point: 3(-2) + 4(5) = -6 + 20 = 14. So the line is 3x + 4y = 14. The two answers agree: solving 3x + 4y = 14 for y gives \displaystyle y = -\frac{3}{4}x + \frac{7}{2}.
(b) The perpendicular line has slope \displaystyle \frac{4}{3}, since \displaystyle -\frac{3}{4} \cdot \frac{4}{3} = -1:
since \displaystyle 5 = \frac{15}{3} and \displaystyle \frac{8}{3} + \frac{15}{3} = \frac{23}{3}. The shortcut swaps the coefficients and changes one sign, 4x - 3y, and then the right side is 4(-2) - 3(5) = -8 - 15 = -23. So the line is 4x - 3y = -23. In standard form the fractions never appeared, which is the reason to stay there when the answer is wanted in that form.
Horizontal and vertical lines
Through the point (3, -4), write the line (a) parallel to and perpendicular to y = 6, and (b) parallel to and perpendicular to x = -1.
Solution(a) y = 6 is horizontal. The parallel through (3, -4) is horizontal too, so every point on it has y-coordinate -4: the line y = -4. The perpendicular is vertical, so every point on it has x-coordinate 3: the line x = 3. Trying the slope rule here fails honestly: the given slope is 0, and no number times 0 is -1. The answer is a line with no slope.
(b) x = -1 is vertical. The parallel is the vertical line x = 3, and the perpendicular is the horizontal line y = -4.
The same two lines answer both parts with their roles swapped, because a horizontal and a vertical line through the same point are perpendicular to each other. The standard-form shortcut agrees: y = 6 is 0x + 1y = 6, and the swap gives 1x - 0y = 1 \cdot 3 - 0 \cdot (-4), which is x = 3.
An altitude of a triangle
A triangle has corners A(-2, 5), B(4, 1) and C(5, 9). Find the equation of the altitude from C, the point F where it meets \overline{AB}, and the area of the triangle.
An altitude is the segment from a corner perpendicular to the line of the opposite side, so the line we want passes through C and is perpendicular to \overline{AB}. First the slope of \overline{AB}:
The perpendicular slope is \displaystyle \frac{3}{2}. Through C(5, 9):
The altitude lies on \displaystyle y = \frac{3}{2}x + \frac{3}{2}. To find F we also need the line AB, with slope \displaystyle -\frac{2}{3} through A(-2, 5): \displaystyle y - 5 = -\frac{2}{3}(x + 2), which is \displaystyle y = -\frac{2}{3}x + \frac{11}{3}. At F both equations hold, so set them equal and multiply both sides by 6 to clear the fractions:
So x = 1, and \displaystyle y = \frac{3}{2} + \frac{3}{2} = 3: the foot is F(1, 3). It lies between A and B (its x-coordinate is between -2 and 4), so this altitude falls inside the triangle.
For the area, take \overline{AB} as the base and \overline{CF} as the height, by the distance formula:
The perpendicular was the whole difficulty: a triangle’s area needs a height, and a height is a length measured along a perpendicular.
Choosing a coefficient
For which value of k is the line kx + 2y = 5 (a) parallel to (b) perpendicular to y = 4x - 1?
SolutionSolve for y to see the slope in terms of k: 2y = -kx + 5, so \displaystyle y = -\frac{k}{2}x + \frac{5}{2} and the slope is \displaystyle -\frac{k}{2}.
(a) Parallel needs equal slopes: \displaystyle -\frac{k}{2} = 4, so k = -8. The line is then \displaystyle y = 4x + \frac{5}{2}, whose intercept \displaystyle \frac{5}{2} differs from -1, so the two lines are parallel and not the same line.
(b) Perpendicular needs the product -1: \displaystyle -\frac{k}{2} \cdot 4 = -1, so -2k = -1 and \displaystyle k = \frac{1}{2}. Check: the slope is then \displaystyle -\frac{1}{4}, and \displaystyle 4 \cdot \left(-\frac{1}{4}\right) = -1.
The tangent to a circle
The circle x^2 + y^2 = 25 has center O(0, 0) and radius 5. The point T(3, 4) is on it, since 3^2 + 4^2 = 25. Find the line that touches the circle at T.
A line that touches a circle at one point is perpendicular to the radius drawn to that point, one of the properties of tangents. So the tangent at T is the line through T perpendicular to \overline{OT}. The radius has slope \displaystyle \frac{4 - 0}{3 - 0} = \frac{4}{3}, so the tangent has slope \displaystyle -\frac{3}{4}, the negative reciprocal. Now the point finishes the job:
Multiplying by 4 and moving the x term gives the standard form 3x + 4y = 25. Check: 3 \cdot 3 + 4 \cdot 4 = 25.
The coefficients 3 and 4 are the coordinates of T, and that is no accident. For any point (a, b) on the circle x^2 + y^2 = r^2, the line ax + by = r^2 passes through (a, b) because a^2 + b^2 = r^2, and by the standard-form shortcut it is perpendicular to the radius, which lies on bx - ay = 0. So the tangent at (a, b) is always ax + by = r^2, even at points such as (5, 0) where the tangent is vertical.
Boundaries
The slope rules need lines that are not vertical. A vertical line has no slope, and the perpendicular to a horizontal line is vertical, so “negative reciprocal” has nothing to work on when a slope is 0 or missing. Use the horizontal and vertical rule, or stay in standard form, where the swap Bx - Ay covers every case.
A point on the given line has no separate parallel through it. If P lies on \ell, the procedure returns the equation of \ell itself. Parallel lines are two different lines that never meet, so through a point of \ell there is no line parallel to \ell other than \ell. The perpendicular through a point of \ell exists as usual, and P is its own foot.
This is a fact about the plane. In space, through a point of a line there are infinitely many lines perpendicular to it, filling a whole plane, and two lines that never meet need not be parallel. Slopes describe lines in the coordinate plane only.
“Product -1” means square in the coordinate plane, where both axes measure the same unit. On a graph drawn with different scales on the two axes, perpendicular lines are not drawn at a right angle, though the equations are still correct. When x and y stand for quantities in different units, such as hours and pounds, “perpendicular” has no geometric meaning at all.
Answers come in many equivalent forms. \displaystyle y = -\frac{3}{4}x + \frac{7}{2} and 3x + 4y = 14 are one line. Two equations describe the same line exactly when they have the same slope (or are both vertical) and share a point.
Where this goes next
The foot of the perpendicular is where the distance from a point to a line is measured, and finding it is a small system of two equations. The line through a segment’s midpoint perpendicular to it is the perpendicular bisector, and the three perpendicular bisectors of a triangle meet at its circumcenter; the three altitudes, built as in the altitude example, meet at its orthocenter. Deciding whether four points make a parallelogram, a rectangle or a square is the same slope comparison run in reverse, which is classifying figures from coordinates.
In calculus the move returns unchanged. The slope of a curve at a point comes from the derivative, and the tangent and normal lines are the line through that point with that slope and the line through it with the negative reciprocal slope.
Exercises
Parallel through a point
Write an equation of each line in slope-intercept form.
- Through (2, 5), parallel to y = 4x - 7.
- Through (-3, 1), parallel to \displaystyle y = -\frac{2}{3}x + 4.
- Through (6, -2), parallel to 5x - 3y = 1.
Perpendicular through a point
Write an equation of each line in slope-intercept form.
- Through (1, -4), perpendicular to y = -x + 6.
- Through (-4, 3), perpendicular to y = 2x + 1.
- Through (5, 0), perpendicular to \displaystyle y = -\frac{5}{2}x + 3.
- Through (2, -1), perpendicular to 3x + 2y = 8.
Horizontal and vertical lines
Write an equation of each line.
- Through (-5, 2), parallel to y = -3.
- Through (-5, 2), perpendicular to y = -3.
- Through (4, 7), perpendicular to x = 1.
- Through (0, -6), perpendicular to the x-axis.
A line given by two points
Write an equation of each line.
- Through (-1, 0), parallel to the line through (1, 2) and (4, 8).
- Through (3, 5), perpendicular to the line through (-2, 3) and (2, 1).
- Through (2, -3), perpendicular to the line through (0, 4) and (6, 4).
Standard form
Write each line in the form Ax + By = C with integer coefficients.
- Through (3, -2), parallel to 2x + 5y = 10.
- Through (3, -2), perpendicular to 2x + 5y = 10.
Using the move
- For which value of a is the line ax - 3y = 4 parallel to y = 2x + 1?
- For which value of a is the line ax - 3y = 4 perpendicular to y = 2x + 1?
- A triangle has corners A(0, 0), B(6, 2) and C(1, 7). Find the equation of the altitude from C, and the point where it meets \overline{AB}.
- A circle has center (2, 1) and passes through (5, 5). Find the tangent to the circle at (5, 5), in standard form.
- A(1, 1), B(5, 3) and D(0, 3) are three corners of the rectangle ABCD. Show that \overline{AD} \perp \overline{AB}, write the equations of the lines BC and DC, and find the fourth corner C.
Reasoning
- Let \ell be a line that is not vertical and P a point not on it. Explain why there is exactly one line through P parallel to \ell.
- Show that the line Bx - Ay = Bx_1 - Ay_1 passes through (x_1, y_1) and is perpendicular to Ax + By = C, where A and B are not both 0. Treat A = 0 and B = 0 separately.
- Rafael wants the line through (2, 3) perpendicular to y = 4, and tries to take the negative reciprocal of the slope. Explain what goes wrong, and give the line.
- On a graph drawn with 1 cm per unit along the x-axis and 2 cm per unit along the y-axis, the lines y = x and y = -x do not look perpendicular. Explain why, and say whether they are perpendicular.
Answers
- y = 4x - 3. Slope 4: y - 5 = 4(x - 2) = 4x - 8.
- \displaystyle y = -\frac{2}{3}x - 1. Slope \displaystyle -\frac{2}{3}: \displaystyle y - 1 = -\frac{2}{3}(x + 3) = -\frac{2}{3}x - 2.
- \displaystyle y = \frac{5}{3}x - 12. Solving 5x - 3y = 1 for y gives slope \displaystyle \frac{5}{3}, and \displaystyle y + 2 = \frac{5}{3}(x - 6) = \frac{5}{3}x - 10.
- y = x - 5. The given slope is -1, so the perpendicular slope is 1: y + 4 = x - 1.
- \displaystyle y = -\frac{1}{2}x + 1. Slope \displaystyle -\frac{1}{2}: \displaystyle y - 3 = -\frac{1}{2}(x + 4) = -\frac{1}{2}x - 2.
- \displaystyle y = \frac{2}{5}x - 2. The negative reciprocal of \displaystyle -\frac{5}{2} is \displaystyle \frac{2}{5}: \displaystyle y - 0 = \frac{2}{5}(x - 5).
- \displaystyle y = \frac{2}{3}x - \frac{7}{3}. The given line is \displaystyle y = -\frac{3}{2}x + 4, so the slope needed is \displaystyle \frac{2}{3}: \displaystyle y + 1 = \frac{2}{3}(x - 2) = \frac{2}{3}x - \frac{4}{3}. In standard form it is 2x - 3y = 7.
- y = 2. A line parallel to a horizontal line is horizontal, and this one passes through a point with y-coordinate 2.
- x = -5. The perpendicular to a horizontal line is vertical, through a point with x-coordinate -5.
- y = 7. x = 1 is vertical, so the perpendicular is horizontal.
- x = 0, which is the y-axis. The x-axis is horizontal, so the perpendicular is the vertical line through (0, -6).
- y = 2x + 2. The slope is \displaystyle \frac{8 - 2}{4 - 1} = 2, and y - 0 = 2(x + 1).
- y = 2x - 1. The slope is \displaystyle \frac{1 - 3}{2 - (-2)} = -\frac{1}{2}, so the perpendicular slope is 2: y - 5 = 2(x - 3).
- x = 2. Both points have y-coordinate 4, so the line is horizontal and the perpendicular is vertical.
- 2x + 5y = -4. Keep 2x + 5y; at the point it is 2(3) + 5(-2) = -4.
- 5x - 2y = 19. Swap and change one sign, 5x - 2y; at the point it is 5(3) - 2(-2) = 19. The slopes are \displaystyle -\frac{2}{5} and \displaystyle \frac{5}{2}, whose product is -1.
- a = 6. The line is \displaystyle y = \frac{a}{3}x - \frac{4}{3}, so \displaystyle \frac{a}{3} = 2. The intercepts, \displaystyle -\frac{4}{3} and 1, differ, so the lines are not the same.
- \displaystyle a = -\frac{3}{2}. \displaystyle \frac{a}{3} \cdot 2 = -1 gives 2a = -3.
- The altitude is y = -3x + 10, and it meets \overline{AB} at (3, 1). \overline{AB} has slope \displaystyle \frac{2}{6} = \frac{1}{3} and lies on \displaystyle y = \frac{1}{3}x; the perpendicular slope is -3, so y - 7 = -3(x - 1). Then \displaystyle \frac{1}{3}x = -3x + 10 gives 10x = 30, so x = 3 and y = 1.
- 3x + 4y = 35. The radius has slope \displaystyle \frac{5 - 1}{5 - 2} = \frac{4}{3}, so the tangent has slope \displaystyle -\frac{3}{4}: \displaystyle y - 5 = -\frac{3}{4}(x - 5). Multiply by 4: 4y - 20 = -3x + 15.
- \overline{AB} has slope \displaystyle \frac{3 - 1}{5 - 1} = \frac{1}{2} and \overline{AD} has slope \displaystyle \frac{3 - 1}{0 - 1} = -2; the product is -1, so they are perpendicular. BC goes through B parallel to \overline{AD}: y = -2x + 13. DC goes through D parallel to \overline{AB}: \displaystyle y = \frac{1}{2}x + 3. Setting them equal, \displaystyle -2x + 13 = \frac{1}{2}x + 3 gives x = 4, so the fourth corner is C(4, 5).
- A line parallel to \ell must have the slope m of \ell: a line with a different slope meets \ell, and a vertical line meets \ell too, since \ell is not vertical. Through P there is exactly one line with slope m, the one given by point-slope form. It is not \ell itself, because P is on it and not on \ell, and two different lines with the same slope never meet. So it is parallel to \ell, and it is the only line through P that is.
- At (x_1, y_1) the left side is Bx_1 - Ay_1, which is the right side, so the point is on the line. If A and B are both non-zero, the slopes are \displaystyle -\frac{A}{B} and \displaystyle \frac{B}{A}, whose product is -1. If A = 0, then B \neq 0, the given line By = C is horizontal and the new one, Bx = Bx_1, is the vertical line x = x_1. If B = 0, then A \neq 0, the given line is vertical and the new one, -Ay = -Ay_1, is the horizontal line y = y_1. A horizontal and a vertical line are perpendicular, so every case holds.
- The slope of y = 4 is 0, and 0 has no reciprocal: no number times 0 gives -1. The slope rule only covers lines that are not vertical, and the line wanted is vertical. The perpendicular to a horizontal line is vertical, so through (2, 3) it is x = 2.
- The drawing doubles every vertical distance, so y = x is drawn rising 2 cm for every 1 cm across, at about 63.4^\circ to the horizontal, and y = -x at about 63.4^\circ the other way; they cross on the page at about 53.1^\circ, not 90^\circ. The lines themselves are perpendicular: the slopes 1 and -1 multiply to -1, and in the coordinate plane, where both axes use the same unit, they meet at a right angle. The slope rule describes the plane, not a stretched picture of it.