In mathematics, a complex number is an expression of the form a + bi,
where a and b are real numbers, and i represents the imaginary number defined as i2 = -1.
(In other words, i is the square root of -1.)
The real number a is called the real part of the complex number, and the real number b is the imaginary part.
For example, 3 + 2i is a complex number, with real part 3 and imaginary part 2.
Complex numbers are often used in applied mathematics, control theory, signal analysis, fluid dynamics and other fields.
|
| Operator |
Description |
Example |
|---|---|---|
| Plus, addition | (2+6i) + (4+3i) Ans = 6 + 9i |
|
| Minus, subtraction | (2+6i) - (4+3i) Ans = -2 + 3i |
|
| Multiplication | (2+6i) * (4+3i) Ans = -10 + 30i |
|
| Division | (-10+30i) / (4+3i) Ans = 2 + 6i |
|
| Power | i^2 Ans = -1 |
A complex number can be viewed as a point or a position vector on a two-dimensional coordinate system called the complex plane.
If you project the complex number z = a+bi as a vector in the complex plane, the angle of this vector is given by it's argument and the length is given by it's modulus (the absolute value). By mirroring z in the real axis you will get the complex conjugate of z. You can read more about the functions for complex values on the page Complex Functions. |
| Operation | Calculation |
|---|---|
| Addition | |
| Subtraction | |
| Multiplication | |
| Division |
'Examples of using complex numbers
'Definition of the complex number i
i^2
Ans = -1
Sqrt(-1)
Ans = i
'Sqrt(-4) = Sqrt(4)*Sqrt(-1) = Sqrt(4)*i = 2i
Sqrt(-4)
Ans = 2i
Sqrt(-25) + 3.5
Ans = 3.5 + 5i
'Define a few variables with complex values and use them
z1 = 2+6i
z1 = 2 + 6i
z2 = 4+3i
z2 = 4 + 3i
z1+z2
Ans = 6 + 9i
z1 / (z2-3)
Ans = 2
3 * z1
Ans = 6 + 18i