Math Applets

Complex Addition

Complex Addition:

With the geometric interpretation of the addition of two complex numbers, in Remark 5.3 Item iii, clarifies the notion of the “triangle inequality”. In Figure 5.1, the length of the edges of the parallelogram in blue are given by z1|z_1| and z2|z_2|, whereas the length of the diagonal in red is given by z1+z2|z_1 + z_2|. Hence, as the figure shows, the triangle inequality says that the length of the two shortest edges of a triangle is at least the length of the longest edge.


How to use the applet

  • Drag the two blue points to change the complex numbers
z1=x1+iy1,z2=x2+iy2. z_1 = x_1 + i y_1, \qquad z_2 = x_2 + i y_2.
  • The axes are the complex plane: horizontal =Re(z)=\mathrm{Re}(z), vertical =Im(z)=\mathrm{Im}(z).
  • The blue arrows from the origin represent the vectors z1z_1 and z2z_2.
  • The red arrow represents the sum
z1+z2=(x1+x2)+i(y1+y2). z_1+z_2=(x_1+x_2)+i(y_1+y_2).
  • The dashed light-blue arrows show the parallelogram rule:
    • the arrow z2z1+z2z_2\to z_1+z_2 is a translated copy of z1z_1,
    • the arrow z1z1+z2z_1\to z_1+z_2 is a translated copy of z2z_2. The picture forms a triangle (or parallelogram) with side lengths z1|z_1|, z2|z_2|, and z1+z2|z_1+z_2|.
      This illustrates the triangle inequality:
z1+z2z1+z2. |z_1+z_2|\le |z_1|+|z_2|.

Equality happens when z1z_1 and z2z_2 point in the same direction (same argument).


Loading graph…
  • Hold Shift + scroll to zoom
  • Hold Shift + drag to move
  • Points shaped like <> act as sliders

Description

Link to code.

Reference: Lecture Notes Calculus 1 ( May22,2022 ) Figure5.1. page 75

This applet visualizes addition of two complex numbers as vectors in the complex plane (horizontal axis Re(z)\mathrm{Re}(z), vertical axis Im(z)\mathrm{Im}(z)) and illustrates the geometric idea behind the triangle inequality. The origin is the point 00, and two draggable points represent the complex numbers z1z_1 and z2z_2.

The two complex numbers are represented by blue arrows from the origin to the draggable points (board.create("arrow", [O, z1]) and board.create("arrow", [O, z2])). Their sum is represented by the red arrow from the origin to the point z3z_3, where z3z_3 is defined dynamically as z3 = (z1.X() + z2.X(), z1.Y() + z2.Y()) in the code: const z3 = board.create("point", [() => z1.X() + z2.X(), () => z1.Y() + z2.Y()], ...).

To help students see the parallelogram (and hence the triangle inequality), the applet also draws two dashed light-azure translated arrows: z2 → z3 is a translated copy of z1z_1, and it is labeled z₁; z1 → z3 is a translated copy of z2z_2, and it is labeled z₂. These auxiliary arrows make it clear that the diagonal of the parallelogram corresponds to z1+z2z_1+z_2.