Calculator

2D Distance Calculator — Distance Formula, Midpoint & Complete Coordinate Guide

Use our free 2D Distance Calculator to find the distance between any two points. Includes the distance formula d = √((x₂−x₁)²+(y₂−y₁)²), midpoint, slope, angle, Manhattan distance, Pythagorean theorem proof, and 8 real-world applications.

2D Distance Calculator

Instantly find the straight-line distance between any two points on a 2D coordinate plane. Enter the coordinates of Point A and Point B and get the Euclidean distance, midpoint, slope, angle of inclination, and Manhattan distance — all at once, with a live visual diagram.

Distance Formula Midpoint Formula Slope & Angle Pythagorean Theorem

🧮 2D Distance Calculator

Enter the coordinates of your two points below. The calculator instantly finds every property of the line segment connecting them — no algebra required.

Point A (x₁, y₁)

Point B (x₂, y₂)

📏 Euclidean Distance
units
⊕ Midpoint
(x, y)
📐 Slope (m)
rise / run
🔺 Angle (θ)
degrees from +x axis
🏙️ Manhattan Dist.
|Δx| + |Δy|
x y A B Δx = x₂ − x₁ Δy d = √(Δx² + Δy²) M

Figure: The distance d between two points (blue line) equals the hypotenuse of the right triangle formed by the horizontal leg Δx and the vertical leg Δy. Midpoint M (purple) lies at the center of the segment.

📘 What Is 2D Distance? — Coordinate Plane Fundamentals

In mathematics, 2D distance refers to the straight-line distance between two points in a two-dimensional plane — a flat surface defined by two perpendicular axes: the horizontal x-axis and the vertical y-axis. The location of any point on this plane is uniquely described by an ordered pair (x, y), where x represents the horizontal position and y represents the vertical position relative to the origin (0, 0).

The 2D distance between two points is also called the Euclidean distance, named after the ancient Greek mathematician Euclid of Alexandria (c. 325–265 BCE), whose foundational work Elements established the geometry of flat space that we now call Euclidean geometry. The distance is defined as the length of the shortest path between the two points — which in flat Euclidean space is always the straight line connecting them.

The Cartesian Coordinate System

The coordinate plane used for 2D distance was systematized by René Descartes (1596–1650) and is called the Cartesian coordinate system in his honor. It consists of:

  • The x-axis: A horizontal number line. Positive x values go right; negative x values go left.
  • The y-axis: A vertical number line. Positive y values go up; negative y values go down.
  • The origin (0, 0): The intersection of the x-axis and y-axis — the reference point for all coordinates.
  • Four quadrants: The plane is divided into four regions by the axes. Quadrant I (+,+), Quadrant II (−,+), Quadrant III (−,−), Quadrant IV (+,−).
💡 Key Insight: The distance formula works regardless of which quadrant the points are in, whether coordinates are positive or negative, and whether the points are on an axis or at the origin. The squaring of (x₂−x₁) and (y₂−y₁) automatically eliminates any sign issues.

Why Distance Is Always Positive

Distance is a non-negative scalar quantity — it has magnitude but no direction. Even if x₂ < x₁ (Point B is to the left of Point A), the horizontal difference (x₂−x₁) is negative, but squaring it makes it positive. Taking the square root of the sum of two squares always gives a non-negative result. The only way the distance is zero is if both points are identical (A = B).

📐 The Distance Formula — Derivation from the Pythagorean Theorem

The distance formula is not a new invention — it is a direct application of one of the oldest and most powerful theorems in all of mathematics: the Pythagorean theorem. Understanding this derivation makes the formula memorable and reveals why it works for any two points, anywhere on the coordinate plane.

Step-by-Step Derivation

  1. Plot the two points — A(x₁, y₁) and B(x₂, y₂) — on the coordinate plane.
  2. Draw a right triangle by adding two lines: a horizontal line from A to the right, and a vertical line from B down to meet the horizontal line. Call the corner point C(x₂, y₁).
  3. Measure the legs: The horizontal leg AC = |x₂ − x₁|. The vertical leg BC = |y₂ − y₁|.
  4. Apply the Pythagorean theorem: AB² = AC² + BC² → d² = (x₂−x₁)² + (y₂−y₁)².
  5. Take the square root: d = √((x₂−x₁)² + (y₂−y₁)²).
The Distance Formula — 2D Euclidean Distance \[ d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \]

