# Sum of Complex Numbers in Exponential Form/General Result

## Theorem

Let $n \in \Z_{>0}$ be a positive integer.

For all $k \in \set {1, 2, \dotsc, n}$, let:

$z_k = r_k e^{i \theta_k}$

Let:

$r e^{i \theta} = \displaystyle \sum_{k \mathop = 1}^n z_k = z_1 + z_2 + \dotsb + z_k$

Then:

 $\displaystyle r$ $=$ $\displaystyle \sqrt {\displaystyle \sum_{k \mathop = 1}^n r_k + \displaystyle \sum_{1 \mathop \le j \mathop < k \mathop \le n} 2 {r_j} {r_k} \, \map \cos {\theta_j - \theta_k} }$ $\displaystyle \theta$ $=$ $\displaystyle \map \arctan {\dfrac {r_1 \sin \theta_1 + r_2 \sin \theta_2 + \dotsb + r_n \sin \theta_n} {r_1 \cos \theta_1 + r_2 \cos \theta_2 + \dotsb + r_n \cos \theta_n} }$

## Proof

Let:

 $\displaystyle r e^{i \theta}$ $=$ $\displaystyle \displaystyle \sum_{k \mathop = 1}^n z_k$ $\displaystyle$ $=$ $\displaystyle z_1 + z_2 + \dotsb + z_k$ $\displaystyle$ $=$ $\displaystyle r_1 \paren {\cos \theta_1 + i \sin \theta_1} + r_2 \paren {\cos \theta_2 + i \sin \theta_2} + \dotsb + r_n \paren {\cos \theta_n + i \sin \theta_n}$ Definition of Complex Number $\displaystyle$ $=$ $\displaystyle r_1 \cos \theta_1 + r_2 \cos \theta_2 + \dotsb + r_n \cos \theta_n + i \paren {r_1 \sin \theta_1 + r_2 \sin \theta_2 + \dotsb + r_n \sin \theta_n}$ rerranging

By the definition of the complex modulus, with $z = x + i y$, $r$ is defined as:

$r = \sqrt {\map {\Re^2} z + \map {\Im^2} z}$

Hence

 $\displaystyle r$ $=$ $\displaystyle \sqrt {\map {\Re^2} z + \map {\Im^2} z}$ $\displaystyle r$ $=$ $\displaystyle \sqrt {\paren {r_1 \cos \theta_1 + r_2 \cos \theta_2 + \dotsb + r_n \cos \theta_n }^2 + \paren {r_1 \sin \theta_1 + r_2 \sin \theta_2 + \dotsb + r_n \sin \theta_n}^2 }$

In the above we have two types of pairs of terms:

 $(1):\quad$ $\, \displaystyle 1 \le k \le n: \,$ $\displaystyle {r_k}^2 \cos^2 {\theta_k}^2 + {r_k}^2 \sin^2 {\theta_k}^2$ $=$ $\displaystyle {r_k}^2 \paren {\cos^2 {\theta_k}^2 + \sin^2 {\theta_k}^2}$ $\displaystyle$ $=$ $\displaystyle {r_k}^2$ Sum of Squares of Sine and Cosine $(2):\quad$ $\, \displaystyle 1 \le j < k \le n: \,$ $\displaystyle 2 r_j r_k \cos \theta_j \cos \theta_k + 2 {r_j} {r_k} \sin \theta_j \sin \theta_k$ $=$ $\displaystyle 2 r_j r_k \paren {\cos \theta_j \cos \theta_k + \sin \theta_j \sin \theta_k}$ $\displaystyle$ $=$ $\displaystyle 2 r_j r_k \, \map \cos {\theta_j - \theta_k}$ Cosine of Difference

Hence:

$r = \sqrt {\displaystyle \sum_{k \mathop = 1}^n r_k + \displaystyle \sum_{1 \mathop \le j \mathop < k \mathop \le n} 2 {r_j} {r_k} \, \map \cos {\theta_j - \theta_k} }$

Note that $r > 0$ since $r_k > 0$ for all $k$.

Hence we may safely assume that $r > 0$ when determining the argument below.

By definition of the argument of a complex number, with $z = x + i y$, $\theta$ is defined as any solution to the pair of equations:

$(1): \quad \dfrac x {\cmod z} = \map \cos \theta$
$(2): \quad \dfrac y {\cmod z} = \map \sin \theta$

where $\cmod z$ is the modulus of $z$.

As $r > 0$ we have that $\cmod z \ne 0$ by definition of modulus.

Hence we can divide $(2)$ by $(1)$, to get:

 $\displaystyle \map \tan \theta$ $=$ $\displaystyle \frac y x$ $\displaystyle$ $=$ $\displaystyle \frac {\map \Im z} {\map \Re z}$

Hence:

 $\displaystyle \theta$ $=$ $\displaystyle \map \arctan {\frac {\map \Im {r e^{i \theta} } } {\map \Re {r e^{i \theta} } } }$ $\displaystyle$ $=$ $\displaystyle \map \arctan {\dfrac {r_1 \sin \theta_1 + r_2 \sin \theta_2 + \dotsb + r_n \sin \theta_n} {r_1 \cos \theta_1 + r_2 \cos \theta_2 + \dotsb + r_n \cos \theta_n} }$

$\blacksquare$