Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Distance and Midpoint between Complex Numbers


Complex Distance & Midpoint

|z₁ − z₂| is the distance, (z₁ + z₂)/2 is the midpoint
ReIm-5−5i-4−4i-3−3i-2−2i-1−1i11i22i33i44i55iΔa = 5Δb = 2d = 5.39Mz₁z₂
z₁
-2 + i
z₂
3 + 3i
Distance |z₁ − z₂|
5.39
Midpoint (z₁ + z₂) / 2
0.50 + 2i
Distance Step-by-Step
z₁ − z₂ = (-2 + i) − (3 + 3i) = -5 − 2i
|z₁ − z₂| = √(Δa² + Δb²)
= √(5² + 2²)
= √(25 + 4)
= √(29)
= 5.39
Midpoint Step-by-Step
M = (z₁ + z₂) / 2
= ((-2 + i) + (3 + 3i)) / 2
= (1 + 4i) / 2
= 0.50 + 2i
Key Ideas
The distance between two complex numbers is |z₁ − z₂| = √((a₁−a₂)² + (b₁−b₂)²). It is the same Euclidean distance formula from coordinate geometry — the Argand plane is just the xy-plane relabeled.
The right triangle shows the horizontal difference Δa = |a₁−a₂| and vertical difference Δb = |b₁−b₂|. The distance is the hypotenuse. Pythagoras at work.
The midpoint is (z₁+z₂)/2 — average the real parts, average the imaginary parts. It is the point equidistant from both z₁ and z₂ along the segment connecting them.
The dashed circle is centered at z₁ with radius |z₁−z₂|. Every point on this circle is the same distance from z₁ as z₂ is. The equation |z − z₁| = r describes a circle of radius r centered at z₁.
When z₂ = 0 (the origin), the distance |z₁ − 0| = |z₁| is just the modulus. Distance generalizes modulus to any two points, not just from the origin.





Getting Started — Drag Two Points

Two draggable points sit on the complex plane: z1z_1 (navy) and z2z_2 (orange). Grab either one and move it to see the orange distance segment, the purple midpoint, and both step-by-step panels update in real time.

Type precise values into the input fields on the right — each point has separate real and imaginary inputs accepting 5-5 to 55 in steps of 0.10.1. Five presets are available: a general pair (2+i)(-2+i) & (3+3i)(3+3i), an origin-based pair 00 & (3+4i)(3+4i), a symmetric pair, a vertical pair, and a horizontal pair. Click Random to generate two arbitrary points.

The Show circle checkbox toggles a dashed blue circle centered at z1z_1 that passes through z2z_2. Every point on this circle is the same distance from z1z_1 as z2z_2 is. Toggle it off for a cleaner view of the triangle and midpoint.

The Right Triangle and Distance Segment

When both the horizontal and vertical differences between the two points are nonzero, a right triangle appears on the plane. The green horizontal leg shows Δa=a1a2\Delta a = |a_1 - a_2| (the difference in real parts), the red vertical leg shows Δb=b1b2\Delta b = |b_1 - b_2| (the difference in imaginary parts), and the orange segment connecting z1z_1 to z2z_2 is the hypotenuse — the distance.

A small right-angle marker appears at the corner where the two legs meet. The triangle's orientation depends on the relative positions of z1z_1 and z2z_2: the corner can appear in any of four positions depending on which point is above, below, left, or right of the other.

Click the default preset (2+i)(-2+i) & (3+3i)(3+3i) to see a triangle with Δa=5\Delta a = 5 and Δb=2\Delta b = 2, giving distance 25+4=295.39\sqrt{25 + 4} = \sqrt{29} \approx 5.39. The triangle makes the Pythagorean relationship visible — the distance is always the hypotenuse.

Vertical and Horizontal Degenerate Cases

Click Vertical to load z1=1+4iz_1 = 1 + 4i and z2=12iz_2 = 1 - 2i. Both points share the same real part (a=1a = 1), so Δa=0\Delta a = 0. The right triangle collapses — the green horizontal leg vanishes and only the red vertical segment remains. The distance simplifies to b1b2=4(2)=6|b_1 - b_2| = |4 - (-2)| = 6.

