Complex Number Calculator (2024)

Created by Wojciech Sas, PhD

Reviewed by

Bogna Szyk and Jack Bowater

Last updated:

Jan 20, 2024

Table of contents:
  • What is a complex number? - Complex number definition
  • Polar form of complex numbers
  • Basic operations with complex numbers - sum and difference
  • Multiplying and dividing complex numbers
  • Complex power and complex logarithm
  • How to use the complex number calculator
  • Properties of complex numbers
  • Complex numbers in real life

Our complex number calculator (also known as an imaginary number calculator) is an excellent tool for solving basic operations with complex numbers. Read on to find the answer to the question: "what is a complex number" learn about the algebraic and polar forms of complex numbers, and master the skills of multiplying and dividing complex numbers.

At the end of this text, you can also find information about the properties of complex numbers (most of which are based on the conjugate or the absolute value of complex numbers) and even some practical applications of them.

What is a complex number? - Complex number definition

To answer the question of what is a complex number, we have first to ask: "What is an imaginary number?". An imaginary number is the square root of a negative number. The basic imaginary number is denoted with the letter iii (sometimes jjj e.g. in electronics), and is defined by:


The definition of a complex number zzz is the combination of real aaa and imaginary b ⁣ ⁣ib\!\cdot\!ibi parts, so that:

z=a+bi.z = a + bi.z=a+bi.

Here, both aaa and bbb are classically understood as real numbers. When b=0b = 0b=0, the number is purely real, and if a=0a = 0a=0, we have a purely imaginary number. You can use this complex number calculator as an imaginary number calculator - just input the real component equal to 0.

Another way to write two parts of a complex number is Re\mathrm{Re}Re and Im\mathrm{Im}Im so that Re(z)=a\mathrm{Re}(z)=aRe(z)=a, and Im(z)=b\mathrm{Im}(z)=bIm(z)=b. In fact, there are also numbers with more imaginary parts: check our quaternion calculator. Fortunately, we don't have to worry about them here.

The conjugate of a complex number is defined as:

zˉ=abi.\bar{z} = a - bi.zˉ=abi.

As we can see, the conjugate of a complex number doesn't affect the real part, while the imaginary part has the opposite sign as the original.

Polar form of complex numbers

Complex numbers have a lot in common with the Cartesian coordinate system because they are pairs of numbers on a Cartesian complex plane. It's helpful to imagine complex numbers as vectors on that complex plane. The formulas which transform complex numbers from Cartesian form to polar form are exactly the same as classical coordinate transformations:

  • z=a²+b²|z| = a² + b²z=a²+b²,
  • tan(φ)=ba\tan(\varphi) = \frac{b}{a}tan(φ)=ab,

where z|z|z is the modulus/absolute value of the complex number, φ\varphiφ is known as an argument or phase (sometimes we use notation arg(z)=φ\mathrm{arg}(z) = \varphiarg(z)=φ), and tan\tantan is the tangent of the given argument.

🙋 Feel free to check Omni's trigonometric functions calculator if you need to quickly revise trigonometric functions.

Similarly, the length of a vector in the two-dimensional Euclidean plane is the distance between its end and the origin of the coordinate system. The angle φ\varphiφ is measured from the X-axis counterclockwise, and it can vary from 000 to 2π2\pi2π or from π-\piπ to π\piπ (depending on convention since both are equivalent).

Complex Number Calculator (1)

Knowing that we can write any complex number using its polar coordinates on that plane:

  • a=zcosφa = |z| \cdot \cos\varphia=zcosφ,
  • b=zsinφb = |z| \cdot \sin\varphib=zsinφ.

Here sin and cos are basic trigonometric functions. We derive these formulas from the relations in the right triangle on the complex plane. In other words, we can write the complex number as: z=z(cosφ+isinφ)z = |z| (\cos\varphi + i\cdot\sin\varphi)z=z(cosφ+isinφ).

There is also another way to rewrite this number, using the Euler formula:

z=zexp(iφ)z = |z| \cdot \exp(iφ)z=zexp(iφ),

where exp()\exp()exp() is an exponent function, the base of which is the number e\mathrm{e}e. Because of the periodicity property, we can see that:

exp(iφ)=exp[i(φ+2kπ)]\exp(i\varphi) = \exp[i(\varphi + 2k\pi)]exp(iφ)=exp[i(φ+2)],

where kkk is any integer number.

