- Find the distance between two points and the coordinates of a midpoint, and use them in geometry problems
- Write the general and slope forms of a line, the line through a point with a given slope and the line through two points; recognise parallel and perpendicular lines
- Compute the distance from a point to a line
- Write the equation of a circle, find its centre and radius by completing the square, and find where a line meets a circle
A map app stores your home and your school as two pairs of numbers, and from these numbers alone it computes the straight-line distance between them. A Wi-Fi router covers a disc around itself: is your room inside it? A video game has to decide at every moment whether a ball is going to hit a wall. All these questions are answered by the coordinate method: points become pairs of numbers, lines and circles become equations, and a geometry problem turns into an algebra problem. You already used this idea in the lesson “Law of sines and law of cosines: solving triangles” to prove the law of cosines; now we turn it into a complete tool.
You know the coordinate plane and the linear function y = kx + b from the lesson “Linear functions and their graphs”, and the coordinates and length of a vector from “Vectors”. Here these tools are joined into one method. Points are written as A(x₁, y₁), B(x₂, y₂).
The distance between two points and the midpoint of a segment
Draw a horizontal line through A and a vertical line through B; they meet at K(x₂, y₁). Triangle AKB is a right triangle with legs |x₂ − x₁| and |y₂ − y₁|. By the Pythagorean theorem, AB² = (x₂ − x₁)² + (y₂ − y₁)². The absolute value signs can be dropped because a square is never negative. The midpoint M lies halfway from A to B: along each axis it moves by half of the coordinate difference.
- x₁, y₁the coordinates of A
- x₂, y₂the coordinates of B
- ABthe distance between the points
The distance between two points is the square root of the sum of the squared coordinate differences. The order of the points does not matter: (x₁ − x₂)² = (x₂ − x₁)². It is also the length of the vector AB⃗.
1) Find the distance between A(−1, 3) and B(5, −5).
2) Determine the type of the triangle with vertices A(1, 1), B(4, 5), C(8, 2).
3) On the x-axis, find the point P that is equally far from A(1, 4) and B(5, 2).
Show solutionHide solution
2) AB = √(3² + 4²) = 5, BC = √(4² + (−3)²) = 5, AC = √(7² + 1²) = √50.
AB = BC, and also AB² + BC² = 25 + 25 = 50 = AC². The triangle is isosceles and right-angled, with the right angle at B.
3) Let P(x, 0). PA² = PB²: (x − 1)² + 16 = (x − 5)² + 4 ⇒ x² − 2x + 17 = x² − 10x + 29 ⇒ 8x = 12 ⇒ x = 1.5.
Answer: P(1.5, 0). Check: PA² = 0.25 + 16 = 16.25, PB² = 12.25 + 4 = 16.25.
- x₁, y₁, x₂, y₂the coordinates of the endpoints A and B
- Mthe midpoint of AB
Each coordinate of the midpoint is the arithmetic mean of the corresponding coordinates of the endpoints. It follows from AM⃗ = ½ · AB⃗.
1) A(−3, 4) and B(5, 0). Find the midpoint of AB.
2) M(2, −1) is the midpoint of AB and A(−1, 3). Find B.
3) In parallelogram ABCD, A(0, 0), B(5, 1), C(7, 4). Find the vertex D.
Show solutionHide solution
2) (−1 + x) / 2 = 2 ⇒ x = 5; (3 + y) / 2 = −1 ⇒ y = −5. B(5, −5). Shortcut: B = 2M − A.
3) The diagonals of a parallelogram bisect each other, so AC and BD have the same midpoint: ((0 + 7) / 2, (0 + 4) / 2) = (3.5, 2).
Then D = (2 · 3.5 − 5, 2 · 2 − 1) = D(2, 3).
The equation of a line
An equation in x and y that the coordinates of every point of the figure satisfy and the coordinates of no other point satisfy. To check whether a point lies on the figure, substitute its coordinates: a true equality means it does.
Why is the equation of every line of the first degree? Every line is the perpendicular bisector of some segment PQ, that is, the set of points M(x, y) equally far from P and Q. If you write MP² = MQ² with the distance formula, x² and y² appear on both sides and cancel, and an equation of the form Ax + By + C = 0 remains.
- x, ythe coordinates of any point of the line
- A, Bcoefficients, not both zero
- Cthe constant term
The general equation of a line. B = 0 gives a vertical line x = −C/A, A = 0 gives a horizontal line y = −C/B, and C = 0 gives a line through the origin.
If B ≠ 0, solve for y: y = −(A/B)x − C/B. This is the equation y = kx + b from the lesson “Linear functions and their graphs”. The number k is the slope: it equals the tangent of the angle α that the line makes with the positive direction of the x-axis. Take two points of the line: the ratio Δy / Δx is the tangent of that angle (see the drawing).
- kthe slope
- αthe angle between the line and the positive x-axis (α ≠ 90°)
- bthe y-coordinate of the point (0, b) where the line crosses the y-axis
- (x₁, y₁), (x₂, y₂)two points of the line, x₁ ≠ x₂
k > 0 — α is acute and the line rises; k < 0 — α is obtuse and the line falls; k = 0 — a horizontal line. A vertical line (α = 90°) has no slope; its equation is x = x₀.
- (x₀, y₀)a given point of the line
- kthe slope
The line through a given point M₀(x₀, y₀) with slope k. Substituting x = x₀ gives y = y₀, so the line really passes through M₀.
1) Write the equation of the line through M(2, 1) that makes a 45° angle with the x-axis.
2) Write the equation of the line through M(−1, 4) and N(3, −4).
3) Find the slope of the line 3x − 4y + 12 = 0 and the points where it crosses the axes.
4) Write the equation of the line through (3, 5) and (3, −2).
Show solutionHide solution
2) k = (−4 − 4) / (3 − (−1)) = −8/4 = −2. y − 4 = −2(x + 1) ⇒ y = −2x + 2, that is 2x + y − 2 = 0. Check (N): 2 · 3 + (−4) − 2 = 0.
3) 4y = 3x + 12 ⇒ y = 0.75x + 3, k = 0.75 (tan α = 0.75, α ≈ 36.9°). x = 0 ⇒ y = 3: (0, 3); y = 0 ⇒ x = −4: (−4, 0).
4) x₁ = x₂ = 3, so the slope formula would divide by zero: the line is vertical, x = 3, in general form x − 3 = 0 (A = 1, B = 0, C = −3).
- (x₁, y₁), (x₂, y₂)two points of the line (x₁ ≠ x₂, y₁ ≠ y₂)
- x, ythe coordinates of any point of the line
The equation of the line through two points. Each fraction shows what part of the way from the first point to the second the point (x, y) has covered along that axis; on a line these parts are equal.
1) Write the equation of the line through (1, 2) and (4, 8).
2) Write the equation of the line through (−2, 1) and (2, −1).
3) Do the points (0, −1), (2, 3) and (5, 9) lie on one line?
Show solutionHide solution
2) (x + 2) / 4 = (y − 1) / (−2) ⇒ −2(x + 2) = 4(y − 1) ⇒ −2x − 4 = 4y − 4 ⇒ x + 2y = 0. Check: 2 + 2 · (−1) = 0.
3) The line through the first two points: k = (3 + 1) / 2 = 2, y = 2x − 1. Third point: 2 · 5 − 1 = 9 — it satisfies the equation, so yes, the three points lie on one line.
Parallel and perpendicular lines
Two non-vertical lines are parallel when they make the same angle with the x-axis, that is, when their slopes are equal; if also b₁ = b₂, the lines coincide. For perpendicularity take the direction vectors of the lines, (1, k₁) and (1, k₂): one unit to the right, a line goes up by k units. By the perpendicularity condition from the lesson “Vectors”, their dot product is zero: 1 · 1 + k₁ · k₂ = 0.
- l₁, l₂the lines y = k₁x + b₁ and y = k₂x + b₂
- k₁, k₂their slopes
Parallel lines have equal slopes; for perpendicular lines the product of the slopes is −1, that is k₂ = −1/k₁.
In the general form, look at the vector n⃗ = (A, B). If (x₁, y₁) and (x₂, y₂) lie on the line, subtracting their equations gives A(x₂ − x₁) + B(y₂ − y₁) = 0: n⃗ is perpendicular to the line. It is called the normal vector. Two lines are perpendicular exactly when their normal vectors are perpendicular.
- l₁, l₂the lines A₁x + B₁y + C₁ = 0 and A₂x + B₂y + C₂ = 0
- (A₁, B₁), (A₂, B₂)their normal vectors
In general form: if the dot product of the normal vectors is zero, the lines are perpendicular; if the normal vectors are collinear, the lines are parallel or coincide.
1) Write the equations of the lines through P(1, 3) that are a) parallel, b) perpendicular to y = 2x − 5.
2) Are the lines 2x − 3y + 6 = 0 and 3x + 2y − 1 = 0 perpendicular?
3) For which m are the lines y = (m − 1)x + 3 and y = 2x − 4 a) parallel, b) perpendicular?
Show solutionHide solution
b) k = −1/2: y − 3 = −½(x − 1) ⇒ y = −½x + 3.5, that is x + 2y − 7 = 0. Check (P): 1 + 6 − 7 = 0.
2) A₁A₂ + B₁B₂ = 2 · 3 + (−3) · 2 = 0 ⇒ yes, they are perpendicular. With slopes: 2/3 · (−3/2) = −1.
3) a) m − 1 = 2 ⇒ m = 3 (b₁ = 3 ≠ −4, so the lines do not coincide).
b) (m − 1) · 2 = −1 ⇒ m − 1 = −½ ⇒ m = 0.5.
A(−1, 2) and B(3, 6).
1) Write the equation of the perpendicular bisector of AB.
2) At which point does it meet the line y = 2x − 1?
Show solutionHide solution
y − 4 = −(x − 1) ⇒ y = −x + 5, that is x + y − 5 = 0.
Check: the point (0, 5) is at the same distance √10 from A and from B.
2) The intersection point is the solution of the system of the two equations (see “Systems of linear equations”): −x + 5 = 2x − 1 ⇒ x = 2, y = 3. Answer: (2, 3).
The distance from a point to a line
The shortest path from a point P(x₀, y₀) to a line goes along the perpendicular, that is, along the normal vector n⃗ = (A, B). So the foot of the perpendicular is H(x₀ − tA, y₀ − tB) for some number t. H lies on the line: A(x₀ − tA) + B(y₀ − tB) + C = 0, hence t = (Ax₀ + By₀ + C) / (A² + B²). The distance is PH = |t| · |n⃗| = |t| · √(A² + B²).
- (x₀, y₀)the given point
- Ax + By + C = 0the general equation of the line
- dthe distance from the point to the line
Substitute the point into the left side of the general equation, take the absolute value and divide by the length of the normal vector. d = 0 exactly when the point lies on the line.
1) Find the distance from P(2, 3) to the line 3x + 4y − 8 = 0.
2) Find the distance from the origin to the line 5x − 12y + 26 = 0.
3) Find the distance between the parallel lines 3x − 4y + 2 = 0 and 3x − 4y − 13 = 0.
Show solutionHide solution
2) d = |0 − 0 + 26| / √(25 + 144) = 26 / 13 = 2.
3) Take a point on the first line: x = 2 ⇒ 6 − 4y + 2 = 0 ⇒ y = 2, so (2, 2). Its distance to the second line: d = |6 − 8 − 13| / 5 = 15 / 5 = 3.
A triangle has vertices A(1, 6), B(4, 0), C(0, 3). Find the height from A and the area of the triangle.
Show solutionHide solution
BC = √(4² + 3²) = 5.
h = |3 · 1 + 4 · 6 − 12| / 5 = 15 / 5 = 3.
S = ½ · BC · h = ½ · 5 · 3 = 7.5.
The equation of a circle
A circle with centre Q(a, b) and radius R is the set of all points M(x, y) with QM = R. By the distance formula, √((x − a)² + (y − b)²) = R. Both sides are non-negative, so we may square them.
- (a, b)the centre of the circle
- Rthe radius
- (x, y)any point of the circle
The equation of a circle. With the centre at the origin: x² + y² = R². Here a and b are the coordinates of the centre; do not confuse them with the numbers in the equation of a line.
1) Write the equation of the circle with centre (2, −3) and radius 5. Does A(5, 1) lie on it? Is the origin inside it?
2) A(−1, 2) and B(5, 10) are the ends of a diameter of a circle. Write its equation.
3) Write the equation of the circle with centre (4, −3) that touches the x-axis.
Show solutionHide solution
2) The centre is the midpoint of the diameter: (2, 6). R = AB / 2 = √(36 + 64) / 2 = 10 / 2 = 5. (x − 2)² + (y − 6)² = 25.
3) The distance from the centre to the x-axis is |−3| = 3, and that is the radius: (x − 4)² + (y + 3)² = 9.
Because the left side is the squared distance to the centre, the position of a point (x₀, y₀) is easy to find: (x₀ − a)² + (y₀ − b)² < R² — the point is inside the circle, = R² — on it, > R² — outside. If the equation is given in expanded form, complete the square in x and in y, the method you know from “Quadratic equations”.
1) Find the centre and radius of the circle x² + y² − 6x + 4y − 12 = 0.
2) Does the equation x² + y² + 2x − 4y + 10 = 0 describe a circle?
3) A Wi-Fi router is at the origin and works within a radius of 15 m (units are metres). Will a phone get a signal at (9, 13) and at (9, 12)?
Show solutionHide solution
2) (x + 1)² + (y − 2)² = −10 + 1 + 4 = −5. A sum of squares cannot be negative: there are no points at all, it is not a circle.
3) 9² + 13² = 81 + 169 = 250 > 225 = 15² — (9, 13) is outside, no signal.
9² + 12² = 81 + 144 = 225 — (9, 12) is exactly on the boundary (distance 15 m).
Where a line and a circle meet
The common points of a line and a circle are the solutions of the system of their equations. Substitute y from the line into the circle equation and you get a quadratic equation in x. Its discriminant settles everything: D > 0 — two common points (the line is a secant), D = 0 — one point (a tangent), D < 0 — no common points. Geometrically, the same answer comes from comparing the distance d from the centre to the line with the radius R.
- dthe distance from the centre of the circle to the line
- Rthe radius of the circle
A tangent is perpendicular to the radius drawn to the point of tangency (see the lesson “Circle theorems: chords, tangents and inscribed angles”).
- 1Write the line as y = kx + b
For a vertical line take x = x₀ and substitute that instead.
- 2Substitute into the circle equation
Expand the brackets and collect a quadratic equation in x.
- 3Look at the sign of the discriminant
D > 0 — two points, D = 0 — tangency, D < 0 — no common points.
- 4Find y
Put each x into the equation of the line.
- 5Check
Every point must satisfy both equations.
Find the common points of:
1) x² + y² = 25 and y = x + 1;
2) x² + y² = 25 and 3x + 4y − 25 = 0;
3) (x − 2)² + (y + 1)² = 4 and y = x + 3.
Show solutionHide solution
y = 4 or y = −3. Answer: (3, 4) and (−4, −3) — a secant.
2) d = |0 + 0 − 25| / √(9 + 16) = 25 / 5 = 5 = R — a tangent. Substituting y = (25 − 3x) / 4: 16x² + (25 − 3x)² = 400 ⇒ 25x² − 150x + 225 = 0 ⇒ (x − 3)² = 0 ⇒ x = 3, y = 4. The point of tangency is (3, 4).
3) The line: x − y + 3 = 0; centre (2, −1), R = 2. d = |2 + 1 + 3| / √2 = 6/√2 = 3√2 ≈ 4.24 > 2 — no common points.
For which values of b does the line y = x + b touch the circle x² + y² = 8? Find the points of tangency.
Show solutionHide solution
|b| / √2 = 2√2 ⇒ |b| = 4 ⇒ b = 4 or b = −4.
Check with the discriminant: x² + (x + b)² = 8 ⇒ 2x² + 2bx + b² − 8 = 0, D = 4b² − 8(b² − 8) = 64 − 4b² = 0 ⇒ b² = 16.
The point of tangency has x = −b/2: for b = 4 it is (−2, 2), for b = −4 it is (2, −2).
- 1.A(1, 2), B(4, 6): AB =
- 2.Midpoint of A(−2, 5) and B(4, 1): its x-coordinate is
- 3.A line perpendicular to y = 3x − 1 has slope k =
- 4.The circle (x − 3)² + (y + 1)² = 49 has radius R =
- 5.The distance from O(0, 0) to the line 3x + 4y − 10 = 0 is d =
Key points
- AB = √((x₂ − x₁)² + (y₂ − y₁)²); the coordinates of a midpoint are the means of the coordinates of the endpoints.
- Every line: Ax + By + C = 0; a non-vertical line: y = kx + b, k = tan α = Δy / Δx; through a point: y − y₀ = k(x − x₀).
- Parallel lines: k₁ = k₂; perpendicular lines: k₁ · k₂ = −1, or A₁A₂ + B₁B₂ = 0 in general form.
- Distance from a point to a line: d = |Ax₀ + By₀ + C| / √(A² + B²).
- Circle: (x − a)² + (y − b)² = R²; in an expanded equation, find the centre and radius by completing the square.
- Line and circle: substitute and look at the discriminant, or compare d with R — 2, 1 or 0 common points.
Check yourself
12 questions. Every correct answer earns XP.