Definition:Modulus

Complex Number
Let $$z = a + \imath b$$ be a complex number.

Then the (complex) modulus of $$z$$ is written $$\left|{z}\right|$$ and is defined as:

$$\left|{z}\right| \ \stackrel {\mathbf {def}} {=\!=} \ \sqrt {a^2 + b^2}$$.

Note that when $$y = 0$$, i.e. when $$z$$ is wholly real, this becomes $$\left|{z}\right| = \sqrt{x^2} = \left|{x}\right|$$, which is consistent with the definition of the absolute value of $\left|{x}\right|$.

Complex-Valued Function
Let $$f: S \to \C$$ be a complex-valued function.

Then the (complex) modulus of $$f$$ is written $$\left|{f}\right|: S \to \R$$ and is the real-valued function defined as:

$$\forall z \in S: \left|{f}\right| \left({z}\right) = \left|{f \left({z}\right)}\right|$$.