Choosing Coordinates
Section titled βChoosing CoordinatesβCoordinates replace geometric relations by equations. A good placement reduces the number of variables before the calculation begins.
Place a convenient vertex at the origin, a useful side on the horizontal axis, or a symmetry line on an axis. Use for a general triangle rather than assigning six unrelated coordinates. Normalize a length to one only when the requested result is unchanged by scaling, or restore the scale at the end.
Example. A triangle has , , and . Find its altitude from to using coordinates.
Place and . Equal distances to put on the vertical axis, so write with . Then , giving .
Distance, Midpoints, and Division Ratios
Section titled βDistance, Midpoints, and Division RatiosβFor and ,
The midpoint is the coordinate average. If divides internally in the ratio , then
The larger weight is attached to the endpoint toward which moves. This vector formula applies to each coordinate separately.
Example. Points and have an internal division point with . Find .
The point is two-thirds of the way from to :
Lines, Slopes, and Vectors
Section titled βLines, Slopes, and VectorsβA line can be written as or parametrically as , where is a nonzero direction vector. The parametric form handles vertical lines without a special slope.
For finite slopes, parallel lines have equal slopes and perpendicular lines satisfy . Vectors give a version that also handles vertical and horizontal lines:
where . The dot product also gives the angle through .
Example. Find the foot of the perpendicular from to the line through the origin with direction vector .
The foot has the form . Perpendicularity requires , so
Thus .
More generally, the distance from to is for .
Circles and Intersections
Section titled βCircles and IntersectionsβA circle with center and radius has equation . Completing squares identifies its center from an expanded equation.
When two circle equations have the same quadratic terms, subtract them. The squared terms cancel, leaving the line containing their common points, if any.
Example. Find the intersection points of and .
Subtracting the first equation from the second gives , so . Substitution into the first circle gives . The intersections are and .
The subtraction gives the radical axis, introduced in more detail on the radical axes and inversion page.
Coordinate Areas and Pickβs Theorem
Section titled βCoordinate Areas and Pickβs TheoremβFor vectors and from the same vertex, the triangle area is half the absolute determinant:
For a simple polygon whose vertices are listed in boundary order, the shoelace formula is
where the final vertex wraps back to the first. A scrambled vertex order does not trace the intended polygon.
For a simple polygon with integer-coordinate vertices, Pickβs theorem gives , where counts interior lattice points and counts boundary lattice points.
Example. Find the number of lattice points strictly inside the triangle with vertices .
Its area is . A lattice segment with displacement has lattice points including endpoints. Summing the GCDs around the triangle counts each boundary point once, so
Pickβs theorem then gives .
Determinants and Parametric Intersections
Section titled βDeterminants and Parametric IntersectionsβFor plane vectors, write . The determinant is zero exactly when the vectors are parallel, and its absolute value is the parallelogram area they span.
Suppose two lines are and . If , take determinants of their intersection equation with each direction to get
This avoids vertical-line exceptions. The parameter values also locate the intersection: means it lies on the segment from to , rather than merely on its supporting line.
Example. Find the intersection of with , where and .
The common denominator is . The numerator for is , so . The intersection is ; substitution into the other line gives .
Thus the point is an endpoint of the first unit-parameter segment but lies beyond the second segmentβs endpoint.
A zero determinant means the directions are parallel. Check one point to distinguish disjoint parallel lines from coincident lines rather than dividing by zero and treating the formula as meaningful.
Constructing a Circle from Three Points
Section titled βConstructing a Circle from Three PointsβWrite a circle in the form
Three noncollinear points give three linear equations for . The center is and the radius squared is . This is usually simpler than introducing the center and radius as three nonlinear unknowns.
Example. Find the circumcircle of the triangle with vertices .
The first point gives . The second gives , so . The third gives , so .
The circle is
or . Its center is and its radius is .
If the three points are collinear, no ordinary circle passes through them. The coefficient system then fails to determine a valid circle. Noncollinearity is the geometric condition behind the algebraic denominator.
CircleβLine Intersections by Projection
Section titled βCircleβLine Intersections by ProjectionβA line at distance from a radius- circleβs center cuts a chord of length when . At it is tangent, and for there is no intersection.
This gives an efficient vector construction: find the perpendicular foot from the center to the line, take a unit direction along the line, and write the intersections as
Example. Find the intersections of and .
The lineβs normal vector is with length five, so the center-to-line distance is two. The foot is . A unit direction along the line is .
The half-chord length is . Thus the two points are
The projection approach keeps the symmetry of the two roots visible.
For a tangent line to an origin-centered circle of radius , the distance condition becomes . This is the same condition obtained by setting the substitution quadraticβs discriminant to zero.
Reflection and Shortest Broken Paths
Section titled βReflection and Shortest Broken PathsβReflection can turn a path that bends at a line into one straight segment. If is reflected across , then
The fraction gives the signed normal displacement to the line. Subtracting it twice crosses to the mirror image. The midpoint of lies on the mirror line and the joining segment is perpendicular to it.
Example. Points and are above the horizontal axis. Find the point on that axis minimizing .
Reflect to . For every allowed , , so the path length is at least by the triangle inequality.
The segment from to crosses the axis one-third of the way along, at . Equality is attained there, and the minimum is
If were restricted to a finite segment of the axis, the crossing point would need to lie on that segment. Otherwise the minimum may occur at an endpoint. A reflection proves a lower bound, but attainability still depends on the allowed set.
Affine Coordinates for Ratio Problems
Section titled βAffine Coordinates for Ratio ProblemsβA general affine transformation preserves collinearity, parallelism, ratios along one line, and ratios of areas. It does not generally preserve angles, lengths, or circles.
For a problem involving only those preserved quantities, any nondegenerate triangle can be mapped to . This reduces arithmetic while keeping the desired conclusion intact. Do not use this normalization in a metric problem without accounting for the distortion.
Example. Points and satisfy and . Find .
In the reference triangle, and . Determinants give
Because an affine transformation multiplies both areas by the same factor, this ratio holds in every nondegenerate triangle.
The same method proves the midpoint quadrilateral theorem: the four side midpoints of any convex quadrilateral form a parallelogram. Its adjacent side vectors are half the original diagonals, so parallelism follows immediately. Expanding the determinant area shows its area is half the original quadrilateralβs.
General Lattice-Triangle Counts
Section titled βGeneral Lattice-Triangle CountsβFor a segment joining lattice points with displacement , its boundary count depends on . The intermediate lattice points occur at equal fractions of the segment after reducing the direction vector to coprime coordinates.
A right triangle with vertices , for positive integers , has area and boundary count . Pickβs theorem therefore gives
For a slanted lattice triangle, use the determinant for area and the three edge GCDs for boundary points. Counting endpoints separately on every side would count each vertex twice.
Example. Find the number of interior lattice points in the triangle .
The area is twenty-four. The boundary count is
Thus .
Pickβs theorem requires a simple polygon with lattice vertices. A rational-coordinate polygon cannot be substituted directly without first changing the lattice and adjusting the area consistently.
Explicit Coordinates for Two Triangle Centers
Section titled βExplicit Coordinates for Two Triangle CentersβFor with , the circumcenter lies on . Equating its squared distances to gives
The altitude from has equation . The altitude from is perpendicular to vector , so its points satisfy . Therefore
Example. Find the circumcenter and orthocenter for .
The formulas give and . The centroid is , and checks the Euler-line relation.
No inverse trigonometric functions are needed; perpendicular-bisector and altitude equations determine the centers directly.
Minimizing a Sum of Squared Distances
Section titled βMinimizing a Sum of Squared DistancesβLet be the average of fixed points . Expanding gives
because the cross terms contain . The sum is minimized uniquely at .
Example. Find the minimum of the sum of squared distances from a point to .
Their average is . At that point the three squared distances are eight, twenty, twenty, totaling forty-eight. The identity shows every other point adds , so the minimum is forty-eight.
This minimizes squared distances, not ordinary distances. The point minimizing a sum of unsquared lengths can be different. Before importing a geometric βcenter,β check exactly which objective the problem specifies.
Constrained Squared-Distance Optimization
Section titled βConstrained Squared-Distance OptimizationβThe centroid identity also solves a constrained problem. If must lie on a line, the constant term in the squared-distance sum stays unchanged, so minimize by projecting the centroid onto that line.
Example. A point lies on . Find the minimum sum of its squared distances to .
The unconstrained centroid is and the unconstrained minimum is forty-eight. Its distance to the required line is . Therefore the constrained minimum is
The attaining point is the perpendicular projection,
It satisfies the line equation, so the lower bound is attained within the allowed set.
The same identity describes a locus. A prescribed sum of squared distances equals a constant plus . Above the minimum, the locus is a circle centered at the centroid; at the minimum it is a single point; below the minimum it is empty.
This converts a seemingly complicated sum involving many fixed points into one distance from their average. It is especially useful when the problem combines an area or line constraint with several squared distances.