TExcelTAD
Home › Coordinate Geometry: 2D & 3D Cartesian Systems › Distance, Midpoint, and 3D Vectors with Vector Norms

Distance, Midpoint, and 3D Vectors with Vector Norms

In plane geometry, the distance between two points is computed using the Pythagorean theorem on a right triangle. When we step into three-dimensional space, the fundamental geometry does not change—it simply applies twice in succession. The spatial distance between any two points is the length of the long diagonal of a rectangular cuboid.

Understanding spatial distance opens the door to 3D vectors, sphere equations, and navigation in physical space.


1. The Spatial Distance Formula via Double Pythagoras

Consider two points in space, P1(x1,y1,z1)P_1(x_1, y_1, z_1) and P2(x2,y2,z2)P_2(x_2, y_2, z_2). Imagine constructing a rectangular box with opposite corners at P1P_1 and P2P_2, with edges parallel to the coordinate axes:

  • Edge along the xx-direction: ∣Δx∣=∣x2−x1∣|\Delta x| = |x_2 - x_1|
  • Edge along the yy-direction: ∣Δy∣=∣y2−y1∣|\Delta y| = |y_2 - y_1|
  • Edge along the zz-direction: ∣Δz∣=∣z2−z1∣|\Delta z| = |z_2 - z_1|

Derivation on Paper

  1. First, find the diagonal dbased_{\text{base}} of the horizontal base in the xyxy-plane using the 2D Pythagorean theorem:
    dbase2=(Δx)2+(Δy)2=(x2−x1)2+(y2−y1)2d_{\text{base}}^2 = (\Delta x)^2 + (\Delta y)^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2
  2. The vertical edge of height ∣Δz∣|\Delta z| is perpendicular to the base. Thus, dbased_{\text{base}}, ∣Δz∣|\Delta z|, and the space diagonal dd form a vertical right-angled triangle:
    d2=dbase2+(Δz)2=(x2−x1)2+(y2−y1)2+(z2−z1)2d^2 = d_{\text{base}}^2 + (\Delta z)^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2

Taking the positive square root gives the universal 3D Euclidean Distance Formula:

d(P1,P2)=(x2−x1)2+(y2−y1)2+(z2−z1)2d(P_1, P_2) = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}

2. Geometric Diagram: The 3D Distance Cuboid

z y x d_{base} |Deltaz| d = √(Deltax^2 + Deltay^2 + Deltaz^2) P_1(x_1,y_1,z_1) P_2(x_2,y_2,z_2)

3. Midpoint and Spheres in R3\mathbb{R}^3

The 3D Midpoint Formula

The midpoint MM of segment P1P2P_1P_2 is found by taking the arithmetic mean of each coordinate separately:

M=(x1+x22,  y1+y22,  z1+z22)M = \left( \frac{x_1 + x_2}{2}, \; \frac{y_1 + y_2}{2}, \; \frac{z_1 + z_2}{2} \right)

The Standard Equation of a Sphere

A sphere is the set of all points P(x,y,z)P(x, y, z) in R3\mathbb{R}^3 whose distance to a fixed center C(x0,y0,z0)C(x_0, y_0, z_0) equals a constant radius R>0R > 0:

