Arithmetic proof of absolute value function of complex numbers 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?
 A: First,
the absolute value 
of a complex number 
is a real number.
The standard definition is
$|z|^2
=z\, \bar{z}
$.
From this,
if $z = x+iy$,
$|z|^2
=z\, \bar{z}
=(x+iy)(x-iy)
=x^2+y^2
$.
A: 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 $.
A: 
I guess my question should be rephrased to: why is $|z|$ defined to be $\sqrt{(\operatorname{Re} z)^2+(\operatorname{Im} z)^2}$ for complex numbers while $|x|=\sqrt{x^2}$ for real numbers

In some contexts, the definition of the absolute value of a complex number is taken to be the square root of its absolute square $|z| = \sqrt{z\,\bar z}$ where $\bar z$ is the complex conjugate.


*

*If $z=a + b\,i$ with $a,b \in \mathbb{R}$ then $\bar z = a - b\,i$ so $|z|=\sqrt{(a+b\,i)(a-b\,i))} = \sqrt{a^2+b^2}$.

*If $z \in \mathbb{R}$ then $z = \bar z$ so the definition reduces to the one used with real numbers $x = \sqrt{x^2}$.
The reason why defining the absolute value in terms of conjugates makes math sense is that the same definition applies in contexts more general than just complex numbers. For example, that's the same definition used for quaternions, and in general for elements of composition algebras.
A: Assume in what follows that we understand the basics of the real number line, but have no exposure to Euclidean plane geometry.

We understand the real numbers, and know that the absolute value of a real number represents the distance of the number from $0$. Moreover, in the geometry of the real line it makes perfect sense to define the distance between two points $a$ and $b$ as $|b - a|$.
We discover, via algebraic means, the complex numbers. On some graph paper we plot the numbers $1$, $i$, $-1$, and $-i$, and it is automatic that these points 'should be' at a distance of $1$ from $0$. Next, notice that these four numbers form a group under multiplication. Also observe that $-i$ is the multiplicative inverse of $i$. 
Naturally, we now want to compute the square root of $i$:
$(x + iy)^2 = i \text{ iff } x^2 - y^2 + 2xy\,i = i \text{ iff } x = \pm \frac{\sqrt 2}{2}$
So, $(\frac{\sqrt 2}{2} + \frac{\sqrt 2}{2} i)^2 = i$.
Plotting the coordinate point in the first quadrant is encouraging. If you take a ruler with the tick mark for 1 matching up with coordinate $(1,0)$, it also matches right up to the plot of $(\frac{\sqrt 2}{2} , \frac{\sqrt 2}{2} )$, when physically checking the distance of a point from the $(0,0)$ coordinate (representing the complex number $0$) with a graph paper conforming ruler.
... study ... tinker ... study ...
with still no definition of the absolute value of a complex number, it 'must be' true that $|x + i y| = |x - iy|$ (plot some complex numbers on graph paper).
... study ... tinker ... study ...

The conjugate $\bar z$ of a complex number $z = x + iy$ is defined by
$\tag 1 \bar z = x - iy$
Proposition 1: The conjugate of a product is the product of the conjugates.
Proposition 2: For $z = x + iy$,  $\;z \bar z = x^2 + y^2$.
Theorem 3: The set of all complex numbers $z$ satisfying $z\bar z = 1$ forms a group $S_1$ under complex multiplication. Moreover, if $z \in S_1$, $z^{-1} = \bar z$. Finally, 
$\tag 2 z = x + iy \in S_1 \text{ if and only if } x^2 + y^2 = 1$
Proof: Just fill in the algebraic details.
The eight complex numbers,
$\{1,\;(\frac{\sqrt 2}{2}+\frac{\sqrt 2}{2}i),\; i,\;(-\frac{\sqrt 2}{2}+\frac{\sqrt 2}{2}i),\;  -1,\;(-\frac{\sqrt 2}{2}-\frac{\sqrt 2}{2}i),\; -i,\;(\frac{\sqrt 2}{2}-\frac{\sqrt 2}{2}i)\}$.
form a subgroup of $S_1$ and each 'should have' an absolute value of $1$.
We have a computer literate friend provide us with a computer plot for the equation $x^2 + y^2 =1$, and it sure looks like what we want!
So what happens if we insist that the absolute value for all numbers in $S_1$ must be $1$? Well, plotting some points you can easily see that you can 'scale' complex numbers by multiplying them with a positive real number.
Theorem 4: If $z = x + iy$ is any nonzero complex number, there exist a unique pair of numbers, $\hat z \in S_1$ and real number $\lambda \gt 0$ such that
$\tag 3 z = \lambda \hat z$
Proof: Simple algebra shows that the unique solution is given by
$\quad \lambda = \sqrt{x^2 + y^2}$
$\quad \hat z = \frac{z}{\lambda}$
By '1-dim line' scaling geometry, you can now define the absolute value of any complex number $z = x + iy$ with $|z| = \sqrt{x^2 + y^2}$. As mathematicians it is always fun to cover-up the tracks of our work and show some elegance:
Definition: The modulus (or absolute value) of any complex number $z$ is defined by taking the square root of the product of $z$ with its conjugate $\bar z$, so
$\tag 4 {|z|}^2 = z \bar z$

This geometric coordinate system will not disappoint us - it delivers all the properties of shapes known to the ancients who studied plane geometry. Interestingly, we don't even have to prove the Pythagorean Theorem.
