Complex Number Calculator
- 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 form 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
j e.g. in electronics), and is defined by:
i = √(-1).
The definition of a complex number
z is the combination of real
a and imaginary
b*i parts, so that:
z = a + bi.
b are classically understood real numbers. When
b = 0 the number is purely real, and if
a = 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
Im, so that
Re(z) = a, and
Im(z) = b. In fact, there are also numbers with more imaginary parts: the quaternions. Fortunately, we don't have to worry about them here.
The conjugate of a complex number is defined as:
z = a - bi.
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²,
tan(φ) = b / a,
|z| is the modulus/absolute value of the complex number,
φ is known as an argument or phase (sometimes we use notation
arg(z) = φ), and
tan is the tangent of the given argument. 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
φ is measured from the X-axis counterclockwise, and it can vary from
2π, or from
π (depending on convention since both are equivalent).
Knowing that, we can write any complex number using its polar coordinates on that plane:
a = |z| * cosφ,
b = |z| * sinφ.
Here sin and cos are basic trigonometric functions. These formulas are derived from the relations in the right triangle on the complex plane. In other words, the complex number can written as:
z = |z| * (cosφ + i*sinφ).
There is also another way to rewrite this number, using the Euler formula:
z = |z| * exp(i * φ),
exp() is an exponent function, the base of which is the number
e. Because of the periodicity property, we can see that:
exp(iφ) = exp(i(φ + 2kπ)),
k is any integer number.
The polar form of complex numbers is very useful in various calculations, including multiplication, division, or even some more sophisticated ones. The exponential form is especially handy 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 how to achieve both addition and subtraction of complex numbers.
Let's denote the first number as
F = a + bi, and the second one as
G = c + di. Then, the sum of two complex numbers is:
F + G = a + bi + c + di = (a + c) + (b + d)*i,
Re(F + G) = a + c is the real part of the sum, and
Im(F + G) = b + d is imaginary one.
Analogically, we can find the difference of these numbers:
F - G = a + bi - c + di = (a - c) + (b - d)*i,
Re(F - G) = a - c, and
Im(F - G) = b - d.
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 previous section we can write:
F * G = (a + bi) * (c + di) = a*c + a*d*i + b*c*i + b*d*i*i = (a*c - b*d) + (a*d + b*c)*i.
This time the real part can be written as
Re(F * G) = a*c - b*d, and imaginary part as
Im(F * G) = a*d + b*c. Note that there is a minus sign in the real part, since, at some point, we faced a multiplication of two imaginary numbers
i*i, which equals
-1 by definition.
Multiplying complex numbers doesn't look so scary, does it? So what about dividing complex numbers? Let's have a look at calculations with step by step hints:
F / G = (a + bi) / (c + di) =, extend both numerator and denominator by conjugate of a complex number of the latter.
= (a + bi) * (c - di) / ((c + di) * (c - di)) =, perform standard multiplications.
= (a*c - a*d*i + b*c*i - b*d*i*i) / (c² - (di)²) =, once again, use the fact that
i*i = -1.
= (a*c + b*d + (b*c - a*d)*i) / (c² + d²).
We obtain the following results:
Re(F / G) = (a*c + b*d) / (c² + d²),
Im(F * G) = (b*c - a*d) / (c² + d²). Of course, the division is possible only if
G ≠ 0.
We can also consider the operations above in the polar notation, say
F = |z₁|*exp(iφ₁),
G = |z₂|*exp(iφ₂). Then, multiplying complex numbers is given by:
F * G = |z₁|*exp(iφ₁) * |z₂|*exp(iφ₂) = |z₁*z₂| * exp(i(φ₁+φ₂)),
and we can see that:
|F * G| = |z₁*z₂|, and
arg(F * G) = φ₁+φ₂.
Dividing complex numbers is almost the same with that notation:
F / G = |z₁|*exp(iφ₁) / |z₂|*exp(iφ₂) = |z₁/z₂| * exp(i(φ₁-φ₂)),
rewriting the result as:
|F / G| = |z₁/z₂|, and
arg(F / G) = φ₁-φ₂. Using this form, it's clearly visible that the resulting module is just 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 make sure the outcome is correct.
Complex power and complex logarithm
We can make 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
FG = (a + bi)(c + di) =, since it isn't obvious how to extend that expression we can write
Fin the polar form of complex numbers.
= (|z₁|*exp(iφ₁))(c + di) =, now the product to any power of a sum is the product of each element to every component separately.
= |z₁|ᶜ * exp(iφ₁*c) * |z₁|ᵈⁱ * exp(-φ₁*d) =, we can use the known property of exponent that is:
xn = exp(n * ln(x)), where
lnis the natural logarithm.
= |z₁|ᶜ * exp(-φ₁*d) * exp(i(φ₁*c + d*ln|z₁|)).
Then, the absolute value is:
|FG| = |z₁|ᶜ * exp(-φ₁* d) , while the argument is:
arg(FG) = φ₁c + d*ln|z₁|. Although we are mixing two different notations, it's fine. We can also change them any way 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(|z₁|*exp(iφ₁)) = ln(|z₁|) + iφ₁.
One critical remark: since the phases
φ₁+2kπ are equivalent, the complex logarithm has an infinite number of solutions, and the general result is given as:
ln(|z₁|) + i(φ₁+2kπ).
How to use the complex number calculator
The tool is really simple to use. All you have to do is write both the real and imaginary part of two numbers. If a number is purely real or purely 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, 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.
Re(z) = Re(z),
Im(z) = -Im(z),
z * z = |z|²,
|z₁ + z₂| ≤ |z₁| + |z₂|,
|z₁ * z₂| = |z₁| * |z₂|,
|z₁ / z₂| = |z₁| / |z₂|,
z = 0, then both
a = 0, and
b = 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. Multiple problems from electronics can be significantly simplified with complex numbers. You can check how it is done in practice with the voltage divider calculator.