Equality of triangle inequality in complex numbers

$z$ and $w$ be nonzero complex numbers. How do I show that $|z+w|=|z|+|w|$ if and only if $z=sw$ for some real positive number $s$.

I approached this by letting $z=a+ib$, and $w=c+id$, and kinda play around with it. I also tried to square both sides when proving forward direction, but I could not get it to work. Can anyone get me some ideas, maybe?

Thank you!

Solutions Collecting From Web of "Equality of triangle inequality in complex numbers"

First try to prove it in one direction.

Let $z = a + bi$ and $w = sa + sbi$. Then we have:

$$\mid z + w \mid = \mid a + bi + sa + sbi \mid = \mid |a(1+s) + (1+s)bi\mid = \sqrt{(1+s)^2a^2 + (1+s)^2b^2} = (1+s)\sqrt{a^2 + b^2} = \sqrt{a^2 + b^2} + \sqrt{s^2a^2 + s^2b^2} = \mid z \mid + \mid w \mid$$

Now for the other direction. Let $z=a + bi$ and $w = c + di$. Then we have:

$$\mid z + w \mid = \mid a + bi + c + di \mid = \mid (a+c) + (b+d)i \mid = \sqrt{(a+c)^2 + (b+d)^2}$$

$$\mid z \mid + \mid w \mid = \mid a + bi \mid + \mid c + di \mid = \sqrt{a^2 + b^2} + \sqrt{c^2 + d^2}$$

Now since $\mid z + w \mid = \mid z \mid + \mid w \mid$ we have:

$$\sqrt{a^2 + c^2 + 2ac + b^2 + d^2 + 2bd} = \sqrt{a^2 + b^2} + \sqrt{c^2 + d^2}$$

Square both sides and we have:

$$a^2 + c^2 + 2ac + b^2 + d^2 + 2bd = a^2 + b^2 + c^2 + d^2 + 2\sqrt{(a^2 + b^2)(c^2 + d^2)}$$

$$ac + bd = \sqrt{(a^2 + b^2)(c^2 + d^2)}$$

Now square again and multiply out:

$$a^2c^2 + b^2d^2 + 2abcd = a^2c^2 + b^2c^2 + a^2d^2 + b^2d^2$$
$$2abcd = b^2c^2 + a^2d^2$$
$$b^2c^2 + a^2d^2 – 2abcd = 0$$
$$(cb – ad)^2 = 0 \implies cb = ad$$

So let $c = sa$, then we have:

$$scb = sad \implies sb = d$$

Hence $z = a + bi$ and $w = c + di = as + sbi$. Q.E.D.