Engineering Mathematics · Lesson 4 of 28
Analytic Geometry: Lines, Distance, and the Conic Sections
Turn geometry into algebra on the coordinate plane, distances, midpoints, slopes and lines, the circle, and the parabola, ellipse, and hyperbola, unified by eccentricity, with every formula walked to a clean number.
16 min read · Super EaFree lesson
Analytic geometry is the bridge that lets you answer geometry questions with algebra: every point becomes an ordered pair, every line and curve becomes an equation, and distances and slopes fall out of formulas instead of drawings. The MSTE paper leans on this constantly, in route surveying, in structural geometry, and in pure plane-geometry items. This lesson gives you the coordinate toolkit and the four conic sections, with the arithmetic carried all the way to a number so you can check your own habits against it.
The rectangular coordinate system and distance
The Cartesian plane locates a point by an ordered pair (x, y): x measured along the horizontal axis and y along the vertical axis, splitting the plane into four quadrants. The straight-line distance between two points P1(x1, y1) and P2(x2, y2) comes straight from the Pythagorean theorem, with the horizontal and vertical gaps as the legs:
d = sqrt[(x2 - x1)^2 + (y2 - y1)^2]
Worked example: Find the distance between A(2, 1) and B(6, 4). The legs are x2 - x1 = 4 and y2 - y1 = 3, so d = sqrt(4^2 + 3^2) = sqrt(16 + 9) = sqrt(25) = 5. The classic error is to add the legs (4 + 3 = 7) or to skip the square root and report 25.
Midpoint and division of a line segment
The midpoint of P1(x1, y1) and P2(x2, y2) is just the average of the coordinates: M = ((x1 + x2)/2, (y1 + y2)/2). More generally, a point that divides the segment from P1 to P2 in the ratio m:n, measured starting at P1, is
x = x1 + (m / (m + n))(x2 - x1), y = y1 + (m / (m + n))(y2 - y1).
Setting m = n = 1 recovers the midpoint, since m/(m + n) becomes 1/2.
Worked example (midpoint): For P1(-5, 8) and P2(3, -2), M = ((-5 + 3)/2, (8 + (-2))/2) = (-2/2, 6/2) = (-1, 3). Worked example (division): Divide the segment from P1(1, 2) to P2(10, 8) in the ratio 1:2 from P1. The fraction is m/(m + n) = 1/3, so x = 1 + (1/3)(10 - 1) = 1 + 3 = 4 and y = 2 + (1/3)(8 - 2) = 2 + 2 = 4. The dividing point is (4, 4). The common slip is to use 1/2 instead of 1/3, which lands you on the midpoint (5.5, 5) instead.
Slope and the angle between two lines
The slope m of a line measures its steepness: m = (y2 - y1)/(x2 - x1), and it equals tan(theta), where theta is the angle of inclination the line makes with the positive x-axis. Two useful facts follow at once: parallel lines have equal slopes, and perpendicular lines have slopes whose product is -1 (each is the negative reciprocal of the other). When two lines with slopes m1 and m2 cross, the acute angle phi between them satisfies
tan(phi) = |(m2 - m1) / (1 + m1 m2)|.
Worked example (angle of inclination): A line with slope sqrt(3) has tan(theta) = sqrt(3), so theta = 60 degrees. Worked example (angle between lines): Lines with slopes m1 = 2 and m2 = -3 give tan(phi) = |(-3 - 2)/(1 + (2)(-3))| = |-5 / -5| = 1, so phi = 45 degrees. Worked example (perpendicular): A line perpendicular to one of slope 3/4 has slope -4/3, the negative reciprocal; just flipping the sign to -3/4 is the trap.
Forms of the straight line
The same line can be written three ways, and picking the right one for the given information saves time.
| Form | Equation | Best when you know |
|---|---|---|
| Slope-intercept | y = mx + b | slope m and y-intercept b |
| Point-slope | y - y1 = m(x - x1) | slope m and one point (x1, y1) |
| General (standard) | Ax + By + C = 0 | you need a tidy integer form; slope = -A/B |
From the general form Ax + By + C = 0 the slope is -A/B, the x-intercept is -C/A (set y = 0), and the y-intercept is -C/B (set x = 0).
Worked example: Write the line through (3, -1) with slope 2. Point-slope gives y - (-1) = 2(x - 3), so y + 1 = 2x - 6, which rearranges to y = 2x - 7. Worked example (general form): For 4x + 3y - 12 = 0, the slope is -A/B = -4/3, and the y-intercept is found by setting x = 0: 3y = 12, so y = 4.
Distance from a point to a line
To find how far a point (x0, y0) sits from the line Ax + By + C = 0, substitute the point into the left side and divide by the length of the coefficient vector:
d = |A x0 + B y0 + C| / sqrt(A^2 + B^2).
Worked example: Distance from (7, 3) to 4x + 3y - 12 = 0. The numerator is |4(7) + 3(3) - 12| = |28 + 9 - 12| = |25| = 25, and the denominator is sqrt(4^2 + 3^2) = sqrt(25) = 5, so d = 25/5 = 5. Forgetting to divide by sqrt(A^2 + B^2) and reporting 25 is the standard miss.
The circle
A circle is the set of points a fixed distance r (the radius) from a fixed center (h, k). Its center-radius form comes directly from the distance formula:
(x - h)^2 + (y - k)^2 = r^2
Expanding gives the general form x^2 + y^2 + Dx + Ey + F = 0, from which the center is (-D/2, -E/2) and the radius is r = sqrt[(D/2)^2 + (E/2)^2 - F]. To go the other way, complete the square on the x-terms and the y-terms.
Worked example: Identify x^2 + y^2 - 10x + 4y - 7 = 0. Here D = -10, E = 4, F = -7. The center is (-D/2, -E/2) = (5, -2), and r = sqrt[(-5)^2 + (2)^2 - (-7)] = sqrt[25 + 4 + 7] = sqrt(36) = 6. Watch the sign of F: subtracting a negative F adds 7 under the root, and dropping that step gives the wrong radius sqrt(29).
Conic sections and the parabola
Slicing a cone at different angles produces the parabola, ellipse, and hyperbola (the circle is the special upright cut). Each has a standard equation you should recognize on sight. A parabola is the set of points equidistant from a fixed point, the focus, and a fixed line, the directrix. With vertex (h, k) and focal distance p (the vertex-to-focus distance):
- (x - h)^2 = 4p(y - k) opens up if p > 0, down if p < 0 (vertical axis).
- (y - k)^2 = 4p(x - h) opens right if p > 0, left if p < 0 (horizontal axis).
The focus lies a distance p from the vertex along the axis, the directrix lies a distance p on the opposite side, and the latus rectum (the focal chord across the opening) has length |4p|.
Worked example: For (x - 1)^2 = 8(y + 2), the vertex is (1, -2) and 4p = 8, so p = 2 and the parabola opens up. The focus is p above the vertex: (1, -2 + 2) = (1, 0), and the directrix is p below: y = -2 - 2 = -4. Mistaking the vertex (1, -2) for the focus is the common trap.
The ellipse
An ellipse is the set of points whose distances to two fixed foci add to a constant. With center (h, k) and the major axis along x, its standard form is
(x - h)^2 / a^2 + (y - k)^2 / b^2 = 1, with a > b.
Here a is the semi-major axis, b the semi-minor axis, and the foci sit a distance c from the center along the major axis, where a^2 = b^2 + c^2 (equivalently c = sqrt(a^2 - b^2)). The eccentricity e = c/a measures how stretched the ellipse is, and for an ellipse 0 < e < 1.
Worked example: For x^2 / 25 + y^2 / 9 = 1, a^2 = 25 gives a = 5 and b^2 = 9 gives b = 3, so c = sqrt(25 - 9) = sqrt(16) = 4. The foci are at (+/- 4, 0) and the eccentricity is e = c/a = 4/5 = 0.8. Using b/a = 3/5 = 0.6 by mistake is the usual error.
The hyperbola
A hyperbola is the set of points whose distances to two foci differ by a constant. With center (h, k) and a horizontal transverse axis:
(x - h)^2 / a^2 - (y - k)^2 / b^2 = 1
The foci sit a distance c from the center with c^2 = a^2 + b^2 (note the plus sign, the opposite of the ellipse), the two branches approach the asymptotes y - k = +/- (b/a)(x - h), and the eccentricity is again e = c/a, but now e > 1.
Worked example: For x^2 / 9 - y^2 / 16 = 1, a = 3 and b = 4, so c = sqrt(9 + 16) = sqrt(25) = 5. The foci are at (+/- 5, 0), the asymptotes are y = +/- (4/3)x, and the eccentricity is e = c/a = 5/3, which is about 1.67. The most common slip is reaching for c = sqrt(a^2 - b^2); hyperbolas add, ellipses subtract.
Eccentricity: the number that unifies the conics
Every conic can be described by a single number, the eccentricity e, which measures how far its shape departs from a circle. This one idea ties all four curves together.
| Conic | Eccentricity e | Focus-directrix relation |
|---|---|---|
| Circle | e = 0 | foci coincide at the center |
| Ellipse | 0 < e < 1 | c = e a, with c < a |
| Parabola | e = 1 | every point equidistant from focus and directrix |
| Hyperbola | e > 1 | c = e a, with c > a |
Read the table as a sliding scale: at e = 0 the curve is a perfect circle, as e grows toward 1 the ellipse stretches, at exactly e = 1 it opens into a parabola, and beyond 1 it splits into the two branches of a hyperbola.
Exam-day strategy
- On distance problems, square the leg gaps and add before taking one square root; never add the legs first, and never forget the final root.
- Read the ratio for a dividing point carefully: the factor is m/(m + n), not m/n, and equal parts (1:1) must reduce to the midpoint as a sanity check.
- For perpendicular lines use the negative reciprocal (flip and change sign); merely changing the sign, or merely flipping, each gives a wrong distractor.
- Convert any circle in general form by completing the square, and mind the sign of F under the radical, r = sqrt[(D/2)^2 + (E/2)^2 - F].
- Fix the conic sign rule in memory: ellipse uses c^2 = a^2 - b^2, hyperbola uses c^2 = a^2 + b^2, and eccentricity e = c/a is below 1 for the ellipse and above 1 for the hyperbola.
- If an item only asks which conic a curve is, check the squared terms: same sign and equal denominators means a circle, same sign and unequal denominators an ellipse, opposite signs a hyperbola, and only one squared term a parabola.
Marking it done updates your Exam-Ready progress.
Lesson quiz
Check you actually have it
20 items on this lesson alone, randomized each try, with the reasoning on every answer.
Analytic geometry: quick check
Item 01 / 20 · Score 0
What are the asymptotes of the hyperbola x^2/16 - y^2/9 = 1?
This whole first section is free
Read every lesson in Engineering Mathematics and take its quizzes free. The full CELE reviewer unlocks the other 5 subjects, all section tests, and the timed mock exams — one payment, lifetime access, ₱399.
Unlock the full reviewer