WHY this formula? Because the shortest path between two points is a straight line, and that line is the hypotenuse of a right triangle whose legs lie along grid lines.
Draw horizontal and vertical lines from P and Q to form a right triangle:
From P, draw a horizontal line (parallel to x-axis)
From Q, draw a vertical line (parallel to y-axis)
These meet at point R(x2,y1)
Find the leg lengths:
Horizontal legPR: The y-coordinate stays at y1, only x changes from x1 to x2PR=∣x2−x1∣WHY absolute value? Distance is always positive, but x2−x1 could be negative.
Vertical legQR: The x-coordinate stays at x2, only y changes from y1 to y2QR=∣y2−y1∣
Apply Pythagoras' Theorem to the right triangle PQR:
PQ2=PR2+QR2WHY? In any right triangle, (hypotenuse)² = (leg₁)² + (leg₂)²
Substitute the leg lengths:d2=(x2−x1)2+(y2−y1)2WHY no absolute value signs now? Because squaring makes any number positive: (−a)2=a2
Take the square root:d=(x2−x1)2+(y2−y1)2WHY only positive root? Distance cannot be negative.
Imagine you're at one corner of a rectangular field, and your friend is at the opposite corner. You could walk along the edges (going right, then up), but that's the long way. If you could walk straight across the grass, how far would you go?
The answer is the hypotenuse of the rectangle. To find it, you measure how far across (horizontal) and how far up (vertical), then use Pythagoras: square both, add them, take the square root. That's the distance formula! It works even if your friend is in a weird direction (like southwest) because we use coordinate differences that automatically handle direction.
Distance formula ko samajhne ke liye ek simple visual socho: agar tumhe ek point se dosre point tak jana hai plane pe, toh seedha rasta kya hoga? Yeh straight line jo dono points ko connect karti hai, wohi distance hai. Ab yeh distance nikalne ke liye hum ek clever trick use karte hain — right triangle bana lete hain!
Socho tumhare pas do points hain: P aur Q. Ab tumne P se ek horizontal line draw ki (x-axis ke parallel) aur Q se ek vertical line (y-axis ke parallel). Dono lines jahan milti hain, woh third point R ban jata hai. Ab dekho — PQR ek right triangle hai! PR wali horizontal line ki length hai x2 - x1 (kyunki sirf x-coordinate changehua), aur QR wali vertical line ki length hai y2 - y1. Ab Pythagoras Theorem yad karo: right triangle mein hypotenuse ka square equal hota hai dono sides ke squares ke sum ke. Toh PQ (yani distance d) nikalne ke liye: d² = (x2-x1)² + (y2-y1)². Dono taraf square root lene pe final formula mil jata hai!
Yeh formula bahut powerful hai kyunki yeh har tarah ke points ke liye kaam karta hai — positive, negative, decimals, kuch bhi ho. Aur sabse badi baat, yeh symmetrical hai — matlab P se Q ka distance same hai Q se P ke distance ke. Engineering, physics, computer graphics — sabhi jagah yeh formula use hota hai. Ek baar samajh gaye toh coordinate geometry mein age bahut kuch easy ho jayega!