The IMSUB function is used return the difference between two complex numbers.
Contents:
Syntax
= IMSUB(inumber1, inumber2)
inumber1 - The first complex number, from which the second complex number will be subtracted.
The complex numbers can be supplied as a string (like "3+4i") or as a reference to a cell containing the complex number, but each number must have a real and imaginary part.
inumber2 - The second complex number that will be subtracted from the first
Note: i or j can be used, but the letter must remain consistent throughout each complex number or a #VALUE! error will be returned
Explanation
The IMSUB function is part of the "Engineering" group of functions within Excel.
This function works by taking two complex numbers as an input, breaking them down into their real and imaginary components, and taking the difference between both components.
Then, it combines these subtracted parts back into a single complex number as the output.
A complex number is usually in the form 'a + bi' or sometimes 'a + bj', where a is the real part or coefficient, b is the imaginary part, and i or j is the imaginary number or unit.
So, in the complex number '3+9i', the real coefficient would be 3, and the imaginary coefficient would be 9.
When subtracting two complex numbers, the real components are subtracted separately from the imaginary components. So, '3+4i' - '2+2i' would be 1+2i. The real parts are subtracted (3-2=1) and so are the imaginary parts (4-2=2).
If there are negative numbers, those get subtracted too, but added to the total, rather than subtracted.
Examples
How to Subtract Two Complex Numbers Together
Let's say we have table with two columns of complex numbers, and need to take the difference between each complex number in a third column.
We can use the formula:
=IMSUB(complex_number1, complex_number2)
Like so to add up each complex number in the third column.
Unfortunately, unlike the IMSUM function, IMSUB can only handle a maximum of two complex numbers at a time. So, if multiple complex numbers are needed to be subtracted from each other, multiple IMSUB formulas will be needed.