The Excel IMSUB Function

Subtracting Complex Numbers

When subtracting complex numbers, the real and imaginary coefficients are subtracted separately.

I.e. the equation to subtract complex number c+di from complex number a+bi is:

(a+bi) - (c+di) = (a-c) + (b-d)i

Complex Numbers are explained in detail on the Wikipedia Complex Numbers Page.

Related Function:
IMSUM Function

Function Description

The Excel Imsub function calculates the difference between two complex numbers (i.e. subtracts one complex number from another).

The syntax of the function is:

IMSUB( inumber1, inumber2 )

where the inumber arguments are Complex Numbers, and you want to subtract inumber2 from inumber1.

Complex Numbers in Excel

Note that complex numbers are simply stored as text in Excel. When a text string in the format "a+bi" or "a+bj" is supplied to one of Excel's built-in complex number functions, this is interpreted as a complex number.

Also the complex number functions can accept a simple numeric value, as this is equivalent to a complex number whose imaginary coefficient is equal to 0.

Therefore, the inumber arguments can be supplied to the Excel Imsub function as either:

  • Simple numbers;
  • Complex numbers encased in quotation marks - e.g. "5+3i";
  • References to cells containing complex numbers or numeric values;
  • Values returned from other Excel functions or formulas.

Imsub Function Examples

In the spreadsheet below, the Excel Imsub function is used find the difference between three different pairs of complex numbers.

 Formulas:
  A B
1 5+i =IMSUB( A1, A2 )
2 1+4i =IMSUB( "9+2i", 6 )
3   =IMSUB( COMPLEX( 5, 2 ), COMPLEX( 0, 1 ) )
 Results:
  A B
1 5+i 4-3i
2 1+4i 3+2i
3   5+i

Note that, in the above example spreadsheet:


Further details of the Excel Imsub function are provided on the Microsoft Office website.


Imsub Function Errors

If you get an error from the Excel Imsub function, this is likely to be one of the following:

Common Errors
#NUM! - Occurs if one or both of the supplied inumber arguments are not recognised as complex numbers.
#VALUE! - Occurs if one or both of the supplied inumber arguments are logical values.