Click Horizontal to load z1=4z_1 = -4 and z2=4z_2 = 4. Both are real numbers with the same imaginary part (b=0b = 0), so Δb=0\Delta b = 0. The red vertical leg disappears and only the green horizontal segment remains. The distance is a1a2=44=8|a_1 - a_2| = |-4 - 4| = 8.

In both cases the right-angle marker also disappears because there is no corner — just a single straight line. These are the simplest distance illustrations: purely horizontal or purely vertical segments with the distance equal to the absolute difference along one axis.

Symmetric Points and Midpoint at the Origin

Click Symmetric to load z1=32iz_1 = -3 - 2i and z2=3+2iz_2 = 3 + 2i. These points are symmetric about the origin — each is the negation of the other. The midpoint formula gives M=(z1+z2)/2=(0+0i)/2=0M = (z_1 + z_2)/2 = (0 + 0i)/2 = 0.

The purple midpoint dot sits exactly at the origin. The distance segment passes through the center of the plane, and the right triangle straddles both quadrants with legs spanning the full width and height.

This is the only preset where the midpoint coincides with the origin. It produces a distinctive SVG: the midpoint overlaps with the origin marker, and the segment is perfectly centered. The distance is 62+42=527.21\sqrt{6^2 + 4^2} = \sqrt{52} \approx 7.21.

You can create other symmetric configurations by setting z2=z1z_2 = -z_1 for any z1z_1. The midpoint will always land at the origin because the two points cancel when averaged.

Distance from the Origin — Modulus as a Special Case

Click the preset 00 & (3+4i)(3+4i). When one point is the origin (z2=0z_2 = 0), the distance formula z1z2=z10=z1|z_1 - z_2| = |z_1 - 0| = |z_1| reduces to the modulus of z1z_1.

Here 3+4i=9+16=5|3 + 4i| = \sqrt{9 + 16} = 5 — the famous 3-4-5 right triangle. The green horizontal leg is 33, the red vertical leg is 44, and the orange hypotenuse is 55. The right triangle sits in Quadrant I with one vertex at the origin.

The midpoint is M=(0+3+4i)/2=1.5+2iM = (0 + 3 + 4i)/2 = 1.5 + 2i, which lies halfway along the segment from the origin to z1z_1.

This demonstrates that distance between complex numbers is a generalization of the modulus. The modulus z|z| measures distance from the origin; z1z2|z_1 - z_2| measures distance between any two points. Every modulus calculation is a distance calculation with z2=0z_2 = 0.

The Dashed Circle and Locus Interpretation

When the Show circle checkbox is enabled (the default), a dashed blue circle appears centered at z1z_1 with radius equal to the distance z1z2|z_1 - z_2|. The circle passes exactly through z2z_2.

This circle represents the locus of all complex numbers zz satisfying zz1=z1z2|z - z_1| = |z_1 - z_2| — every point on the circle is the same distance from z1z_1 as z2z_2 is. Dragging z2z_2 farther away makes the circle grow; dragging it closer makes the circle shrink.

Toggle the circle off to get a cleaner view focused on the triangle and midpoint alone. Toggle it back on to study the circle equation zz0=r|z - z_0| = r, which describes a circle of radius rr centered at z0z_0 in the complex plane.

Try the Horizontal preset with the circle on: the circle is centered at (4,0)(-4, 0) with radius 88, extending far across the plane. Then try the Vertical preset: the circle is centered at (1,4)(1, 4) with radius 66, sitting mostly above the real axis.

Reading the Step-by-Step Panels

The right panel contains two step-by-step breakdowns that update dynamically.

The Distance Step-by-Step panel walks through the full calculation:

First it computes z1z2z_1 - z_2 to find the difference vector. Then it applies the Pythagorean formula z1z2=Δa2+Δb2|z_1 - z_2| = \sqrt{\Delta a^2 + \Delta b^2}, substituting the actual component differences, squaring them, adding, and taking the square root. The final distance appears highlighted in orange.

The Midpoint Step-by-Step panel shows three lines: the formula M=(z1+z2)/2M = (z_1 + z_2)/2, the sum z1+z2z_1 + z_2, and the result after dividing by 22. The final midpoint appears in purple.