Where:
d = Distance between the two points (in the same units as the coordinates)
(x₁, y₁) = Coordinates of Point A
(x₂, y₂) = Coordinates of Point B
The formula is symmetric: d(A,B) = d(B,A). Swapping the labels of the two points gives the same distance.

Alternative Notation

You will sometimes see the distance formula written using Δx (delta-x) and Δy (delta-y) notation, where Δ (the Greek letter delta) means "change in":

Distance Formula — Delta Notation \[ \Delta x = x_2 - x_1, \quad \Delta y = y_2 - y_1 \] \[ d = \sqrt{(\Delta x)^2 + (\Delta y)^2} \]

This notation emphasizes that the distance depends only on the differences (changes) in coordinates — not on the absolute coordinate values. The distance is translation-invariant: moving both points by the same amount in any direction does not change the distance between them.

Connection to the Pythagorean Theorem

Pythagorean Theorem — The Foundation \[ a^2 + b^2 = c^2 \] \[ \Downarrow \] \[ c = \sqrt{a^2 + b^2} = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2} = d \]

The distance formula IS the Pythagorean theorem applied to coordinates. The horizontal leg is a = |Δx|, the vertical leg is b = |Δy|, and the hypotenuse is the distance d = c. This is why the distance formula always gives the straight-line (shortest) distance.

💡 Historical Note: Euclid's geometry described distances on flat surfaces without coordinates. Descartes introduced coordinates in 1637 (La Géométrie), allowing geometric relationships like the Pythagorean theorem to be expressed as algebraic formulas. The distance formula is precisely this algebraic expression of Euclid's geometry — a bridge between geometry and algebra created by Descartes.

⊕ The Midpoint Formula

The midpoint of a line segment is the point that divides it into two equal halves. In a coordinate plane, the midpoint is simply the average of the x-coordinates and the average of the y-coordinates of the two endpoints.

Midpoint Formula \[ M = \left(\frac{x_1 + x_2}{2},\ \frac{y_1 + y_2}{2}\right) \]

Where M is the midpoint of segment AB.
• The x-coordinate of M is the average of x₁ and x₂
• The y-coordinate of M is the average of y₁ and y₂
The distance from A to M equals the distance from M to B — each is exactly half the total distance d/2.

Why the Midpoint Is the Average

Intuitively, the midpoint is the "halfway point" between x₁ and x₂ on the x-axis, and halfway between y₁ and y₂ on the y-axis. The average of two numbers is always the number that is equidistant from both — that is precisely the midpoint value. For example, the midpoint between x=2 and x=8 is (2+8)/2 = 10/2 = 5, which is exactly 3 units from both 2 and 8.

The Midpoint Formula's Uses

  • Bisecting a segment: Finding the exact center of any line segment — used in construction, design, and geometry proofs.
  • Finding a missing endpoint: If you know M and one endpoint, you can find the other: x₂ = 2x_M − x₁.
  • Computer graphics: Midpoint algorithms (like the Bresenham midpoint line algorithm) render smooth lines on raster displays.
  • Geometry theorems: The midpoint theorem states that the segment connecting the midpoints of two sides of a triangle is parallel to and half the length of the third side.
💡 Section Formula (Generalization): The midpoint formula is a special case of the section formula, which divides a segment in any ratio m:n. For a 1:1 ratio (midpoint), it simplifies to ((x₁+x₂)/2, (y₁+y₂)/2). For a 2:1 ratio from A to B, it gives ((x₁ + 2x₂)/3, (y₁ + 2y₂)/3) — the point one-third of the way from B to A.

📈 Slope and Angle of Inclination

The slope of the line through two points measures its steepness and direction. It is defined as the ratio of the vertical change (rise) to the horizontal change (run):

Slope Formula \[ m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\Delta y}{\Delta x} \quad (x_2 \neq x_1) \]

Positive slope (m > 0): Line goes upward from left to right
Negative slope (m < 0): Line goes downward from left to right
Zero slope (m = 0): Horizontal line (y₁ = y₂)
Undefined slope: Vertical line (x₁ = x₂) — division by zero

Angle of Inclination

The angle of inclination (θ) is the angle the line makes with the positive x-axis, measured counterclockwise. It is related to slope by the tangent function:

Angle of Inclination \[ \theta = \arctan\!\left(\frac{\Delta y}{\Delta x}\right) = \arctan(m) \]

