Given one endpoint (A) and the midpoint (M) of a line segment, instantly compute the unknown endpoint (B).Visualize the segment, endpoints, and midpoint on an interactive canvas. Perfect for coordinate geometry homework, CAD design, mapping, and structural analysis.
In analytic geometry, given one endpoint A(x₁, y₁) and the midpoint M(xₘ, yₘ) of a line segment, the coordinates of the missing endpoint B(x₂, y₂) are derived directly from the midpoint formula:
xₘ = (x₁ + x₂)/2 → x₂ = 2·xₘ – x₁
yₘ = (y₁ + y₂)/2 → y₂ = 2·yₘ – y₁
Our interactive tool not only computes B instantly but also draws the complete segment, verifies the midpoint, and provides derived values like length and slope. This is essential for solving geometry problems, verifying design coordinates, or reconstructing a line from partial information.
The midpoint formula is a direct consequence of the section formula. If M is the midpoint of AB, then the vectors satisfy \( \vec{OM} = \frac{\vec{OA} + \vec{OB}}{2} \). Rearranging gives \( \vec{OB} = 2\vec{OM} - \vec{OA} \). Componentwise, this yields the linear transformation above. The endpoint calculator solves this exact system, making it robust for any real coordinates, including negative or decimal values. No approximation is needed; the results are mathematically exact within floating‑point precision.
Beyond pure geometry, this principle appears in computer graphics (tweening, path interpolation), robotics (joint midpoint estimation), and geodesy (midpoint of two geographical points). Understanding the endpoint-midpoint relationship is foundational for vector algebra and parametric line equations.
The computational core is simple: Bx = 2·Mx – Ax and By = 2·My – Ay. After computing B, the tool also calculates segment length using Euclidean distance: \( \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2} \). Slope is computed as (y₂ – y₁)/(x₂ – x₁) when denominator ≠ 0; for vertical lines we indicate "undefined". The midpoint verification shows the average of A and B to confirm it matches the input M within tolerance. The drawing engine scales all points to fit the canvas with padding, ensuring a clear visualization even for distant coordinates.
The following table illustrates typical endpoint‑midpoint pairs. You can test these by clicking the preset buttons above.
| Endpoint A (x₁,y₁) | Midpoint M (xₘ,yₘ) | Computed Endpoint B | Segment length (approx.) | Slope |
|---|---|---|---|---|
| (2,2) | (5,6) | (8,10) | 10.00 | 1.333 |
| (-3,1) | (0,2) | (3,3) | 6.324 | 0.333 |
| (1.5,2.5) | (3.75,4.25) | (6.0,6.0) | 5.701 | 0.778 |
| (0,0) | (4,3) | (8,6) | 10.00 | 0.75 |
| (3,1) | (3,5) | (3,9) | 8.00 | undefined (vertical) |
A civil engineer knows one endpoint of a new road segment at A(120, 340) meters (relative to a local grid) and the midpoint M(450, 510) where the road will intersect a central avenue. To extend the road symmetrically, the engineer needs the other endpoint B. Using the endpoint formula: B = (2·450 – 120, 2·510 – 340) = (780, 680). The interactive tool instantly returns these coordinates, and the visual graph shows the alignment. Additionally, slope helps assess drainage: Δy/Δx = (680-340)/(780-120) = 340/660 ≈ 0.515 (about 27° gradient). This quick calculation avoids manual errors and integrates with CAD workflows.
The relationship \( B = 2M - A \) is equivalent to saying that M is the center of point reflection mapping A to B. In vector terms, \( \vec{AB} = 2\vec{AM} \). This symmetry is preserved under any affine transformation, meaning the tool's logic remains valid even if coordinates are scaled, rotated, or skewed (e.g., in isometric drawings). The line segment is uniquely determined by A and M; therefore, the computed endpoint is exact. For non‑collinear applications, the same formula works in 3D (or any dimension) – simply extend to z‑coordinate: Bz = 2·Mz – Az.