d(P,C)=R  ⟺  (x−x0)2+(y−y0)2+(z−z0)2=Rd(P, C) = R \iff \sqrt{(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2} = R

Squaring both sides yields the Standard Form Equation of a Sphere:

(x−x0)2+(y−y0)2+(z−z0)2=R2(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 = R^2

4. 3D Spatial Vectors and Norms

A vector in R3\mathbb{R}^3 represents a directed line segment possessing both a magnitude (length) and a direction.

Component Form and Standard Basis Vectors

If a vector has initial point A(x1,y1,z1)A(x_1, y_1, z_1) and terminal point B(x2,y2,z2)B(x_2, y_2, z_2), its displacement vector AB⃗\vec{AB} in component form is:

AB⃗=⟨x2−x1,  y2−y1,  z2−z1⟩\vec{AB} = \langle x_2 - x_1, \; y_2 - y_1, \; z_2 - z_1 \rangle

We define the three standard unit basis vectors pointing along the positive coordinate axes:

i⃗=⟨1,0,0⟩,j⃗=⟨0,1,0⟩,k⃗=⟨0,0,1⟩\vec{i} = \langle 1, 0, 0 \rangle, \qquad \vec{j} = \langle 0, 1, 0 \rangle, \qquad \vec{k} = \langle 0, 0, 1 \rangle

Any vector v⃗=⟨v1,v2,v3⟩\vec{v} = \langle v_1, v_2, v_3 \rangle can be written uniquely as:

v⃗=v1i⃗+v2j⃗+v3k⃗\vec{v} = v_1\vec{i} + v_2\vec{j} + v_3\vec{k}

Vector Norm (Magnitude)

The norm (or length) of a vector v⃗=⟨v1,v2,v3⟩\vec{v} = \langle v_1, v_2, v_3 \rangle is denoted ∥v⃗∥\|\vec{v}\|:

∥v⃗∥=v12+v22+v32\|\vec{v}\| = \sqrt{v_1^2 + v_2^2 + v_3^2}

Unit Vector in the Direction of v⃗\vec{v}

A unit vector has magnitude equal to 11. To normalize any non-zero vector v⃗\vec{v}, divide it by its norm:

u^=v⃗∥v⃗∥=⟨v1∥v⃗∥,  v2∥v⃗∥,  v3∥v⃗∥⟩,∥u^∥=1\hat{u} = \frac{\vec{v}}{\|\vec{v}\|} = \left\langle \frac{v_1}{\|\vec{v}\|}, \; \frac{v_2}{\|\vec{v}\|}, \; \frac{v_3}{\|\vec{v}\|} \right\rangle, \qquad \|\hat{u}\| = 1

5. Geometric Diagram: 3D Vector Decomposition

z y x i j k v = v_1i + v_2j + v_3k O

6. Step-by-Step Paper Notebook Method

Computing Spatial Distance & Vector Norms on Paper

  1. List the Coordinates Clearly: Write P1(x1,y1,z1)P_1(x_1, y_1, z_1) directly above P2(x2,y2,z2)P_2(x_2, y_2, z_2).
  2. Calculate Differences Underneath:
    Δx=x2−x1,Δy=y2−y1,Δz=z2−z1\Delta x = x_2 - x_1, \qquad \Delta y = y_2 - y_1, \qquad \Delta z = z_2 - z_1
  3. Square Each Difference: Compute (Δx)2(\Delta x)^2, (Δy)2(\Delta y)^2, and (Δz)2(\Delta z)^2. Double check that all squared values are non-negative!
  4. Sum and Radicand Factorization: Add the three squares together. Factor out perfect squares (like 4,9,16,25,36,49,1004, 9, 16, 25, 36, 49, 100) to leave the radical in simplest exact form.

7. Worked Examples

Example 1: Triangle Classification in R3\mathbb{R}^3

Problem: A triangle in space has vertices A(2,−1,3)A(2, -1, 3), B(5,1,7)B(5, 1, 7), and C(4,2,1)C(4, 2, 1).

  1. Find the lengths of all three sides.
  2. Determine whether △ABC\triangle ABC is equilateral, isosceles, or scalene.
  3. Test whether △ABC\triangle ABC is a right-angled triangle.

Solution

  • Side 1: Length of ABAB

    AB=(5−2)2+(1−(−1))2+(7−3)2=32+22+42=9+4+16=29\begin{aligned} AB &= \sqrt{(5 - 2)^2 + (1 - (-1))^2 + (7 - 3)^2} \\ &= \sqrt{3^2 + 2^2 + 4^2} = \sqrt{9 + 4 + 16} = \sqrt{29} \end{aligned}
  • Side 2: Length of BCBC

    BC=(4−5)2+(2−1)2+(1−7)2=(−1)2+12+(−6)2=1+1+36=38\begin{aligned} BC &= \sqrt{(4 - 5)^2 + (2 - 1)^2 + (1 - 7)^2} \\ &= \sqrt{(-1)^2 + 1^2 + (-6)^2} = \sqrt{1 + 1 + 36} = \sqrt{38} \end{aligned}
  • Side 3: Length of CACA

    CA=(2−4)2+(−1−2)2+(3−1)2=(−2)2+(−3)2+22=4+9+4=17\begin{aligned} CA &= \sqrt{(2 - 4)^2 + (-1 - 2)^2 + (3 - 1)^2} \\ &= \sqrt{(-2)^2 + (-3)^2 + 2^2} = \sqrt{4 + 9 + 4} = \sqrt{17} \end{aligned}
  • Classification:

    • Since AB=29AB = \sqrt{29}, BC=38BC = \sqrt{38}, and CA=17CA = \sqrt{17} are all distinct, the triangle is scalene.
    • Check the Pythagorean relation on the longest side BCBC:
      AB2+CA2=29+17=46≠BC2  (38)AB^2 + CA^2 = 29 + 17 = 46 \neq BC^2 \; (38)
      Therefore, △ABC\triangle ABC is not a right triangle.

Example 2: Sphere Equation from Diameter Endpoints

Problem: The line segment connecting A(1,4,−2)A(1, 4, -2) and B(7,−2,6)B(7, -2, 6) is a diameter of a sphere SS.

  1. Find the coordinates of the center CC.
  2. Find the radius RR of the sphere.
  3. Write the standard equation of the sphere.
  4. Determine whether the point P(3,5,1)P(3, 5, 1) lies inside, on, or outside the sphere.

Solution

  • Step 1: Center CC as Midpoint of ABAB

    C=(1+72,  4+(−2)2,  −2+62)=(4,1,2)C = \left( \frac{1 + 7}{2}, \; \frac{4 + (-2)}{2}, \; \frac{-2 + 6}{2} \right) = (4, 1, 2)
  • Step 2: Radius RR The radius is the distance from center C(4,1,2)C(4, 1, 2) to endpoint A(1,4,−2)A(1, 4, -2):

    R=(1−4)2+(4−1)2+(−2−2)2=(−3)2+32+(−4)2=9+9+16=34\begin{aligned} R &= \sqrt{(1 - 4)^2 + (4 - 1)^2 + (-2 - 2)^2} \\ &= \sqrt{(-3)^2 + 3^2 + (-4)^2} = \sqrt{9 + 9 + 16} = \sqrt{34} \end{aligned}

    (Check via diameter: AB=62+(−6)2+82=36+36+64=136=234  ⟹  R=34AB = \sqrt{6^2 + (-6)^2 + 8^2} = \sqrt{36 + 36 + 64} = \sqrt{136} = 2\sqrt{34} \implies R = \sqrt{34}. Correct!)

  • Step 3: Standard Equation of the Sphere

    (x−4)2+(y−1)2+(z−2)2=34(x - 4)^2 + (y - 1)^2 + (z - 2)^2 = 34
  • Step 4: Location of P(3,5,1)P(3, 5, 1) Calculate the square of the distance from PP to the center C(4,1,2)C(4, 1, 2):

    d(P,C)2=(3−4)2+(5−1)2+(1−2)2=(−1)2+42+(−1)2=1+16+1=18\begin{aligned} d(P, C)^2 &= (3 - 4)^2 + (5 - 1)^2 + (1 - 2)^2 \\ &= (-1)^2 + 4^2 + (-1)^2 = 1 + 16 + 1 = 18 \end{aligned}

    Compare d(P,C)2=18d(P, C)^2 = 18 to R2=34R^2 = 34: Since 18<3418 < 34, the point P(3,5,1)P(3, 5, 1) lies strictly inside the sphere.


Example 3: Unit Vectors and Scaling

Problem: Given vector v⃗=4i⃗−2j⃗+4k⃗\vec{v} = 4\vec{i} - 2\vec{j} + 4\vec{k}:

  1. Find the norm ∥v⃗∥\|\vec{v}\|.
  2. Find a unit vector u^\hat{u} in the same direction as v⃗\vec{v}.
  3. Find a vector w⃗\vec{w} that points in the opposite direction of v⃗\vec{v} and has a magnitude of 15 units15\text{ units}.

Solution

  • Step 1: Compute Norm

    ∥v⃗∥=42+(−2)2+42=16+4+16=36=6\|\vec{v}\| = \sqrt{4^2 + (-2)^2 + 4^2} = \sqrt{16 + 4 + 16} = \sqrt{36} = 6
  • Step 2: Unit Vector u^\hat{u}

    u^=v⃗∥v⃗∥=16⟨4,−2,4⟩=⟨23,  −13,  23⟩\hat{u} = \frac{\vec{v}}{\|\vec{v}\|} = \frac{1}{6} \langle 4, -2, 4 \rangle = \left\langle \frac{2}{3}, \; -\frac{1}{3}, \; \frac{2}{3} \right\rangle

    Check norm: (2/3)2+(−1/3)2+(2/3)2=4/9+1/9+4/9=9/9=1\sqrt{(2/3)^2 + (-1/3)^2 + (2/3)^2} = \sqrt{4/9 + 1/9 + 4/9} = \sqrt{9/9} = 1.

  • Step 3: Opposite Vector of Magnitude 15 Multiply the unit vector u^\hat{u} by −15-15:

    w⃗=−15u^=−15⟨23,  −13,  23⟩=⟨−10,  5,  −10⟩\vec{w} = -15 \hat{u} = -15 \left\langle \frac{2}{3}, \; -\frac{1}{3}, \; \frac{2}{3} \right\rangle = \langle -10, \; 5, \; -10 \rangle

    Check magnitude: (−10)2+52+(−10)2=100+25+100=225=15\sqrt{(-10)^2 + 5^2 + (-10)^2} = \sqrt{100 + 25 + 100} = \sqrt{225} = 15. Correct!


8. Common Mistakes & Paper Traps

[!WARNING] Trap 1: Dropping Negative Signs Inside Squares
On paper, writing −32-3^2 instead of (−3)2(-3)^2 leads to subtraction: −9-9 instead of +9+9. Remember that the square of any real coordinate difference is strictly non-negative:

(Δx)2≥0,(Δy)2≥0,(Δz)2≥0(\Delta x)^2 \ge 0, \quad (\Delta y)^2 \ge 0, \quad (\Delta z)^2 \ge 0

[!WARNING] Trap 2: Radius vs. Radius Squared in Sphere Equations
In the equation (x−1)2+(y+3)2+(z−5)2=49(x - 1)^2 + (y + 3)^2 + (z - 5)^2 = 49, the radius is R=49=7R = \sqrt{49} = 7, not 4949. If asked for the diameter, it is 2R=142R = 14.

[!WARNING] Trap 3: Subtracting Coordinates in Reverse for Vectors
For the vector AB⃗\vec{AB} from AA to BB, always compute:

AB⃗=B−A=⟨xB−xA,  yB−yA,  zB−zA⟩\vec{AB} = B - A = \langle x_B - x_A, \; y_B - y_A, \; z_B - z_A \rangle

Calculating A−BA - B yields −AB⃗-\vec{AB}, which points in the completely opposite direction!


9. Pencil & Paper Practice

Try these exercises on paper before reviewing the solutions.

Practice Problems

  1. Points K(3,−2,4)K(3, -2, 4) and L(−1,6,2)L(-1, 6, 2) are given.
    • (a) Find the distance KLKL in simplest radical form.
    • (b) Find the coordinates of the midpoint of KLKL.
  2. The equation of a sphere is given in general form as x2+y2+z2−6x+4y−10z+22=0x^2 + y^2 + z^2 - 6x + 4y - 10z + 22 = 0. By completing the square on paper, find the coordinates of the center CC and the radius RR.
  3. Find a vector p⃗\vec{p} that has length 66 and points in the same direction as a⃗=⟨1,−2,2⟩\vec{a} = \langle 1, -2, 2 \rangle.

Worked Solutions

Solution 1:

  • (a) Distance:
    KL=(−1−3)2+(6−(−2))2+(2−4)2=(−4)2+82+(−2)2=16+64+4=84=221\begin{aligned} KL &= \sqrt{(-1 - 3)^2 + (6 - (-2))^2 + (2 - 4)^2} \\ &= \sqrt{(-4)^2 + 8^2 + (-2)^2} = \sqrt{16 + 64 + 4} = \sqrt{84} = 2\sqrt{21} \end{aligned}
  • (b) Midpoint:
    M=(3+(−1)2,  −2+62,  4+22)=(1,2,3)M = \left( \frac{3 + (-1)}{2}, \; \frac{-2 + 6}{2}, \; \frac{4 + 2}{2} \right) = (1, 2, 3)

Solution 2: Group terms by variable and complete the square for each:

(x2−6x)+(y2+4y)+(z2−10z)=−22(x−3)2−9+(y+2)2−4+(z−5)2−25=−22(x−3)2+(y+2)2+(z−5)2=−22+9+4+25=16\begin{aligned} (x^2 - 6x) + (y^2 + 4y) + (z^2 - 10z) &= -22 \\ (x - 3)^2 - 9 + (y + 2)^2 - 4 + (z - 5)^2 - 25 &= -22 \\ (x - 3)^2 + (y + 2)^2 + (z - 5)^2 &= -22 + 9 + 4 + 25 = 16 \end{aligned}

Center C(3,−2,5)C(3, -2, 5) and radius R=16=4 unitsR = \sqrt{16} = 4\text{ units}.

Solution 3:

  • Find norm of a⃗\vec{a}:
    ∥a⃗∥=12+(−2)2+22=1+4+4=9=3\|\vec{a}\| = \sqrt{1^2 + (-2)^2 + 2^2} = \sqrt{1 + 4 + 4} = \sqrt{9} = 3
  • Unit vector:
    a^=a⃗3=⟨13,  −23,  23⟩\hat{a} = \frac{\vec{a}}{3} = \left\langle \frac{1}{3}, \; -\frac{2}{3}, \; \frac{2}{3} \right\rangle
  • Scale by 66:
    p⃗=6a^=⟨2,−4,4⟩\vec{p} = 6 \hat{a} = \langle 2, -4, 4 \rangle

Test yourself

What is the distance between points A(2,−3,1)A(2, -3, 1) and B(−1,1,13)B(-1, 1, 13)?

  1. 1313
  2. 169=13\sqrt{169} = 13
  3. 1515
  4. 185\sqrt{185}

What is the center and radius of the sphere x2+y2+z2+4x−8y−6z+13=0x^2 + y^2 + z^2 + 4x - 8y - 6z + 13 = 0?

  1. Center (−2,4,3)(-2, 4, 3), Radius 44
  2. Center (2,−4,−3)(2, -4, -3), Radius 1616
  3. Center (−2,4,3)(-2, 4, 3), Radius 1616
  4. Center (2,−4,−3)(2, -4, -3), Radius 44

Given vector u⃗=⟨−2,3,−6⟩\vec{u} = \langle -2, 3, -6 \rangle, what is the unit vector u^\hat{u} in the same direction?

  1. ⟨−27,37,−67⟩\langle -\frac{2}{7}, \frac{3}{7}, -\frac{6}{7} \rangle
  2. ⟨−249,349,−649⟩\langle -\frac{2}{49}, \frac{3}{49}, -\frac{6}{49} \rangle
  3. ⟨2,−3,6⟩\langle 2, -3, 6 \rangle
  4. ⟨−211,311,−611⟩\langle -\frac{2}{11}, \frac{3}{11}, -\frac{6}{11} \rangle