The angle is in the range (−90°, 90°) for finite slopes. A horizontal line has θ = 0°; a line at 45° has slope m = 1; a vertical line has θ = 90° (undefined slope).
In our calculator, we use atan2(Δy, Δx) which returns the full angle in (−180°, 180°], preserving directional information.

Relationship Between Distance, Slope, and Angle

Trigonometric Decomposition of Distance \[ \Delta x = d \cdot \cos\theta, \quad \Delta y = d \cdot \sin\theta \] \[ d = \sqrt{(\Delta x)^2 + (\Delta y)^2} = \sqrt{d^2\cos^2\theta + d^2\sin^2\theta} = d\sqrt{\cos^2\theta + \sin^2\theta} = d \]

The Pythagorean identity (cos²θ + sin²θ = 1) confirms that distance, slope angle, and the coordinate differences are all perfectly consistent. This shows how the distance formula, trigonometry, and the Pythagorean theorem are all unified aspects of the same geometry.

🏙️ Manhattan Distance vs. Euclidean Distance

The Euclidean distance is the straight-line "as the crow flies" distance between two points. But in many real-world situations, you cannot travel in a straight line — you must follow a grid (like city streets). The Manhattan distance (also called taxicab distance, rectilinear distance, or L₁ distance) measures the distance when you can only move horizontally and vertically.

Manhattan Distance Formula \[ d_M = |x_2 - x_1| + |y_2 - y_1| = |\Delta x| + |\Delta y| \]

The name comes from the grid layout of streets in Manhattan, New York City. To travel from point A to point B in Manhattan, you must go some number of blocks east/west and some number north/south — you cannot cut diagonally through buildings. The Manhattan distance is always greater than or equal to the Euclidean distance.

Euclidean vs. Manhattan — A Comparison

PropertyEuclidean DistanceManhattan Distance
Formula√(Δx² + Δy²)|Δx| + |Δy|
Also calledStraight-line, L₂, bird's eyeTaxicab, L₁, rectilinear, city block
Path typeDirect straight lineAny path with only H/V moves
When Euclidean = Manhattan?Only when Δx = 0 or Δy = 0 (points on same axis)
Which is larger?d_M ≥ d_E always; equality only when one Δ = 0
Example: (0,0) to (3,4)√(9+16) = √25 = 53 + 4 = 7
ApplicationsGeometry, physics, GPS, ML clusteringCity routing, robotics, image processing

Other Distance Metrics

The Euclidean and Manhattan distances are both special cases of the general Minkowski distance:

Minkowski Distance — General Form \[ d_p = \left(|x_2 - x_1|^p + |y_2 - y_1|^p\right)^{1/p} \]

• p = 1 → Manhattan distance (L₁ norm)
• p = 2 → Euclidean distance (L₂ norm) — our primary formula
• p → ∞ → Chebyshev distance = max(|Δx|, |Δy|) — used in chess (king moves)

✏️ Worked Examples — Step-by-Step Solutions

Work through these fully solved examples to build strong fluency with the distance formula and its related calculations.

Example 1 — Basic Distance (First Quadrant)

Problem: Find the distance between A(1, 2) and B(4, 6).

  • Step 1 — Identify coordinates: x₁=1, y₁=2, x₂=4, y₂=6
  • Step 2 — Find Δx and Δy: Δx = 4−1 = 3; Δy = 6−2 = 4
  • Step 3 — Apply formula: d = √(3² + 4²) = √(9 + 16) = √25
  • Step 4 — Calculate: d = 5
✅ Distance = 5 units (a 3-4-5 Pythagorean triple!)

Example 2 — Points in Different Quadrants

Problem: Find the distance between A(−3, −4) and B(2, 8).

  • Step 1 — Δx = 2−(−3) = 5; Δy = 8−(−4) = 12
  • Step 2 — Apply formula: d = √(5² + 12²) = √(25 + 144) = √169
  • Step 3 — Calculate: d = 13
✅ Distance = 13 units (a 5-12-13 Pythagorean triple!)

Example 3 — Distance from Origin

Problem: Find the distance from point P(7, 24) to the origin O(0, 0).

  • Special case: d = √(x² + y²) = √(7² + 24²)
  • Calculate: d = √(49 + 576) = √625
  • Result: d = 25
✅ Distance = 25 units (a 7-24-25 Pythagorean triple!)

Example 4 — Full Analysis: Distance, Midpoint, and Slope

