Sub topic 6
Parallel and perpendicular lines
This chapter assumes you can compute a slope from two points, write a line in slope-intercept form (y = mx + c) and general form (ax + by + c = 0), and solve two linear equations in two unknowns. Slopes and line equations are covered in the previous chapters. Here they are used to decide whether two lines are parallel or perpendicular, and to build new lines from that information.
The two rules
Two non-vertical lines with slopes m₁ and m₂ obey these rules.
- Parallel: m₁ = m₂.
- Perpendicular: m₁ · m₂ = -1, so m₂ = -1/m₁.
Vertical lines have no slope, so they are special cases. A vertical line x = k is parallel to every other vertical line and perpendicular to every horizontal line y = h. The rule m₁ · m₂ = -1 never applies to them.
Why the perpendicular rule works
Take a line with slope m = rise/run, so direction (run, rise) = (1, m). Rotating this direction by 90° turns (1, m) into (-m, 1). The rotated direction has slope 1/(-m) = -1/m. The perpendicular slope is therefore the negative reciprocal.
Check with distances. Let O = (0, 0), A = (1, m₁) and B = (1, m₂). Angle AOB is a right angle exactly when OA² + OB² = AB².
- OA² = 1 + m₁²
- OB² = 1 + m₂²
- AB² = (m₁ - m₂)²
The condition 2 + m₁² + m₂² = m₁² - 2m₁m₂ + m₂² simplifies to 2 = -2m₁m₂, so m₁m₂ = -1.
Working from general form
CAT questions often give lines as ax + by + c = 0. The slope is -a/b, so you can read the relationships straight from the coefficients without solving for y.
For lines a₁x + b₁y + c₁ = 0 and a₂x + b₂y + c₂ = 0:
| Relationship | Coefficient condition | Works when b = 0? |
|---|---|---|
| Parallel (or coincident) | a₁b₂ = a₂b₁ | Yes |
| Perpendicular | a₁a₂ + b₁b₂ = 0 | Yes |
| Coincident (same line) | a₁/a₂ = b₁/b₂ = c₁/c₂ | Yes, if no coefficient is zero |
The coefficient forms are safer than slopes because they handle vertical lines without special treatment. For a vertical line, b = 0. Perpendicular to it is a horizontal line with a = 0, and a₁a₂ + b₁b₂ = 0 holds.
A useful shortcut follows. The line ax + by + c = 0 has a parallel family ax + by + k = 0, where only the constant changes. It also has a perpendicular family bx - ay + k = 0, where you swap the coefficients and flip one sign.
Building lines
Parallel through a given point
To find the line through (x₀, y₀) parallel to ax + by + c = 0, keep a and b and compute the new constant.
k = -(a·x₀ + b·y₀)
The line is ax + by + k = 0, which is the same as ax + by = a·x₀ + b·y₀.
Example: the line through (2, 3) parallel to 3x + 4y - 10 = 0. Here a·x₀ + b·y₀ = 6 + 12 = 18, so the line is 3x + 4y = 18.
Perpendicular through a given point
To find the line through (x₀, y₀) perpendicular to ax + by + c = 0, use bx - ay = b·x₀ - a·y₀.
Example: the line through (2, 3) perpendicular to 3x + 4y - 10 = 0. Here b·x₀ - a·y₀ = 8 - 9 = -1, so the line is 4x - 3y = -1.
Check: the slopes are -3/4 and 4/3, and their product is -1.
Perpendicular bisector
The perpendicular bisector of segment AB is the set of points equidistant from A and B. It is the line through the midpoint of AB with slope equal to the negative reciprocal of the slope of AB.
Example: A = (1, 2), B = (7, 8). The slope of AB is 6/6 = 1. The midpoint is (4, 5). The perpendicular bisector has slope -1 and passes through (4, 5), so its equation is x + y = 9.
You can also derive it with the distance formula. Setting PA² = PB² for P = (x, y) gives:
(x - 1)² + (y - 2)² = (x - 7)² + (y - 8)²
Expanding, the squared terms cancel, leaving -2x - 4y + 5 = -14x - 16y + 113, which reduces to 12x + 12y = 108, so x + y = 9. The result agrees.
Checking relationships in code
The function below classifies two lines in general form using only the coefficient tests, so it needs no division and handles vertical lines.
def classify(l1, l2):
# each line is (a, b, c) meaning ax + by + c = 0
a1, b1, c1 = l1
a2, b2, c2 = l2
if a1 * b2 == a2 * b1:
# parallel; check whether they are the same line
if a1 * c2 == a2 * c1 and b1 * c2 == b2 * c1:
return "coincident"
return "parallel"
if a1 * a2 + b1 * b2 == 0:
return "perpendicular"
return "oblique"
print(classify((3, 4, -10), (3, 4, 5)))
print(classify((3, 4, -10), (4, -3, 1)))
print(classify((1, -1, 0), (2, -2, 0)))
print(classify((1, 0, -2), (0, 1, 5)))
print(classify((1, 1, 0), (1, 2, 0)))The output is:
parallel
perpendicular
coincident
perpendicular
obliqueDistance between parallel lines, previewed
Parallel lines in the form ax + by + c₁ = 0 and ax + by + c₂ = 0 are separated by |c₁ - c₂| / √(a² + b²). The coefficients of x and y must be identical before you subtract. If one line is 3x + 4y - 10 = 0 and the other is 6x + 8y + 5 = 0, rewrite the second as 3x + 4y + 2.5 = 0 first. The distance is then 12.5 / 5 = 2.5. The next chapters build this out. Here it is enough to see that "parallel" is what makes the formula valid.
Common patterns in CAT questions
- Unknown parameter. "For what value of k are kx + 3y = 5 and 2x + (k - 1)y = 7 parallel?" Set a₁b₂ = a₂b₁: k(k - 1) = 6, so k² - k - 6 = 0 and k = 3 or k = -2. Both values give parallel lines because the constants 5 and 7 do not force coincidence.
- Right angle at a vertex. To show triangle ABC has a right angle at B, check that slope(AB) · slope(BC) = -1. This is often quicker than computing three side lengths and applying Pythagoras.
- Parallelogram test. Opposite sides must have equal slopes. Equivalently, the diagonals bisect each other, so the midpoints of AC and BD coincide. The midpoint test is usually faster and also handles vertical sides.
- Rhombus or square. A parallelogram whose diagonals are perpendicular is a rhombus. If the diagonals are also equal in length, it is a square.
- Altitude. The altitude from A in triangle ABC is the line through A perpendicular to BC.
- Fourth vertex. If A, B, C are three vertices of a parallelogram ABCD, then D = A + C - B, because the diagonals AC and BD share a midpoint.
Gotchas and edge cases
- Vertical lines. A slope calculation divides by zero when x₁ = x₂. Test for it before computing, or use the coefficient forms.
- Coincident lines. Equal slopes mean parallel or identical. Check the constants before saying "distinct parallel lines" in a question that asks for no solutions.
- Sign slips when negating. The perpendicular slope of -3/4 is +4/3, not -4/3. Flip both the sign and the fraction.
- Zero slope. A horizontal line has m = 0, which has no reciprocal. Its perpendicular is vertical. The product test fails here, but the coefficient test a₁a₂ + b₁b₂ = 0 passes.
- Scaling. 3x + 4y - 10 = 0 and 6x + 8y - 20 = 0 are the same line. Equations that look different may not be.
- Perpendicular is not "negative". Two lines with slopes -2 and -1/2 are not perpendicular, since the product is +1.
Choosing a method under time pressure
- Given equations in general form, use the coefficient tests and skip conversion to slope form.
- Given points, compute slopes only after checking for equal x-coordinates.
- For "show that a quadrilateral is a parallelogram," compare the midpoints of the diagonals first.
- For a perpendicular through a point, write bx - ay = b·x₀ - a·y₀ directly.
Exercise
Find the equation of the line through (1, 2) that is perpendicular to the line joining A(0, 0) and B(4, 2). Then state whether the point (3, -2) lies on it.
Show answer
The slope of AB is 2/4 = 1/2, so the perpendicular slope is -2. Direction vector of AB is (4, 2), so the normal form is 4x + 2y = 4·1 + 2·2 = 8, which simplifies to 2x + y = 4. Check (3, -2): 2·3 + (-2) = 4, so the point lies on the line.
Exercise
The points A(1, 1), B(5, 3), C(6, 6) and D are vertices of a parallelogram ABCD in that order. Find D, and decide whether ABCD is a rhombus.
Show answer
Use D = A + C - B = (1 + 6 - 5, 1 + 6 - 3) = (2, 4). The diagonals are AC with direction (5, 5) and BD with direction (-3, 1). The slopes are 1 and -1/3, whose product is -1/3, not -1. The diagonals are not perpendicular, so ABCD is not a rhombus.
Exercise
For which values of k are the lines kx + 2y = 3 and 2x + ky = 5 perpendicular?
Show answer
Perpendicular requires a₁a₂ + b₁b₂ = 0, which gives 2k + 2k = 0, so k = 0. Check: the lines become 2y = 3 (horizontal) and 2x = 5 (vertical), which are perpendicular.