Basic Analytic Geometry: Coordinates, Lines and Distances
Analytic geometry unites algebra and geometry on the Cartesian plane. With coordinates, you can calculate distances, find midpoints and describe lines with equations.
Renato Freitas
Updated on May 5, 2026
The Cartesian plane: locating points with coordinates
The Cartesian plane, created by René Descartes in the 17th century, is a reference system formed by two perpendicular axes: the x-axis (horizontal, called the abscissa axis) and the y-axis (vertical, called the ordinate axis). The intersection of the two axes is the origin O = (0, 0).
Each point on the plane is identified by an ordered pair (x, y). The x value indicates the horizontal displacement from the origin (positive to the right, negative to the left) and the y value indicates the vertical displacement (positive upward, negative downward). For example, the point (3, −2) is 3 units to the right and 2 units below the origin.
The two axes divide the plane into four quadrants. In the 1st quadrant, x > 0 and y > 0. In the 2nd, x < 0 and y > 0. In the 3rd, x < 0 and y < 0. In the 4th, x > 0 and y < 0. Identifying the quadrant of a point is a quick way to check whether a result is correct.
🧮 Try it yourself — CalcSim
Want more features? Download CalcSim IA app
Distance between two points and midpoint
The distance between two points P1 = (x1, y1) and P2 = (x2, y2) is derived directly from the Pythagorean theorem: d = √((x2 − x1)² + (y2 − y1)²). The segment joining the two points is the hypotenuse of a right triangle whose legs have lengths |x2 − x1| and |y2 − y1|.
The midpoint M between P1 and P2 has coordinates equal to the arithmetic mean of the coordinates of the endpoints: M = ((x1 + x2)/2, (y1 + y2)/2). For example, the midpoint of (2, 4) and (8, 10) is ((2+8)/2, (4+10)/2) = (5, 7). This result is intuitive: the midpoint is 'halfway' in each direction.
Slope and equation of a line
The slope m of a line passing through two points measures how much y changes for each unit change in x: m = (y2 − y1) / (x2 − x1). A horizontal line has m = 0; an increasing line has m > 0; a decreasing line has m < 0. Vertical lines have no defined slope.
The slope-intercept form of a line is y = mx + b, where m is the slope and b is the y-intercept (the value of y when x = 0, i.e., where the line crosses the y-axis). Given the slope m and a point (x0, y0) on the line, find b by substitution: b = y0 − m·x0.
Two lines are parallel if they have the same slope: m1 = m2. Two lines are perpendicular if the product of their slopes is −1: m1 × m2 = −1, or equivalently, m2 = −1/m1. These relationships are widely used in analytic geometry to solve problems involving distances and angles between lines.
Applications: GPS, computer graphics and data analysis
GPS uses a spherical coordinate system (latitude and longitude), but local navigation calculations — trajectories in small areas — are performed using Cartesian plane approximations. Map applications calculate distances between points of interest, shortest routes and midpoints using exactly the formulas of analytic geometry.
In computer graphics, each pixel on a screen is identified by coordinates (x, y). Rotations, translations and scalings of 2D objects are geometric transformations applied to coordinates. 2D games, animations and graphical interfaces constantly compute midpoint transformations and distances to detect collisions and render scenes.
In data analysis, scatter plots represent points on the Cartesian plane. Linear regression — a fundamental technique in statistics and machine learning — finds the line y = mx + b that best fits a set of points, minimising the distances between the points and the line. Mastering basic analytic geometry is therefore a prerequisite for understanding machine learning.
Frequently asked questions
What is the slope of a vertical line?
Vertical lines have an undefined slope (it does not exist), because the change in x is zero, causing division by zero in the formula m = Δy/Δx. The equation of a vertical line is simply x = c, where c is a constant.
How do I find the equation of a line given two points?
Calculate m = (y2 − y1)/(x2 − x1). Then substitute m and one of the points into y = mx + b to find b: b = y1 − m·x1. With m and b determined, the equation is complete.
Why is the perpendicularity condition m1 × m2 = −1?
This relation comes from a trigonometric property: the slope of a line is the tangent of its angle with the x-axis. For perpendicular lines, the angles differ by 90°, and by the tangent addition formula, tan(α + 90°) = −1/tan(α), which translates to m2 = −1/m1.
What is the difference between abscissa and ordinate?
The abscissa is the x value (horizontal coordinate). The ordinate is the y value (vertical coordinate). In the ordered pair (3, −5), the abscissa is 3 and the ordinate is −5.
How do I calculate the area of a triangle using coordinates?
Use the Shoelace Formula: for a triangle with vertices (x1,y1), (x2,y2), (x3,y3), the area is |((x1(y2−y3) + x2(y3−y1) + x3(y1−y2))/2)|. The absolute value ensures a positive result regardless of the orientation of the points.
Was this article helpful?
Rate with stars to help us improve the content.
Sign in to rate this article.
Still have questions?
The AI Professor explains step by step
Ask a question in natural language and get a personalised explanation about Geometry & Trigonometry — or any other topic.
Prefer to solve it on your phone?
Download the free app →Keep learning