Problem: For points A(−2, 3) and B(6, −1), find the distance, midpoint, and slope.

  • Δx = 6−(−2) = 8; Δy = −1−3 = −4
  • Distance: d = √(8² + (−4)²) = √(64+16) = √80 = 4√5 ≈ 8.944
  • Midpoint: M = ((−2+6)/2, (3+(−1))/2) = (4/2, 2/2) = (2, 1)
  • Slope: m = (−1−3)/(6−(−2)) = −4/8 = −0.5
  • Angle: θ = arctan(−0.5) ≈ −26.57° (line descends from left to right)
✅ d ≈ 8.944 units | M = (2, 1) | m = −0.5 | θ ≈ −26.57°

Example 5 — Finding a Missing Coordinate

Problem: Point A is at (2, 5). The distance to Point B(10, y) is 10 units. Find y.

  • Write the formula: 10 = √((10−2)² + (y−5)²)
  • Square both sides: 100 = 64 + (y−5)²
  • Solve: (y−5)² = 36 → y−5 = ±6 → y = 11 or y = −1
✅ y = 11 or y = −1 (two solutions — B can be above or below A)
🎯 Key Pattern: Always compute Δx = x₂−x₁ and Δy = y₂−y₁ first, then square both, add them, and take the square root. Having these intermediate values also immediately gives you the slope (Δy/Δx) and helps you draw the right triangle mentally.

🌐 Extending to 3D — The 3D Distance Formula

The 2D distance formula extends naturally and elegantly to three dimensions. In 3D space, every point has three coordinates — (x, y, z) — and the distance formula simply adds a third squared term under the square root.

3D Distance Formula \[ d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2 + (z_2-z_1)^2} \]

The derivation uses the Pythagorean theorem twice: first to find the horizontal distance in the xy-plane, then to combine it with the vertical z-difference. The formal proof uses a 3D right triangle where the z-difference forms the third perpendicular leg.

Extension to n Dimensions

The pattern continues to any number of dimensions. In n-dimensional Euclidean space, the distance between two points P = (p₁, p₂, ..., pₙ) and Q = (q₁, q₂, ..., qₙ) is:

N-Dimensional Distance Formula \[ d = \sqrt{\sum_{i=1}^{n}(q_i - p_i)^2} = \sqrt{(q_1-p_1)^2 + (q_2-p_2)^2 + \cdots + (q_n-p_n)^2} \]

This generalization is fundamental to machine learning, data science, and statistics, where data points are represented as vectors in high-dimensional spaces and "distance" between data points measures their similarity or dissimilarity.

💡 Machine Learning Connection: In the K-Nearest Neighbors (KNN) algorithm, the distance formula (generalized to n dimensions) determines which training data points are "closest" to a new query point. In MNIST (handwritten digit recognition), each 28×28 image becomes a 784-dimensional vector, and distance in this 784D space helps classify unknown digits.

🌍 Real-World Applications of the Distance Formula

The 2D distance formula is not merely a classroom exercise — it is one of the most frequently applied mathematical tools in technology, science, engineering, and everyday navigation.

1. GIS and Mapping — GPS Distance Calculation

Geographic Information Systems (GIS) use a spherical variant of the distance formula (the Haversine formula) to compute the great-circle distance between two GPS coordinates (latitude, longitude). For small distances where Earth's curvature is negligible, the flat 2D Euclidean distance formula gives excellent approximations. Google Maps, Apple Maps, and Waze all compute route distances by applying distance formulas to coordinate data continuously as you navigate.

2. Computer Graphics — Collision Detection

In video games and simulations, collision detection (determining whether two objects have touched or overlapped) relies heavily on the distance formula. Two circular objects have collided if the distance between their center points is less than the sum of their radii: d(A,B) < r₁ + r₂. Every frame of gameplay — at 60+ frames per second — may involve thousands of these distance calculations. Efficient distance computation is a critical factor in game engine performance.

3. Robotics — Path Planning and Navigation

Autonomous robots and self-driving vehicles must constantly compute distances from their current position to waypoints, obstacles, and goals. The A* pathfinding algorithm — used in robotics, video games, and autonomous vehicles — specifically uses the Euclidean distance as a heuristic to estimate the remaining distance to the goal. The accuracy of this heuristic directly affects pathfinding efficiency and safety.

4. Machine Learning — K-Nearest Neighbors and Clustering

