• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
July 27, 2022 |4.2K Views

C Program to Add & Subtract Two Complex Numbers

  Share   Like
Description
Discussion

In this video, we will see a C program to Add & Subtract a Complex Number. 

Method to add the complex numbers:

1. The addition of two complex numbers is done by adding the real part of the first complex number with the real part of the second complex number, and adding imaginary part of the first complex number with the second which results into the third complex number.

Points to remember while subtracting 2 complex numbers:

1. Subtracting complex numbers is simply combining the real and imaginary parts of the complex numbers and applying the subtraction operation separately on each of the combinations.
2. All real numbers are complex numbers with imaginary parts equal to zero, but all complex numbers are not real numbers.
3. If the complex numbers are in polar form, we first convert them into Cartesian form and apply the operations. So, two complex numbers z1 = a + ib and z2 = c + id can be add/subtracted by combining the real and imaginary parts of both the complex numbers and applying the subtraction operation separately to each of them.