I am looking for the arithmetic proof that:
$ |z| = \sqrt{(x^2 + y^2)} $ where $ z = x + i y $
Previously I assumed squaring a function then square rooting it would be analogous to the absolute value function (modulus) but it seems not to be the case in the complex domain. Consider the following simple counter example:
Let $ z = \cos(x) + i \times \sin (x) $
$|z| = |\cos(x) + i \times \sin(x)| = \sqrt{((\cos(x) + i \times \sin(x))^2} $
$ = \sqrt{2 \times i \times \cos(x) \times \sin(x) + \cos^2(x) +i^2 \times \sin^2(x) }$
$ = \sqrt{2i \times \cos(x)\sin(x) + \cos^2(x) - \sin^2(x) } \neq \cos^2(x) + \sin^2(x)$
Why is that?
If $|x|=\sqrt {x^2} $ for $x\in \mathbb R $ is not a definition but a result.
$\mathbb R\subset \mathbb C$ and $|x|$ is still defined to be $|x|=|x+0i|=\sqrt {x^2+0^2}=\sqrt{x^2} $.
The definition is $|z|=\sqrt {\text {Re} (z)^2+\text {Im}(z)^2} $ whether $z$ is purely real, complex, or purely imaginary.
In general $|z|\ne \sqrt{z^2} $ unless $\text {Im}(z)=0$ in which case $z=\text {Re}(z) $. So that holds if and only if $z$ is real.
=========
Note: $\sqrt {(a+bi)^2}=\sqrt {(a^2-b^2)+2abi} \ne \sqrt {a^2+b^2} $ UNLESS $2ab=0$ and $b^2=-b^2$. This happens if and only if $b=0$.
So $|z| = |a+bi|=\sqrt {a^2+b^2}=\sqrt {(a+bi)^2}=\sqrt {z^2} $ if and only if $b=0$ if and only if $z \in \mathbb R $.