# Complex parts

Symbol: Sign $\operatorname{sgn}(z)$ Sign function
Symbol: Abs $\left|z\right|$ Absolute value
Symbol: Arg $\arg(z)$ Complex argument
Symbol: Re $\operatorname{Re}(z)$ Real part
Symbol: Im $\operatorname{Im}(z)$ Imaginary part
Symbol: Conjugate $\overline{z}$ Complex conjugate
Symbol: Csgn $\operatorname{csgn}(z)$ Real-valued sign function for complex numbers

## Basic formulas

$\operatorname{sgn}(z) = \frac{z}{\left|z\right|}$
$\left|x + y i\right| = \sqrt{{x}^{2} + {y}^{2}}$
$\arg\!\left(x + y i\right) = \operatorname{atan2}\!\left(y, x\right)$
$\operatorname{Re}\!\left(x + y i\right) = x$
$\operatorname{Im}\!\left(x + y i\right) = y$
$\overline{x + y i} = x - y i$
$\operatorname{sgn}(x) = \begin{cases} 1, & x > 0\\-1, & x < 0\\0, & x = 0\\ \end{cases}$
$\operatorname{csgn}(z) = \begin{cases} \operatorname{sgn}\!\left(\operatorname{Im}(z)\right), & \operatorname{Re}(z) = 0\\\operatorname{sgn}\!\left(\operatorname{Re}(z)\right), & \text{otherwise}\\ \end{cases}$
$\operatorname{csgn}(z) = \frac{\sqrt{{z}^{2}}}{z}$

## Specific values

$\arg(1) = 0$
$\arg(i) = \frac{\pi}{2}$
$\arg\!\left(-i\right) = -\frac{\pi}{2}$
$\arg(-1) = \pi$

## Connection formulas

$\operatorname{Re}(z) = \frac{z + \overline{z}}{2}$
$\operatorname{Im}(z) = \frac{z - \overline{z}}{2 i}$
$\operatorname{sgn}(z) = \exp\!\left(i \arg(z)\right)$
$\arg(z) = -i \log\!\left(\operatorname{sgn}(z)\right)$

## Functional equations

$z \overline{z} = {\left|z\right|}^{2}$
$\arg\!\left(c z\right) = \arg(z)$

## Bounds and inequalities

$\left|a b\right| = \left|a\right| \left|b\right|$
$\left|a + b\right| \le \left|a\right| + \left|b\right|$
$\left|\left|a\right| - \left|b\right|\right| \le \left|a - b\right|$
$\left|\overline{z}\right| = \left|z\right|$
$\left|\operatorname{Re}(z)\right| \le \left|z\right|$
$\left|\operatorname{Im}(z)\right| \le \left|z\right|$
$\left|z\right| \le \left|\operatorname{Re}(z)\right| + \left|\operatorname{Im}(z)\right|$
$\left|\operatorname{sgn}(z)\right| \le 1$
$\left|\arg(z)\right| \le \pi$

Copyright (C) Fredrik Johansson and contributors. Fungrim is provided under the MIT license. The source code is on GitHub.

2020-04-08 16:14:44.404316 UTC