Both panels make the component-wise nature of these operations explicit — distance uses differences and squares, while midpoint uses sums and halving. Each updates with every drag or keystroke.

The Distance Formula for Complex Numbers

The distance between two complex numbers z1=a1+b1iz_1 = a_1 + b_1 i and z2=a2+b2iz_2 = a_2 + b_2 i is the modulus of their difference:

z1z2=(a1a2)2+(b1b2)2|z_1 - z_2| = \sqrt{(a_1 - a_2)^2 + (b_1 - b_2)^2}


This is identical to the Euclidean distance formula from coordinate geometry, treating the complex plane as the xyxy-plane with the real axis as xx and the imaginary axis as yy.

The formula comes from the Pythagorean theorem applied to the right triangle formed by the horizontal difference Δa=a1a2\Delta a = a_1 - a_2 and the vertical difference Δb=b1b2\Delta b = b_1 - b_2. The distance is the hypotenuse.

In complex notation, z1z2|z_1 - z_2| can also be written as (z1z2)(z1z2)\sqrt{(z_1 - z_2) \cdot \overline{(z_1 - z_2)}}, since for any complex number ww, w=wwˉ|w| = \sqrt{w \cdot \bar{w}}. This connects the distance formula to the conjugate and modulus properties of complex numbers.

The Midpoint Formula for Complex Numbers

The midpoint of the segment connecting z1z_1 and z2z_2 is their arithmetic average:

M=z1+z22=a1+a22+b1+b22iM = \frac{z_1 + z_2}{2} = \frac{a_1 + a_2}{2} + \frac{b_1 + b_2}{2}i


Average the real parts to get the real coordinate of the midpoint. Average the imaginary parts to get the imaginary coordinate. The result is the unique point equidistant from z1z_1 and z2z_2 along the segment connecting them.

The midpoint satisfies two key properties: Mz1=Mz2|M - z_1| = |M - z_2| (equal distance from both endpoints), and MM lies on the straight line from z1z_1 to z2z_2.

This generalizes naturally. The point that divides the segment in ratio t:(1t)t : (1-t) is z1+t(z2z1)=(1t)z1+tz2z_1 + t(z_2 - z_1) = (1-t)z_1 + tz_2. Setting t=1/2t = 1/2 gives the midpoint. Setting t=1/3t = 1/3 gives the point one-third of the way from z1z_1 to z2z_2.

Coincident Points — Distance Zero

Drag both points to the same position — for example, set both to 2+i2 + i. The distance becomes 00 because z1z2=0z_1 - z_2 = 0. The right triangle vanishes entirely (both legs have zero length), the orange distance segment shrinks to nothing, and the midpoint coincides with both points.

The dashed circle also collapses to a single point (radius 00). The step-by-step panel confirms: 02+02=0\sqrt{0^2 + 0^2} = 0.

This is the only configuration where z1z2=0|z_1 - z_2| = 0. By definition, w=0|w| = 0 if and only if w=0w = 0, so z1z2=0|z_1 - z_2| = 0 if and only if z1=z2z_1 = z_2. This property is one of the axioms of a metric — the distance between two points is zero precisely when the points coincide.

Related Concepts and Tools

Distance and midpoint are foundational operations in complex plane geometry. Explore these related pages.

Complex Addition & Subtraction Visualizer — the distance z1z2|z_1 - z_2| is the modulus of the subtraction result. The midpoint (z1+z2)/2(z_1 + z_2)/2 is half the addition result. This tool shows both operations geometrically.

Polar-Rectangular Converter — convert between a+bia + bi and reiθre^{i\theta}. The modulus r=zr = |z| is the distance from the origin, a special case of the general distance formula.

Complex Number Explorer — a general-purpose tool for plotting, operating on, and exploring complex numbers on the plane.

Euler's Formula Explorer — visualize how eiθe^{i\theta} traces the unit circle, connecting distance and angle concepts.

Complex Numbers — foundational theory covering the imaginary unit, rectangular form, modulus, and algebraic operations.

Complex Conjugate Visualizer — conjugates reflect across the real axis. The distance between zz and zˉ\bar{z} is 2b2|b| — twice the imaginary part.