The K-Nearest Neighbors (KNN) algorithm classifies data points based on the distance formula in n-dimensional feature space. K-means clustering assigns data points to clusters by computing the distance from each point to each cluster centroid. Support Vector Machines (SVMs), Principal Component Analysis (PCA), and neural network distance metrics all depend on variations of the distance formula. In modern AI, distance computation is a fundamental building block.

5. Architecture and Civil Engineering — Site Planning

Architects and civil engineers use coordinate systems and the distance formula to compute distances between structural elements, verify layouts against design specifications, and calculate material quantities. Building Information Modeling (BIM) software automatically computes distances and lengths throughout a 3D building model, with the distance formula (generalized to 3D) underlying all spatial calculations.

6. Physics — Displacement and Force Calculations

In classical mechanics, the displacement vector between two points in 2D or 3D space has a magnitude equal to the distance formula. Gravitational force, electric force, and other inverse-square-law forces depend on the distance between objects: F ∝ 1/d². The distance formula appears at every scale of physics, from subatomic interactions to gravitational attraction between galaxies.

7. Healthcare — Medical Image Analysis

Radiologists and medical imaging algorithms compute distances between anatomical landmarks in CT, MRI, and X-ray images to diagnose conditions, plan surgeries, and measure tumor growth. For example, the distance between the centers of two vertebrae, or the diameter of a blood vessel measured between two identified boundary points, uses the 2D coordinate distance formula on the digital image's pixel coordinate system.

8. Sports Analytics — Player Tracking

Professional sports teams use player tracking systems (cameras + computer vision) that record each player's (x, y) coordinates on the field many times per second. The total distance covered by a player during a match is computed by summing thousands of consecutive distance measurements using the formula d = √(Δx² + Δy²). This data informs training load management, tactical analysis, and injury prevention.

❌ Common Mistakes to Avoid

Mistake 1: Forgetting to Square the Differences

Writing d = √(Δx + Δy) instead of d = √(Δx² + Δy²). The correct formula squares each difference before summing. Without squaring, negative differences would subtract from the positive differences, giving an incorrect (and often negative) result under the square root. The squaring is essential — it is what makes the formula equivalent to the Pythagorean theorem.

⚠️ Example: Points (1,2) and (4,6): Δx=3, Δy=4
Wrong: d = √(3 + 4) = √7 ≈ 2.65
Correct: d = √(9 + 16) = √25 = 5 ✅

Mistake 2: Forgetting the Square Root

Computing d² = (Δx)² + (Δy)² and stopping there — giving 25 instead of 5 for the example above. Always take the square root at the end to get the actual distance, not the squared distance.

Mistake 3: Not Handling Negative Coordinates Correctly

When subtracting a negative coordinate, be careful: x₂ − x₁ = 2 − (−3) = 2 + 3 = 5, NOT 2 − 3 = −1. Subtracting a negative number is addition. This is a very common arithmetic error that produces incorrect Δx or Δy values.

Mistake 4: Confusing Distance with Displacement

In physics, displacement is a vector (it has direction), while distance is a scalar (positive magnitude only). The distance formula always gives the positive Euclidean distance. Displacement in 2D would be the vector (Δx, Δy) with magnitude equal to the distance but also a direction angle θ. Do not confuse d (magnitude) with the displacement vector.

Mistake 5: Using the Slope Formula When x₁ = x₂

If both points share the same x-coordinate (x₁ = x₂), the slope is undefined (vertical line — division by zero in m = Δy/Δx). Our calculator detects this and reports "Undefined (vertical line)" instead of an error. The distance between (3,1) and (3,7) is still perfectly well-defined: d = |7−1| = 6.

Mistake 6: Confusing Midpoint Coordinates

The midpoint x-coordinate is (x₁+x₂)/2 and the y-coordinate is (y₁+y₂)/2. A common mistake is to add only x values or only y values, or to forget to divide by 2. Both averages must be computed separately and independently.

📊 Quick Reference Table

