Methods from Complex arithmetic
All methods from Complex arithmetic.
[METHOD]For z1=x1+iy1 and z2=x2+iy2,
z1+z2=(x1+x2)+i(y1+y2),z1z2=(x1x2−y1y2)+i(x1y2+y1x2).The additive inverse is −z1. For a non-zero z=x+iy,
z−1=x2+y2x−ix2+y2y,zz−1=1.Division is defined using this inverse. In practice, when z2=0,
z2z1=z2z2z1z2.The multiplication formula follows by expanding and replacing i2 by −1. The conjugate in the division formula makes the denominator real:
z2z2=∣z2∣2.