Basic Mathematical Operations on Complex Numbers in Excel

Basic Mathematical Operations on Complex Numbers in

A complex number is a number that may be represented in the form a + bi, where a and b are real numbers and i is a symbol known as the imaginary unit. All polynomial equations, including those with no real-number solutions, may be solved using complex numbers.

Also read: How to Calculate Compound Interest in Excel?

Mathematical Operations on Complex Numbers

In this article, we will learn how to perform basic mathematical operations on complex numbers in Excel.

Complex number representation

Excel provides for an inbuilt function COMPLEX which transforms real and imaginary coefficients into a complex number of the form x + yi or x + yj.

Syntax: COMPLEX(real_num, i_num, [suffix]),

where real_num is the real coefficient, i_num is the imaginary coefficient and suffix represents the imaginary component of the complex number which can either be “i” or “j” in lower case only.

If omitted, the suffix is taken to be “i”. Follow these steps to represent a complex number with 3 and 4 as the real and imaginary coefficients:

  • Select the cell where you want to display the complex number.
  • Type =COMPLEX(3,4) and press the Enter key.
Basic Mathematical Operations on Complex Numbers in Excel

Note: The COMPLEX function returns the #VALUE! error value if real_num or i_num is non-numeric.

Real part of the complex number

For a given complex number, one may be required to extract its real part. The IMREAL function in Excel extracts and returns the real coefficient of a complex number.

Syntax: IMREAL(number),

where is the complex number or the cell reference to the cell containing the complex number for which you want the real coefficient.

  • Select the cell where you want to display the real part of a complex number.
  • Type =IMREAL(, select the cell containing the complex number and finish the formula with ).
Basic Mathematical Operations on Complex Numbers in Excel
  • Press the Enter key to display the result.
Basic Mathematical Operations on Complex Numbers in Excel

Imaginary part of the complex number

For a given complex number, one may be required to extract its imaginary part. The IMAGINARY function in Excel extracts and returns the imaginary coefficient of a complex number.

Syntax: IMAGINARY(number),

where is the complex number or the cell reference to the cell containing the complex number for which you want the imaginary coefficient.

  • Select the cell where you want to display the imaginary part of a complex number.
  • Type =IMAGINARY(, select the cell containing the complex number and finish the formula with ).
imaginary formula
  • Press the Enter key to display the result.
Basic Mathematical Operations on Complex Numbers in Excel

Add two complex numbers

Adding two complex numbers is the same as adding two whole numbers, just add the corresponding real and imaginary parts. The IMSUM function returns the sum of two complex numbers.

Syntax: IMSUM(inumber1, inumber2),

where inumber1 is the first complex number and inumber2 is the second complex number. Follow these steps to add two complex numbers:

  • Select the cell where you want to display the sum.
  • Type =IMSUM(A2,B2), where cell A2 contains the first complex number and cell B2 contains the second complex number.
imsum formula
  • Press the Enter key to display the result.
imsum result

Subtract two complex numbers

Subtracting two complex numbers is the same as subtracting two whole numbers, simply subtract the corresponding real and imaginary parts. The IMSUB function returns the difference between two complex numbers.

Syntax: IMSUB(inumber1, inumber2),

where inumber1 is the first complex number and inumber2 is the second complex number. Follow these steps to subtract two complex numbers:

  • Select the cell where you want to display the difference.
  • Type =IMSUM(A2,B2), where cell A2 contains the first complex number and cell B2 contains the second complex number.
imsub formula
  • Press the Enter key to display the result.
imsub result

Multiply two complex numbers

To multiply two complex numbers, Excel provides an inbuilt function IMPRODUCT.

Syntax: IMPRODUCT(inumber1, [inumber2]),

where inumber1 is the first complex number and inumber2 is the second complex number. Follow these steps to multiply two complex numbers:

  • Select the cell where you want to display the product.
  • Type =IMPRODUCT(A2,B2), where cell A2 contains the first complex number and cell B2 contains the second complex number.
improduct formula
  • Press the enter key to display the result.
improduct result

Division of complex numbers

The IMDIV function returns the quotient of two complex numbers.

Syntax: IMDIV(inumber1, inumber2),

where inumber1 is the first complex number and inumber2 is the second complex number. Follow the steps for the division of two complex numbers:

  • Select the cell where you want to display the quotient.
  • Type =IMDIV(A2,B2), where cell A2 contains the first complex number and cell B2 contains the second complex number.
imdiv formula
  • Press the Enter key to display the result.
imdiv result

Note:

  • Suffixes must match in all functions that accept two or more complex numbers.
  • Mismatch of suffixes results in the #VALUE! error value.

Conclusion

In this tutorial, we learned how to perform basic mathematical operations such as addition, subtraction, multiplication, and division on complex numbers in Excel.

References