Complex Numbers
Nerd Cafe | نرد کافه
1. What Is a Complex Number?
Definition (Mathematics)
A complex number is a number of the form:
Where:
a is the real part,
b is the imaginary part,
i is the imaginary unit where:
Example:
Real part:
3Imaginary part:
4
Python Representation
Output:
2. Basic Operations
Addition
Subtraction
Multiplication
Division
Python Operations
Output:
3. Modulus of a Complex Number
Formula:
Example:
Python:
Output:
4. Complex Conjugate
Definition:
The conjugate of
is
Python:
Output:
5. Polar Form of a Complex Number
Formula:
Convert
into:
Where:
Python:
Output:
6. Euler's Formula
So:
7. Convert Between Cartesian and Polar Forms
Python:
Convert to Polar:
Output:
Convert to Rectangular:
Output:
8. Powers and Roots
Power:
n-th Roots:
Python (Using cmath):
cmath):Output:
9. Plotting Complex Numbers (Optional Visualization)
Output:

Summary Cheat Sheet
Complex number
complex(a, b)
Real part
z.real
Imaginary part
z.imag
Conjugate
z.conjugate()
Modulus
abs(z)
Phase/angle
cmath.phase(z)
Polar form
cmath.polar(z)
Rectangular form
cmath.rect(r, θ)
Square root
cmath.sqrt(z)
Plotting
matplotlib
Video Tutorial
Support Our Work
If you find this post helpful and would like to support my work, you can send a donation via TRC-20 (USDT). Your contributions help us keep creating and sharing more valuable content.
TRC-20 Address: TAAVVf9ZxUpbyvTa6Gd5SGPmctBdy4PQwf
Thank you for your generosity! 🙏
Keywords
complex numbers, imaginary numbers, real part, imaginary part, complex arithmetic, addition, subtraction, multiplication, division, modulus, complex conjugate, polar form, rectangular form, Euler’s formula, Python complex type, cmath module, plotting complex numbers, argument of complex number, powers of complex numbers, roots of complex numbers, nerd cafe , نرد کافه
Channel Overview
🌐 Website: www.nerd-cafe.ir
📺 YouTube: @nerd-cafe
🎥 Aparat: nerd_cafe
📌 Pinterest: nerd_cafe
📱 Telegram: @nerd_cafe
📝 Blog: Nerd Café on Virgool
💻 GitHub: nerd-cafe
Last updated