🙋 Head to our polar coordinates calculator if you want to learn more about this coordination system.

The polar form of complex numbers is handy in various calculations, including multiplication, division, and even some more sophisticated ones. The exponential form is convenient if you are not proficient enough in trigonometric laws or you just prefer to work with powers.

Basic operations with complex numbers - sum and difference

When performing simple operations with complex numbers, it's helpful to think about them as vectors. Then, it's pretty straightforward to achieve both addition and subtraction of complex numbers.

Let's denote the first number as F=a+biF = a + biF=a+bi and the second one as G=c+diG = c + diG=c+di. Then, the sum of two complex numbers is:

F+G=a+bi+c+di=(a+c)+(b+d) ⁣ ⁣i,\begin{split} F + G &= a + bi + c + di \\ &= (a + c) + (b + d)\!\cdot\!i,\end{split}F+G=a+bi+c+di=(a+c)+(b+d)i,

where Re(F+G)=a+c\mathrm{Re}(F + G) = a + cRe(F+G)=a+c is the real part of the sum, and Im(F+G)=b+d\mathrm{Im}(F + G) = b + dIm(F+G)=b+d is imaginary one.

Analogically, we can find the difference between these numbers:

FG=a+bic+di=(ac)+(bd) ⁣ ⁣i\begin{split} F - G &= a + bi - c + di \\ &= (a - c) + (b - d)\!\cdot\!i\end{split}FG=a+bic+di=(ac)+(bd)i

and now Re(FG)=ac\mathrm{Re}(F - G) = a - cRe(FG)=ac, and Im(FG)=bd\mathrm{Im}(F - G) = b - dIm(FG)=bd.

Do you remember how to add or subtract two 2D vectors? It's precisely the same as we do it in this complex number calculator - you just need to add (or subtract) each pair of components separately, and that's it!

Multiplying and dividing complex numbers

Now, let's move to something more challenging - we want to find how multiplying complex numbers work. Following with notation from the previous section, we can write:

F ⁣ ⁣G=(a+bi)(c+di)=a ⁣ ⁣c+a ⁣ ⁣d ⁣ ⁣i+b ⁣ ⁣c ⁣ ⁣i+b ⁣ ⁣d ⁣ ⁣i ⁣ ⁣i=(a ⁣ ⁣cb ⁣ ⁣d)+(a ⁣ ⁣d+b ⁣ ⁣c) ⁣ ⁣i\begin{split} F\!\cdot\!G &= (a + bi) \cdot (c + di) \\ &= a\!\cdot\!c + a\!\cdot\!d\!\cdot\!i + b\!\cdot\!c\!\cdot\!i + b\!\cdot\! d\!\cdot\!i\!\cdot\!i \\ &= (a\!\cdot\!c - b\!\cdot\!d) + (a\!\cdot\!d + b\!\cdot\!c)\!\cdot\!i\end{split}FG=(a+bi)(c+di)=ac+adi+bci+bdii=(acbd)+(ad+bc)i

This time the real part can be written as Re(F ⁣ ⁣G)=a ⁣ ⁣cb ⁣ ⁣d\mathrm{Re}(F\!\cdot\!G) = a\!\cdot\!c - b\!\cdot\!dRe(FG)=acbd, and imaginary part as Im(F ⁣ ⁣G)=a ⁣ ⁣d+b ⁣ ⁣c\mathrm{Im}(F\!\cdot\!G) = a\!\cdot\!d + b\!\cdot\!cIm(FG)=ad+bc. Note that there is a minus sign in the real part since, at some point, we faced a multiplication of two imaginary numbers i ⁣ ⁣ii\!\cdot\!iii, which equals 1-11 by definition.

Multiplying complex numbers isn't that scary. Is it? So what about dividing complex numbers? Let's have a look at calculations with step-by-step hints:

  • F/G=a+bic+diF / G = \frac{a + bi}{c + di}F/G=c+dia+bi, extend both numerator and denominator by the conjugate of a complex number of the latter.
  • =(a+bi)(cdi)(c+di)(cdi)= \frac{(a + bi) \cdot (c - di)}{(c + di) \cdot (c - di)}=(c+di)(cdi)(a+bi)(cdi), perform standard multiplications.
  • =acadi+bcibdiic²(di)²= \frac{a \cdot c - a \cdot d \cdot i + b \cdot c \cdot i - b \cdot d \cdot i \cdot i}{c² - (di)²}=c²(di)²acadi+bcibdii, once again, use the fact that i ⁣ ⁣i=1i\!\cdot\!i = -1ii=1.
  • =ac+bd+(bcad)ic²+d²= \frac{a \cdot c + b \cdot d + (b \cdot c - a \cdot d) \cdot i} {c² + d²}=c²+d²ac+bd+(bcad)i.