PropertyFormulaNotes
2D Euclidean Distanced = √((x₂−x₁)² + (y₂−y₁)²)The primary straight-line distance
MidpointM = ((x₁+x₂)/2, (y₁+y₂)/2)Center of segment AB
Slopem = (y₂−y₁)/(x₂−x₁)Undefined when x₁ = x₂
Angle of inclinationθ = arctan(Δy/Δx) = atan2(Δy,Δx)In degrees from +x-axis
Manhattan Distanced_M = |x₂−x₁| + |y₂−y₁|Grid-based, L₁ norm
Distance from origind = √(x² + y²)Special case: x₁=0, y₁=0
3D Distanced = √(Δx² + Δy² + Δz²)Extends Pythagorean theorem to 3D
Minkowski Distanced_p = (|Δx|^p + |Δy|^p)^(1/p)L₁(p=1), L₂(p=2), Chebyshev(p→∞)
Section formula (ratio m:n)P = ((mx₂+nx₁)/(m+n), (my₂+ny₁)/(m+n))Midpoint when m=n=1

Common Pythagorean Triples (Integer Distances)

ΔxΔyDistance dTriple Name
3453-4-5
512135-12-13
815178-15-17
724257-24-25
68103-4-5 scaled ×2
940419-40-41
💡 Pythagorean Triples Shortcut: When Δx and Δy form a Pythagorean triple (like 3,4 or 5,12), the distance is an exact integer — no calculator needed! Memorizing the common triples (3-4-5, 5-12-13, 8-15-17) is a valuable skill for speed calculations in exams and competitions.

❓ Frequently Asked Questions (FAQ)

What is the distance formula between two points? +
The distance between (x₁, y₁) and (x₂, y₂) is d = √((x₂−x₁)² + (y₂−y₁)²). This formula is derived from the Pythagorean theorem applied to the right triangle formed by the two points and a third corner point. The horizontal leg is Δx = x₂−x₁, the vertical leg is Δy = y₂−y₁, and the hypotenuse is the distance d.
What is the midpoint formula? +
The midpoint of a segment between (x₁, y₁) and (x₂, y₂) is M = ((x₁+x₂)/2, (y₁+y₂)/2). It is simply the average x-coordinate and average y-coordinate of the two endpoints. The midpoint is equidistant from both endpoints — each half of the segment has length d/2.
How is the distance formula derived from the Pythagorean theorem? +
Draw a right triangle with the two points as opposite corners. The horizontal leg has length |Δx| = |x₂−x₁| and the vertical leg has length |Δy| = |y₂−y₁|. The hypotenuse connects the two original points. By the Pythagorean theorem: d² = Δx² + Δy², so d = √(Δx² + Δy²). The distance formula IS the Pythagorean theorem in coordinate notation.
Does the order of the two points matter in the distance formula? +
No — distance is symmetric. d(A,B) = d(B,A) always. This is because (x₂−x₁)² = (x₁−x₂)² — squaring removes any sign difference. You can call either point "Point 1" or "Point 2" and the result is identical. However, do be consistent within a single calculation to avoid arithmetic errors.
What is the Manhattan distance and how is it different from Euclidean distance? +
Euclidean distance is the direct straight-line distance: d = √(Δx² + Δy²). Manhattan distance is the total of horizontal and vertical moves: d_M = |Δx| + |Δy| — representing travel along a grid (like city streets). Manhattan distance is always ≥ Euclidean distance. For example, from (0,0) to (3,4): Euclidean = 5, Manhattan = 7. They are equal only when movement is purely horizontal or vertical (one of Δx, Δy equals zero).
What is the distance from a point to the origin? +
Set (x₁, y₁) = (0, 0) in the distance formula to get d = √(x² + y²), where (x, y) is the point. This is also the magnitude (or length) of the position vector from the origin to the point — fundamental in vectors, polar coordinates, and complex number modulus calculations. For example, the distance from (6, 8) to the origin is √(36+64) = √100 = 10.
What is the slope of the line between two points? +
The slope is m = (y₂−y₁)/(x₂−x₁) = Δy/Δx. It measures the steepness and direction of the line connecting the two points. Positive slope: line goes up from left to right. Negative slope: goes down. Zero slope: horizontal line (y₁ = y₂). Undefined: vertical line (x₁ = x₂). The slope is directly related to the angle of inclination: θ = arctan(m).
Can the distance formula be used for 3D coordinates? +
Yes. In 3D space, the distance between (x₁, y₁, z₁) and (x₂, y₂, z₂) is d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²). This adds the z-difference squared inside the square root. The 2D formula is the special case z₁ = z₂ = 0. The formula extends to n dimensions: d = √(Σᵢ(qᵢ−pᵢ)²), which is fundamental to machine learning and data science.
Shares:

Related Posts