Contents / Geometry / Coordinate Geometry
Chapter 4
Coordinate Geometry
The coordinate plane, distance and midpoint, slope, lines, circles, parabolas, and ellipses.
Introduction
The coordinate plane, distance and midpoint, slope, lines, circles, parabolas, and ellipses.
The Cartesian coordinate system assigns to each point in the plane an ordered pair of real numbers relative to two perpendicular axes intersecting at the origin.
It allows geometry to be translated into algebra and is the foundation of analytic geometry, calculus, and computer graphics.
4.1Axes, Origin, and Coordinates
Definition 4.1 (Cartesian coordinates). Two perpendicular lines — the x-axis horizontal, the y-axis vertical — cross at the origin . The x-coordinate of a point is its signed distance to the y-axis (positive to the right, negative to the left); the y-coordinate is its signed distance to the x-axis (positive up, negative down).
"Signed" is the key word: the sign is what encodes direction, so and are mirror images across the y-axis, not the same point.
Definition 4.2 (Quadrants). The two axes cut the plane into four regions called quadrants, numbered counter-clockwise starting from the top-right, with sign patterns I , II , III , IV .
Points that sit on an axis (a zero coordinate) belong to no quadrant.
Intuition. The grid is like a city map with numbered streets (x) and avenues (y). The origin is the downtown crossing.
Positive x is right, positive y is up; signs tell you which "neighborhood" (quadrant) the point is in.
Example 4.3. Locate and name its quadrant.
Solution. read the x-coordinate: , so the point is 3 units to the right of the y-axis. Step 2 — read the y-coordinate: , so the point is 4 units below the x-axis. Step 3 — match the sign pattern to the quadrant table: that is quadrant IV.
Sanity check: right-and-down lands in the bottom-right region, which is indeed quadrant IV. By the same reading, has pattern (left and up), so it is in quadrant II.□
4.2Distance, Midpoint, and Slope from Coordinates
These three formulas all come from the same right triangle you can draw between any two points, using the horizontal gap and the vertical gap as the legs.
Definition 4.4 (Distance). The distance between and is the hypotenuse of that triangle, by the Pythagorean theorem:
Definition 4.5 (Midpoint). The midpoint of and averages each coordinate:
Definition 4.6 (Slope). The slope of the segment is the rise over the run,
defined only when ; a vertical segment has no run, so its slope is undefined.
Intuition. Distance is the straight-line "as the crow flies" using the grid legs as a right triangle.
Midpoint is the average address. Slope is how many y-units you rise per x-unit you run (steepness).
Example 4.7. Take the points and and compute all three quantities.
Solution. the gaps: and . Step 2 — distance: . Step 3 — midpoint: . Step 4 — slope: .
Sanity check on the midpoint: it should be equidistant from both ends. From to is , exactly half of the full distance . Consistent.□
4.3Lines and Circles in Coordinates
Definition 4.8 (Equations of a line and a circle). A line is the solution set of
and the circle with center and radius is the solution set of
These equations turn geometric questions into algebraic ones. The key idea is that a curve is the set of all points whose coordinates satisfy its equation, so "does this figure pass through that point?" becomes "does plugging in make the equation true?" and "where do two figures meet?" becomes "solve the two equations at once."
Intuition. An equation is a rule that every point on the figure obeys. Plug in the coordinates; if true, the point is on the figure.
Solving two equations finds intersection points (where two figures cross).
Example 4.9. Find where the line meets the circle .
Solution. substitute the line into the circle so only remains: . Step 2 — expand: , which tidies to . Step 3 — solve the quadratic. Discriminant , so there are two real intersections. . Step 4 — recover from the line for each root: .
Sanity check: a positive discriminant means the line cuts the circle at two points, matching the geometry of a line passing through a circle's interior. Numerically or ; plugging back gives , and . Consistent.□
- Swapping x and y: (3,4) is different from (4,3); x is always first (horizontal).
- Forgetting signs when plotting: Negative coordinates go left or down.
- Assuming slope is always defined: Vertical lines have undefined slope (x = constant).
- Mixing distance formula with midpoint formula: One has square root and squares; the other is just averages.
The distance formula gives the Euclidean distance between two points in the plane: .
It is a direct application of the Pythagorean theorem to the differences in coordinates.
4.4Derivation
Theorem 4.10 (Distance formula). The distance between and is
Proof. Drop a horizontal segment and a vertical segment from the two points to the corner point . This builds a right triangle with legs (horizontal run) and (vertical rise), whose hypotenuse is the straight-line distance . The Pythagorean theorem gives
the absolute-value bars vanishing because squaring already discards sign. Taking the nonnegative square root gives the formula.∎
Because the bars vanish, the order of subtraction inside each difference does not matter.
Intuition. Draw a horizontal and vertical line between the two points; they form the legs of a right triangle. The straight line between the points is the hypotenuse.
Square, add, square-root — the same 3-4-5 idea for any numbers.
Example 4.11. From to : the legs are and , so .
Solution.
- From to : , , so again — the same triangle, just shifted.
- Sanity check: is longer than either leg ( or ) but shorter than their sum (), exactly as the triangle inequality requires for a genuine hypotenuse.
4.5In 3D and Higher
Definition 4.12 (Distance in three and more dimensions). In 3D,
and in dimensions the same pattern applies: subtract corresponding coordinates, square, sum, and take the square root. In vector language this is the Euclidean norm of the difference vector,
(This is the Euclidean distance specifically — it assumes flat, straight-line space; on a curved surface such as a sphere the shortest path is different.)
Intuition. In 3D you just add the squared difference in the third direction (up/down) before taking square root.
It is the "ordinary" straight-line distance we experience in our space.
Example 4.13. From to :
Solution. coordinate differences: , , . Step 2 — square and sum: . Step 3 — square root: .
Sanity check: the largest single coordinate gap is , and the full 3D distance is larger than any one leg but no larger than their sum . Consistent.□
4.6Applications
Used everywhere: length of vectors, collision detection, GPS (great-circle is different but Euclidean is local approximation), computer graphics, physics (displacement magnitude).
Intuition. Any time you want "how far apart are these two spots on the map or in the game world," you use the distance formula (or its 3D version).
It tells you the length of the arrow from one point to the other.
Example 4.14. Two game characters stand at and , and an attack has range units.
Solution. the gaps: , . Step 2 — distance: . Step 3 — compare to range: , so the target is out of reach.
Efficiency note used in real game engines: because the square root is the expensive part, engines often compare squared distances instead. Here versus range; since , same conclusion, no square root needed.□
- Forgetting the square root: The sum of squares is not the distance; you must take the root to get length.
- Mixing up which is x and y: Order inside the deltas does not matter (squared), but you must subtract corresponding coordinates.
- Using Manhattan distance (|dx| + |dy|) by mistake: That is grid-path distance, not straight-line.
- Applying in non-Euclidean spaces without adjustment: On a sphere or in taxicab geometry the formula is different.
The midpoint of a line segment is the point that divides the segment into two equal parts. It is the average of the endpoints.
In coordinate geometry the midpoint of and is .
4.7Definition and Coordinate Formula
Definition 4.15 (Midpoint). The midpoint of a segment is the unique point on with .
Proposition 4.16 (Vector and coordinate form). In vectors the midpoint is the average of the two position vectors,
a coordinate-free formula that works in 2D, 3D, or any dimension. In coordinates that vector average is just the average of the corresponding components, taken independently for and (and , if present).
Intuition. The midpoint is the exact middle of the segment; if you fold the segment in half the crease is at the midpoint.
On a map, the midpoint is the average address of the two ends.
Example 4.17 ((forward):). Endpoints and . Average each coordinate: , . So .
Solution.
- Sanity check: the midpoint should be equidistant from both ends. From to is , and to is . Equal, as required.
Example 4.18 ((reverse):). Sometimes you know the midpoint and one endpoint and must find the other. Suppose is the midpoint of and unknown .
Solution. write the midpoint equation coordinate-wise: and . Step 2 — solve each: , and . Step 3 — so .
Shortcut and sanity check: the endpoint is a "reflection" of through , i.e. . Same answer.□
4.8Properties and Uses
The midpoint is the center of symmetry of the segment.
Theorem 4.19 (Midline theorem). The segment joining the midpoints of two sides of a triangle is parallel to the third side and half as long.
Midpoints are used in the definition of medians, in vector geometry, and in computer graphics for subdivision.
Intuition. Connecting the midpoints of a triangle gives a smaller triangle similar and parallel-sided (Varignon's for quads too).
It is the balance point if the segment had uniform mass.
Example 4.20. Verify the midline theorem with concrete coordinates. Take with , , .
Solution. midpoint of : . Step 2 — midpoint of : . Step 3 — slope of : . Slope of : . Equal slopes, so . Step 4 — lengths: , and .
Sanity check: is exactly half of , and the slopes match — parallel and half length, exactly as the midline (midsegment) theorem promises.□
- Using the distance formula instead of averaging: Midpoint is not the distance; it is the coordinate average.
- Forgetting to average both coordinates: You must do x and y separately.
- Thinking the midpoint is always the origin: Only if the segment is centered at 0.
- Confusing with median: The median is the segment from vertex to midpoint of opposite side; the midpoint is the end point of the median on the side.
The slope of a line is the ratio of the vertical change (rise) to the horizontal change (run) between any two points on the line: .
It measures the steepness and direction of the line.
4.9Definition and Interpretation
Definition 4.21 (Slope of a line). For a non-vertical line through and ,
Positive slope: line rises left to right. Negative: falls. Zero: horizontal (all rise cancels). Undefined: vertical (run is , so the ratio divides by zero — this is why we say "undefined," not "infinite").
The slope is constant for any pair of points on a straight line — that constancy is precisely what makes a line straight. Pick any two points and you get the same .
Intuition. Slope is "how many units up or down you go for each unit you go right."
Positive like climbing a hill to the right; negative like going down; zero flat; undefined a straight up wall.
Example 4.22. Slope through and :
Solution. , . Step 2 — .
Interpretation: for every unit right, the line climbs units. Sanity check — swap the point order and the sign of both differences flips, leaving the ratio unchanged: . Slope does not depend on which point you call first.□
4.10Slope-Intercept and Point-Slope Forms
Definition 4.23 (Slope-intercept and point-slope forms). The slope-intercept form of a line with slope and y-intercept is
and its point-slope form through a known point is
These make it easy to write the equation from the information you happen to have: use slope-intercept when you know the slope and where the line crosses the y-axis, and point-slope when you know the slope and one arbitrary point (not necessarily on an axis). Both describe non-vertical lines only.
Intuition. y = m x + b is the "rule": start at b on the y-axis, then for each x step, add m times that step to y.
Point-slope says "from this known point, the change in y is m times change in x."
Example 4.24. Write the line with slope and y-intercept , then convert it to point-slope form using the point .
Solution. slope-intercept: . Step 2 — check it passes through : . Yes. Step 3 — point-slope through : . Step 4 — verify the two forms agree by expanding step 3: . Identical.
Sanity check: at , both forms give (the y-intercept), confirming they describe the same line.□
4.11Parallel and Perpendicular Slopes
Theorem 4.25 (Parallel and perpendicular slopes). Two non-vertical lines are parallel exactly when their slopes are equal, and perpendicular exactly when the slopes are negative reciprocals:
Two vertical lines are also parallel, even though neither has a defined slope. The vertical/horizontal pair is the one perpendicular case this rule cannot express, because a vertical line has no slope to multiply.
Intuition. Same slope = same steepness, never meet (parallel).
Negative reciprocal slopes = "opposite steepness" that make perfect 90° corners.
Example 4.26. The line has slope .
Solution. Parallel line: keep the same slope, change the intercept — e.g. . Perpendicular line: take the negative reciprocal of , which is — e.g. .
Sanity check on perpendicularity: . The product is , so the two lines meet at a right angle.□
- Division by zero for vertical: Vertical lines have undefined slope; do not say "infinite slope" in calculations.
- Reversing rise and run: Slope is rise/run (y over x), not run/rise.
- Assuming slope 0 means no line: Horizontal line has slope 0.
- Forgetting that slope is the same everywhere on the line: Unlike curves, straight lines have constant slope.
The equation of a line is an algebraic relation satisfied by exactly the points on that line.
Common forms: slope-intercept y = mx + b, point-slope y - y0 = m(x - x0), general ax + by + c = 0, and two-point form.
4.12Forms and Conversions
Method 4.27 (Line through two points).
- Compute the slope .
- Substitute it into the point-slope form with either point.
- Expand to slope-intercept or general form if you need it.
Equivalently, use the two-point form directly:
valid when and .
Special cases the slope forms cannot capture: a vertical line is (undefined slope), and a horizontal line is (slope ). The general form can represent every line, vertical ones included (take ).
Intuition. The equation is the "membership test": plug in (x,y); if it makes the equation true, the point is on the line.
Different forms are convenient for different information you are given (slope + intercept, point + slope, two points).
Example 4.28. Find the equation of the line through and .
Solution. slope: . Step 2 — point-slope with : . Step 3 — simplify to slope-intercept: .
Sanity check: substitute the other point , which we did not use to build the equation: . It lands on the line, confirming the result.□
4.13Intercepts and Graphing
Method 4.29 (Graphing a line from its intercepts).
- For the x-intercept, set and solve for .
- For the y-intercept, set and solve for .
- Plot the two intercepts and draw the line through them.
To graph from general form, find the intercepts this way or solve for .
Intuition. x-intercept is where the line crosses the horizontal axis (y=0 "no height").
y-intercept is where it crosses the vertical axis (x=0 "no run yet").
Example 4.30. Graph using its intercepts.
Solution. x-intercept: set , giving , so . Point . Step 2 — y-intercept: set , giving , so . Point . Step 3 — plot and and draw the line through them.
Sanity check: the slope between the two intercepts is . Solving the original equation for gives , whose slope is also . Consistent.□
4.14Parallel, Perpendicular, and Distance
Parallel: same slope (or both vertical).
Perpendicular: product of slopes (excluding the vertical/horizontal pair).
Theorem 4.31 (Distance from a point to a line). The distance from a point to the line is
The numerator measures how far the point is from satisfying the equation, and dividing by (the length of the normal vector ) rescales that into a true perpendicular distance. This requires , which always holds for a genuine line.
Intuition. Parallel lines have identical "tilt."
Perpendicular lines have "opposite tilts" whose product is -1.
The distance formula is the length of the perpendicular from the point to the line.
Example 4.32. Distance from the origin to the line .
Solution. identify , , . Step 2 — numerator: . Step 3 — denominator: . Step 4 — distance: .
Sanity check: this line has x-intercept and y-intercept , both at distance and from the origin respectively. The perpendicular distance is smaller than either (the perpendicular is the shortest route to the line), which is exactly what we expect.□
- Writing the general form with =0 but forgetting the constant term sign: ax + by + c = 0, c can be positive or negative.
- Assuming all lines have y = mx + b form: Vertical lines do not.
- Reversing the distance formula numerator/denominator: The denominator normalizes by the length of the normal vector.
- Forgetting to check if a point satisfies the equation when verifying: Always plug back in.
The equation of a circle with center and radius is .
Every point on the circle satisfies this; it is precisely the set of points at exact distance from the center. In fact the equation is just the distance formula with the square root removed: "distance from to equals " becomes "distance squared equals . "
4.15Standard and General Form
Definition 4.33 (Equation of a circle). In standard form, the circle with center and radius is
from which the center and radius can be read off directly. In general form it is
The general form is what you get after expanding the standard form and collecting terms; the center and radius are hidden until you complete the square. (Note the and coefficients are both and there is no term — that is what marks the equation as a circle rather than another conic.)
Intuition. The standard form says "distance to (h,k) is exactly r" in squared form (no square root needed).
The general form is the expanded polynomial; completing the square recovers the center and radius.
Example 4.34. Read center and radius from standard form: . Matching gives , (note the sign flip: ), and . Center , radius .
Solution. Now recover the same circle from general form .
group: . Step 2 — complete the square in : half of is , squared is , so . Step 3 — complete the square in : half of is , squared is , so . Step 4 — substitute: , i.e. .
Sanity check: this is the identical circle from the first part, center and radius .□
4.16Finding Center and Radius from Equation
Method 4.35 (Center and radius from the general form). Given , group the and terms, complete the square in each, and read off
The equation represents a real circle only when ; if it equals you get a single point, and if it is negative there are no real points at all.
Intuition. Completing the square is 'fixing' the equation so it looks like distance squared.
The numbers that get added/subtracted when completing tell you how far the center is shifted from (0,0).
Example 4.36. Find the center and radius of .
Solution. complete the square in : half of is , squared is , so . Step 2 — complete the square in : half of is , squared is , so . Step 3 — substitute: , i.e. . Step 4 — read off: center , radius .
Sanity check: the point is units right of the center, so it should lie on the circle. Plugging in: . It does.□
4.17Intersection with Lines and Other Circles
Method 4.37 (Intersecting a line with a circle).
- Substitute the line into the circle equation to get a quadratic in one variable.
- Read its discriminant : gives two intersection points (the line is a secant), gives one (tangent), and gives none (the line misses the circle).
- Substitute each root back into the line to recover the other coordinate.
For two circles, subtract one general equation from the other. The and terms cancel, leaving a linear equation — the radical axis, which passes through any common points. Solve that line against either circle.
Intuition. A line can miss, touch (tangent), or cut the circle at two points — the quadratic tells which.
The points in common satisfy both equations simultaneously.
Example 4.38. Intersect the circle with the line .
Solution. substitute : , so . Step 2 — solve: , so . Step 3 — since , the two intersection points are and .
Sanity check: each point should be exactly from the origin (the radius). Distance . Two real solutions confirm the line passes straight through the circle, as a line through the center must.□
- Forgetting to complete the square correctly (sign errors on h,k): h = -D/2, easy to drop the minus.
- Using the equation for a sphere by mistake: Sphere has three variables.
- Assuming the general form always represents a circle: If the radius squared comes out negative, it is an imaginary circle (no real points).
- Confusing radius with diameter in the equation: The r in the equation is always the radius.
A parabola is the set of points in the plane equidistant from a fixed point (the focus) and a fixed line (the directrix).
It is one of the conic sections and the graph of a quadratic function (with ).
4.18Definition and Standard Forms
Definition 4.39 (Standard forms of a parabola). The parabola with vertical axis is
with focus and directrix ; the parabola with horizontal axis is
with focus and directrix .
The vertex sits at , and is the focal length — the signed distance from the vertex to the focus. Its sign controls the opening direction: for the vertical form, opens upward and opens downward.
Intuition. Every point on the parabola is exactly as far from the focus "magnet" as from the directrix "wall."
The vertex is the "bottom" (or side) where it turns around.
Example 4.40. Find the focus and directrix of .
Solution. rewrite in standard form: multiply by to get . Comparing with (vertex at the origin, ) gives , so . Step 2 — focus is . Step 3 — directrix is .
Sanity check with the vertex , which must be equidistant from focus and directrix: distance to the focus is , and distance to the line is . Equal, as the definition demands.□
4.19Reflective Property and Applications
Theorem 4.41 (Reflective property of the parabola). Rays parallel to the axis reflect off the parabola and pass through the focus, and rays from the focus reflect into a beam parallel to the axis.
Used in satellite dishes, headlights, telescopes, and the paths of projectiles (under constant gravity, ignoring air resistance).
Intuition. A parabolic mirror sends all parallel incoming rays (from a distant star or satellite) to one point (the focus), where you put your receiver.
Headlights do the reverse: light at the focus bounces into a parallel beam.
Example 4.42. Satellite dish shaped as paraboloid of revolution. Signal from satellite (essentially parallel rays) hits the dish and reflects to the feed horn at the focus. All paths have equal length, signals arrive in phase.
4.20Vertex Form and Completing the Square
Definition 4.43 (Vertex form). The vertex form of a parabola is
showing the vertex directly.
The coefficient determines width and direction: opens upward, downward, and larger makes a narrower parabola.
Completing the square on converts it to vertex form. Factor out of the first two terms first, since the leading coefficient must be inside the square before you complete it.
Intuition. Vertex form shows the 'turning point' (h,k) and how 'wide' (a) the parabola opens directly.
Completing the square is the algebra trick that reveals the vertex without graphing.
Example 4.44. Convert to vertex form.
Solution. factor from the -terms: . Step 2 — complete the square inside: half of is , squared is , so . Step 3 — substitute: . Step 4 — read the vertex: ; since , it opens upward and is narrower than .
Sanity check: plug into the original equation: . The vertex -value matches.□
- Confusing focus/directrix with vertex: The vertex is midway between focus and directrix.
- Mixing vertical and horizontal parabolas: y = x^{2} is vertical (opens up/down); x = y^{2} is horizontal.
- Forgetting the 4p in the standard form: The coefficient is 4p, not p.
- Thinking all quadratic graphs are parabolas in the geometric sense: The geometric definition (focus/directrix) is equivalent to the algebraic quadratic only after rotation/translation in the plane.
An ellipse is the set of points whose sum of distances to two fixed points (the foci) is constant.
It is a conic section (a stretched circle) and the shape of planetary orbits (Kepler's first law). Contrast it with the hyperbola, which fixes the difference of the two distances instead of the sum.
4.21Definition and Standard Equation
Definition 4.45 (Standard equation of an ellipse). For foci at and with major axis length , the ellipse is
where and (so ). The center is the origin, midway between the foci, and the constant sum of distances to the foci is exactly .
Proposition 4.46 (Semi-axes and focal distance).
Proof. Evaluate the constant sum of distances at the top co-vertex . By symmetry the two distances there are equal, so each is , and the center, a focus and that co-vertex form a right triangle with hypotenuse and legs and .∎
Intuition. Two pins (foci) and a string of fixed length; the pencil traces the ellipse as it keeps the string taut.
The sum of distances to the two pins is always the same (the string length).
Example 4.47. Build the equation of the ellipse with foci and and constant distance-sum .
Solution. from the sum: , so . Step 2 — from the foci: (each focus is from the center). Step 3 — find : , so . Step 4 — assemble: .
Sanity check at the co-vertex : distance to each focus is , and , matching the required sum.□
4.22Vertices, Co-vertices, Eccentricity
Definition 4.48 (Vertices, co-vertices, eccentricity). For an ellipse centered at the origin with foci on the x-axis, the vertices are , the ends of the major axis, and the co-vertices are , the ends of the minor axis. The eccentricity is
Since , the eccentricity always satisfies ; is a circle, where the foci coincide at the center.
The major axis is the longer one (length ); the minor axis is the shorter (length ).
Intuition. Vertices are the 'ends' of the long direction; co-vertices the 'ends' of the short direction.
Eccentricity tells how 'squashed' the ellipse is: 0 perfect circle, close to 1 very flat.
Example 4.49. For the ellipse from the previous section (, , ):
Solution. Vertices: . Co-vertices: . Eccentricity: .
Sanity check: , confirming a genuine (non-circular, non-parabolic) ellipse. At it is fairly round but visibly elongated — closer to would be nearly circular, closer to would look like a flattened cigar.□
4.23Reflective Property and Orbits
Theorem 4.50 (Reflective property of the ellipse). Rays from one focus reflect off the ellipse and pass through the other focus.
Planets orbit in ellipses with the sun at one focus (Kepler). The other focus is 'empty.'
Intuition. Sound or light from one focus bounces and converges at the other focus (whispering galleries).
Gravity from the sun at one focus keeps the planet on the ellipse; the math of inverse-square force produces conics.
Example 4.51. In an elliptical billiard table, a ball shot from one focus in any direction will pass through the other focus after one bounce.
- Confusing sum (ellipse) with difference (hyperbola): Ellipse: sum constant. Hyperbola: |difference| constant.
- Swapping a and b: a is always the semi-major (larger), b semi-minor; c^{2} = a^{2} - b ^{2}.
- Thinking the center is at a focus: The center is midway between the foci; foci are offset by c from center.
- Forgetting e < 1: Eccentricity of ellipse is between 0 and 1; =1 parabola, >1 hyperbola.