We obtain the following results: Re(F/G)=ac+bdc²+d²\mathrm{Re}(F / G) = \frac{a \cdot c + b \cdot d}{c² + d²}Re(F/G)=c²+d²ac+bd, Im(F ⁣ ⁣G)=bcadc²+d²\mathrm{Im}(F\!\cdot\!G) = \frac{b \cdot c - a \cdot d}{c² + d²}Im(FG)=c²+d²bcad. Of course, the division is possible only if G0G \neq 0G=0.

We can also consider the operations above in the polar notation, say F=z1exp(iφ1)F = |z_1|\exp(i\varphi_1)F=z1exp(iφ1), G=z2exp(iφ2)G = |z_2|\exp(i\varphi_2)G=z2exp(iφ2). Then, multiplying complex numbers is given by:

F ⁣ ⁣G=z1exp(iφ1)z2exp(iφ2)=z1z2exp[i(φ1 ⁣+ ⁣φ2)]\begin{split} F\!\cdot\!G &= |z_1|\exp(i\varphi_1) \cdot |z_2|\exp(i\varphi_2) \\ &= |z_1z_2| \cdot \exp[i(\varphi_1\!+\!\varphi_2)]\end{split}FG=z1exp(iφ1)z2exp(iφ2)=z1z2exp[i(φ1+φ2)]

and we can see that: F ⁣ ⁣G=z1 ⁣ ⁣z2|F\!\cdot\!G| = |z_1\!\cdot\!z_2|FG=z1z2, and arg(F ⁣ ⁣G)=φ1 ⁣+ ⁣φ2\arg(F\!\cdot\!G) = \varphi_1\!+\!\varphi_2arg(FG)=φ1+φ2.

Dividing complex numbers is almost the same with this notation:

F/G=z1exp(iφ1)z2exp(iφ2)=z1z2exp[i(φ1 ⁣ ⁣φ2))]\begin{split} F / G &= \frac{|z_1|\exp(i\varphi_1)} {|z_2|\exp(i\varphi_2)} \\ &= \left|\frac{z_1}{z_2}\right| \exp[i(\varphi_1\!-\!\varphi_2))]\end{split}F/G=z2exp(iφ2)z1exp(iφ1)=z2z1exp[i(φ1φ2))]

rewriting the result as: F/G=z1/z2|F / G| = |z_1/z_2|F/G=z1/z2, and arg(F/G)=φ1 ⁣ ⁣φ2\arg(F / G) = \varphi_1\!-\!\varphi_2arg(F/G)=φ1φ2. Using this form, it's clearly visible that the resulting module is the ratio of both numbers' absolute values.

It looks like the second attempt is much simpler; thus sometimes it's worth considering changing the form of our expressions before starting a calculation. We can always come back from polar to algebraic notation. If you don't feel comfortable with it, just use our complex number calculator to ensure the outcome is correct.

Complex power and complex logarithm

We can give a brief overview of how to calculate some more complicated operations with complex numbers. Firstly, let's find the general formula for the complex power of two numbers, given as FGF^GFG.

  • FG=(a+bi)(c+di)F^G = (a + bi)^{(c + di)}FG=(a+bi)(c+di) since it isn't obvious how to extend that expression, we can write F in the polar form of complex numbers.
  • =(z1exp(iφ1))(c+di)= (|z_1|\exp(i\varphi_1))^{(c + di)}=(z1exp(iφ1))(c+di), now the product to any power of a sum is the product of each element to every component separately.
  • =z1cexp(iφ1 ⁣ ⁣c)z1diexp(φ1 ⁣ ⁣d)= |z_1|^c \cdot \exp(i\varphi_1\!\cdot\!c) \cdot |z_1|^{di} \cdot \exp(-\varphi_1\!\cdot\!d)=z1cexp(iφ1c)z1diexp(φ1d), we can use the known property of exponent that is: xn=exp(n ⁣ ⁣ln(x))x^n = \exp(n\!\cdot\!\ln(x))xn=exp(nln(x)), where ln\lnln is the natural logarithm.
  • =z1cexp(φ1 ⁣ ⁣d)exp[i(φ1 ⁣ ⁣c+d ⁣ ⁣lnz1)]= |z_1|^c \cdot \exp(-\varphi_1\!\cdot\!d) \cdot \exp[i(\varphi_1\!\cdot\!c + d\!\cdot\!\ln|z_1|)]=z1cexp(φ1d)exp[i(φ1c+dlnz1)].

