Complex Numbers

Let $a$ and $b$ be real numbers, the complex number is an expression in the form $a+b\mathbf{i}$ where $\mathbf{i}=\sqrt{-1}$. In the complex plane or Cartesian coordinate system, the complex number $a+b\mathbf{i}$ can represent the point with coordinate $(a,b)$.

This complex number calculator supports four binary operations: addition, substraction, multiplication, division, and the following 19 functions.

function description/example
$\mathrm{arg}(x)$ This function returns the phase angle (in radians) of complex number $x$
$\mathrm{abs}(x)$ If $x=a+b\mathbf{i}$, this function returns $\sqrt{a^2+b^2}$
$\mathrm{conj}(x)$ If $x=a+b\mathbf{i}$, this function returns $a-b\mathbf{i}$
$\mathrm{sqrt}(x)$ the square root of complex number $x$
$\mathrm{pow}(x,y)$ or $x\hat{\;} y$ Calculate $x^y$, where $x$ and $y$ are complex numbers.
$\exp(x)$ The base-e exponential function of complex number $x$
$\log(x)$ The natural logarithm function of complex number $x$
$\sin(x)$ The sine function of complex number $x$
$\cos(x)$ The cosine function of complex number $x$
$\tan(x)$ The tangent function of complex number $x$
$\mathrm{asin}(x)$ The inverse sine function of complex number $x$
$\mathrm{acos}(x)$ The inverse cosine function of complex number $x$
$\mathrm{atan}(x)$ The inverse tangent function of complex number $x$
$\sinh(x)$ The hyperbolic sine function of complex number $x$
$\cosh(x)$ The hyperbolic cosine function of complex number $x$
$\tanh(x)$ The hyperbolic tangent function of complex number $x$
$\mathrm{asinh}(x)$ The inverse hyperbolic sine function of complex number $x$
$\mathrm{acosh}(x)$ The inverse hyperbolic cosine function of complex number $x$
$\mathrm{atanh}(x)$ The inverse hyperbolic tangent function of complex number $x$

Input Data

This calculator requires two input data. The first are the data of complex numbers that will be used in the evaluation. They are entered as $n\times 2$ real matrix, where $n$ is the number of complex numbers we want to use, the first column of the matrix are the real parts and the second column the imaginary parts. The second input is a math expression of the complex numbers, where $x_i$ in the expression is the complex number in the $i^\mathrm{th}$ row of the matrix.

As an example, we want to evaluate $\exp(1+2\mathbf{i})/(3+4\mathbf{i})$. We can denote $x_1=1+2\mathbf{i}$ and $x_2=3+4\mathbf{i}$ so the math expression we want to evaluate is $\exp(x_1)/x_2$. Here is the input matrix

        1  2
        3  4
    
and the math expression
        exp(x1)/x2
    
getting the result
    0.2597     0.4776  
    
which are the real part and imaginary part of the evaluation.

Another example, let's approximate the derivative of a function using Complex Step Differentiation. Let $F(x)=\displaystyle\frac{\mathrm{e}^x}{(\cos x)^3+(\sin x)^3}$, we want to find $F'(\pi/4)$ with complex step $h=10^{-16}$. Here is the input matrix

        pi/4  1.0e-16
and the math expression
exp(x1)/( cos(x1)^3 + sin(x1)^3 )
We get the output $3.101766393836052+ 3.101766393836053\times 10^{-16}\mathbf{i}$. Dividing the imaginary part with $h$ gives $3.101766393836053$, an approximated value of $F'(\pi/4)$.

Complex Number Calculator