Coordinate Geometry Formulas

Distance, midpoint, slope, section formula — Class 10 + Class 12 essentials

Reviewed by Geometry Calculator, Geometry Calculator Developer & Online Math Educator Last updated May 8, 2026

Coordinate geometry (analytic geometry) lets you compute geometric quantities from (x, y) coordinates instead of measurements. This is the complete NCERT Class 10 & Class 12 reference — covering the big four distance, midpoint, slope, and section formulas, plus the line equation forms (slope-intercept, point-slope, two-point) and the 3D distance extension.

The Formulas

Name Formula Notes
Distance d = √((x₂−x₁)² + (y₂−y₁)²) 2D Pythagorean applied to coordinates.
Midpoint M = ((x₁+x₂)/2, (y₁+y₂)/2) Exact center of segment (x₁,y₁)–(x₂,y₂).
Slope m = (y₂ − y₁) / (x₂ − x₁) Rise over run. Vertical lines: undefined.
Section Formula (internal) P = ((mx₂+nx₁)/(m+n), (my₂+ny₁)/(m+n)) Point dividing segment in ratio m : n.
Slope-Intercept Form y = mx + b m = slope, b = y-intercept.
Point-Slope Form y − y₁ = m(x − x₁) Build a line from a point + slope.
Two-Point Form (y − y₁)/(y₂ − y₁) = (x − x₁)/(x₂ − x₁) Build a line from two points.
Parallel Lines m₁ = m₂ Equal slopes.
Perpendicular Lines m₁ × m₂ = −1 Negative reciprocal slopes.
3D Distance d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²) Adds the z-axis.

Worked Examples

Example 1: Distance + midpoint + slope between (1, 2) and (5, 6)

  1. Distance: d = √((5−1)² + (6−2)²) = √(16 + 16) = √32 ≈ 5.66
  2. Midpoint: M = ((1+5)/2, (2+6)/2) = (3, 4)
  3. Slope: m = (6 − 2)/(5 − 1) = 4/4 = 1

Example 2: Section formula: divide (2, 3)–(8, 9) in ratio 2 : 1

  1. P = ((2×8 + 1×2)/(2+1), (2×9 + 1×3)/(2+1))
  2. P = ((16 + 2)/3, (18 + 3)/3) = (6, 7)

Common Mistakes to Avoid

When working on the Cartesian Plane, even small calculation errors can lead to significantly incorrect results. One frequent error involves sign confusion when subtracting coordinates. For instance, when applying the Distance Formula, students often forget that the order of subtraction does not matter because the result is squared. However, mixing up signs inside the square root before squaring can cause unnecessary confusion. Always ensure you calculate $(x_2 - x_1)$ and $(y_2 - y_1)$ consistently. A common pitfall is assuming that $sqrt{(x_2-x_1)^2}$ simplifies to just $x_2-x_1$ without considering absolute values, though since it is squared first, the sign error usually cancels out in distance calculations. Nevertheless, precision in intermediate steps prevents errors in more complex derivations.

Another major mistake is misapplying the Slope formula. Many learners reverse the numerator and denominator, calculating $frac{Delta x}{Delta y}$ instead of $frac{Delta y}{Delta x}$. Remember that slope represents "rise over run." If you swap these, you get the reciprocal of the correct slope, which changes the angle of the line entirely. Additionally, when using the Midpoint Formula, some users average the x-coordinates but forget to average the y-coordinates, resulting in a point that lies on the wrong axis alignment. To correct this, verify that both coordinate pairs are included in the summation before dividing by two.

Furthermore, confusing the Section Formula with the Midpoint Formula is common. The midpoint is simply a special case where the ratio $m:n$ is $1:1$. When dividing a segment internally in a specific ratio, failing to multiply the coordinates by the respective weights ($m$ and $n$) leads to an incorrect position. Finally, when determining the area of a triangle using coordinates, neglecting the absolute value in the final step can yield a negative area, which is geometrically impossible. Always take the absolute value of the determinant result to ensure a positive area measurement.

How to Remember Formulas Effectively

Memorizing geometric relationships becomes easier when you connect them to fundamental principles rather than rote learning. The most effective way to recall the Distance Formula is to visualize the Pythagorean Theorem. Imagine a right-angled triangle formed by the horizontal and vertical distances between two points. The distance between them is the hypotenuse. Since $a^2 + b^2 = c^2$, substituting the differences in coordinates gives $d = sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}$. By understanding that distance is simply the hypotenuse of a coordinate-based right triangle, you reduce the cognitive load of memorizing a complex equation.

For the Slope, use the mnemonic "Rise over Run." Visualize walking along the line: how much you go up or down (rise) divided by how far you move horizontally (run). This physical visualization helps prevent swapping the numerator and denominator. Similarly, the Midpoint Formula can be remembered as "averaging the ends." Just as the middle of a number line is the average of its endpoints, the midpoint in 2D space is the average of the x-values and the average of the y-values separately. This concept extends directly to the Section Formula, which is essentially a weighted average. If you are dividing a segment in a ratio, think of it as pulling the point closer to one end based on the weight assigned to that coordinate.

Visual cues also aid retention. Draw a box around two points to see the legs of the right triangle for distance problems. For the Centroid Formula, remember that the centroid is the balance point of a triangle, meaning it is the average of all three vertices' coordinates. Grouping these concepts—distance via Pythagoras, slope via rise/run, and midpoints/centroids via averages—creates a logical framework that is easier to retrieve during problem-solving than isolated algebraic expressions.

Practical Examples with Step-by-Step Solutions

Example 1: Finding Distance Between Two Points
Calculate the distance between $A(1, 2)$ and $B(4, 6)$.
First, identify the coordinates: $x_1=1, y_1=2$ and $x_2=4, y_2=6$. Apply the Distance Formula:
$d = sqrt{(4 - 1)^2 + (6 - 2)^2}$
$d = sqrt{3^2 + 4^2}$
$d = sqrt{9 + 16} = sqrt{25}$
The distance is $5$ units. This result aligns with the classic 3-4-5 right triangle, confirming the application of the Pythagorean Theorem.

Example 2: Midpoint and Section Formula Applications
Find the midpoint of the segment connecting $P(-2, 3)$ and $Q(4, -1)$.
Using the Midpoint Formula, average the x and y coordinates:
$x_m = frac{-2 + 4}{2} = frac{2}{2} = 1$
$y_m = frac{3 + (-1)}{2} = frac{2}{2} = 1$
The midpoint is $(1, 1)$. If we needed a point dividing this segment in a $1:2$ ratio using the Section Formula, we would weight the coordinates accordingly, showing how the midpoint is a specific balanced case.

Example 3: Area of Triangle Using Coordinates
Find the area of a triangle with vertices at $(0,0)$, $(4,0)$, and $(0,3)$.
This is a right triangle with base $4$ and height $3$, so the area should be $frac{1}{2} times 4 times 3 = 6$. Using the Area of Triangle using Coordinates formula (shoelace method):
$text{Area} = frac{1}{2} |x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2)|$
Substitute values: $frac{1}{2} |0(0 - 3) + 4(3 - 0) + 0(0 - 0)|$
$text{Area} = frac{1}{2} |0 + 12 + 0| = 6$. The calculation confirms the geometric intuition.

Skip the manual calculation

Plug in your numbers and get instant step-by-step results.

Use Distance/Midpoint Calculator See All Geometry Formulas