วิธีการคำนวณ Distance Between Points
learn.whatIsHeading
The distance formula calculates the straight-line distance between two points in 2D or 3D space. It is derived from the Pythagorean theorem.
สูตร
d = √[(x₂−x₁)² + (y₂−y₁)²] (2D); d = √[(x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²] (3D)
- P₁
- first point (x₁, y₁)
- P₂
- second point (x₂, y₂)
- d
- distance between points (length)
คำแนะนำทีละขั้นตอน
- 12D: d = √((x₂−x₁)² + (y₂−y₁)²)
- 23D: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)
- 3Midpoint: ((x₁+x₂)/2, (y₁+y₂)/2)
- 4Manhattan distance: |x₂−x₁| + |y₂−y₁|
ตัวอย่างที่มีคำตอบ
อินพุต
(0,0) to (3,4)
ผลลัพธ์
d = √(9+16) = 5
อินพุต
(1,2,3) to (4,6,3)
ผลลัพธ์
d = √(9+16+0) = 5
คำถามที่พบบ่อย
Is the distance formula symmetric?
Yes! d(P₁, P₂) = d(P₂, P₁). The order doesn't matter.
Can distance be negative?
No, distance is always non-negative. It's the magnitude of the displacement vector.
How do I find the distance from a point to a line?
Use the point-to-line distance formula: d = |ax₀ + by₀ + c| / √(a² + b²).
พร้อมที่จะคำนวณแล้วหรือยัง? ลองใช้เครื่องคิดเลข Distance Between Points ฟรี
ลองด้วยตัวคุณเอง→