Then, the absolute value is: FG=z1cexp(φ1 ⁣ ⁣d)|F^G| = |z_1|^c \cdot \exp(-\varphi_1\!\cdot\!d)FG=z1cexp(φ1d), while the argument is: arg(FG)=φ1c+dlnz1\arg(F^G) = \varphi_1c + d\ln|z_1|arg(FG)=φ1c+dlnz1. Although we are mixing two different notations, it's fine. We can also change them anyway you like - that's all your choice.

The logarithm of a complex numbers (also known as the complex logarithm) can be worked out the following way:

ln(F)=ln(z1 ⁣ ⁣exp(iφ1))=ln(z1)+iφ1\begin{split} \ln(F) &= \ln(|z_1|\!\cdot\!\exp(i\varphi_1)) \\ &= \ln(|z_1|) + i\varphi_1\end{split}ln(F)=ln(z1exp(iφ1))=ln(z1)+iφ1

One critical remark: since the phases φ1\varphi_1φ1 and φ1+2kπ\varphi_1+2k\piφ1+2 are equivalent, the complex logarithm has an infinite number of solutions, and we can write the general result as: ln(z1)+i(φ1+2kπ)\ln(|z_1|) + i(\varphi_1+2k\pi)ln(z1)+i(φ1+2).

How to use the complex number calculator

The tool is straightforward to use. All you have to do is write both the real and imaginary parts of two numbers. If a number is purely real or imaginary, set the other component equal to 0. And that's it.

As a result, you will obtain the polar form of complex numbers, the sum, the difference, the product, and the quotient, as well as the first number to the power of the second one and the logarithm of the first number.

Properties of complex numbers

There are several properties of complex numbers, including conjugate or the absolute value of complex numbers, which can be handy while calculating some exercises.

  1. Re(z)=Re(zˉ)\mathrm{Re}(z) = \mathrm{Re}(\bar{z})Re(z)=Re(zˉ);
  2. Im(z)=Im(zˉ)\mathrm{Im}(z) = -\mathrm{Im}(\bar{z})Im(z)=Im(zˉ);
  3. zzˉ=z2z \cdot \bar{z} = |z|^2zzˉ=z2;
  4. z1+z2z1+z2|z_1 + z_2| \le |z_1| + |z_2|z1+z2z1+z2;
  5. z1z2=z1z2|z_1 \cdot z_2| = |z_1| \cdot |z_2|z1z2=z1z2;
  6. z1z2=z1z2|\frac{z_1}{z_2}| = \frac{|z_1|}{|z_2|}z2z1=z2z1; and
  7. If z=0z = 0z=0, then both a=0a = 0a=0 and b=0b = 0b=0.

Complex numbers in real life

Complex numbers are sometimes really helpful with algebraic expressions, especially if they are related to trigonometric functions.

Many physics problems benefit from the power of complex numbers. One of the main fields of complex number usage is the world of wave functions and harmonic motion. Also, we can significantly simplify multiple issues from electronics with complex numbers. You can check how we can do it in practice with the voltage divider calculator.

Wojciech Sas, PhD

Related calculators
  • Interval Notation Calculator
  • Least Common Denominator Calculator
  • Null Space Calculator
  • Trig Identities Calculator
  • Partial Fraction Decomposition Calculator
  • Unit Rate Calculator
  • Exponential Function Calculator
Complex Number Calculator (2024)


Top Articles
Latest Posts
Article information

Author: Clemencia Bogisich Ret

Last Updated:

Views: 6073

Rating: 5 / 5 (80 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Clemencia Bogisich Ret

Birthday: 2001-07-17

Address: Suite 794 53887 Geri Spring, West Cristentown, KY 54855

Phone: +5934435460663

Job: Central Hospitality Director

Hobby: Yoga, Electronics, Rafting, Lockpicking, Inline skating, Puzzles, scrapbook

Introduction: My name is Clemencia Bogisich Ret, I am a super, outstanding, graceful, friendly, vast, comfortable, agreeable person who loves writing and wants to share my knowledge and understanding with you.