Distance Between Two Points in 3D Space

easy CBSE JEE-MAIN NCERT Class 12 3 min read

Question

Find the distance between the points A(1,2,3)A(1, 2, 3) and B(4,6,3)B(4, 6, 3).


Solution — Step by Step

For two points P(x1,y1,z1)P(x_1, y_1, z_1) and Q(x2,y2,z2)Q(x_2, y_2, z_2), the distance is:

PQ=(x2x1)2+(y2y1)2+(z2z1)2PQ = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}

This is just the 2D formula with a third term added — same logic, one extra dimension.

Here, A=(1,2,3)A = (1, 2, 3) and B=(4,6,3)B = (4, 6, 3).

So: x1=1, y1=2, z1=3x_1 = 1,\ y_1 = 2,\ z_1 = 3 and x2=4, y2=6, z2=3x_2 = 4,\ y_2 = 6,\ z_2 = 3.

x2x1=41=3x_2 - x_1 = 4 - 1 = 3 y2y1=62=4y_2 - y_1 = 6 - 2 = 4 z2z1=33=0z_2 - z_1 = 3 - 3 = 0

Notice the zz-coordinates are equal — both points lie in the plane z=3z = 3.

AB=32+42+02=9+16+0=25AB = \sqrt{3^2 + 4^2 + 0^2} = \sqrt{9 + 16 + 0} = \sqrt{25} AB=5 units\boxed{AB = 5 \text{ units}}

Why This Works

The 3D distance formula is a direct extension of the Pythagorean theorem applied twice. First, we find the 2D distance in the xyxy-plane, then use that as the base of a right triangle with the zz-difference as the height.

When z1=z2z_1 = z_2 (as in this problem), the formula collapses back to the familiar 2D form: (x2x1)2+(y2y1)2\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}. Both points are co-planar, so the third dimension contributes nothing.

The 3, 4, 5 Pythagorean triple appearing here is not a coincidence in exam questions — NCERT and board setters love clean answers. Recognising the triple saves calculation time.


Alternative Method — Using Vectors

We can treat the two points as position vectors a=i^+2j^+3k^\vec{a} = \hat{i} + 2\hat{j} + 3\hat{k} and b=4i^+6j^+3k^\vec{b} = 4\hat{i} + 6\hat{j} + 3\hat{k}.

The displacement vector is:

AB=ba=3i^+4j^+0k^\vec{AB} = \vec{b} - \vec{a} = 3\hat{i} + 4\hat{j} + 0\hat{k}

The magnitude gives the distance:

AB=32+42+02=25=5|\vec{AB}| = \sqrt{3^2 + 4^2 + 0^2} = \sqrt{25} = 5

This vector approach becomes much more powerful in 3D Geometry chapters when you need direction cosines or projections — it’s worth getting comfortable with it now.

When any two coordinates are equal between the two points, cancel that term mentally before calculating. It reduces one squaring step and lowers the chance of arithmetic errors under exam pressure.


Common Mistake

Students often forget to square the differences before adding. A common slip is writing 3+4+0=7\sqrt{3 + 4 + 0} = \sqrt{7} instead of 9+16+0=25\sqrt{9 + 16 + 0} = \sqrt{25}. The formula requires (x2x1)2(x_2 - x_1)^2, not (x2x1)(x_2 - x_1). Always write each squared term explicitly in the first step — don’t skip it mentally.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next