Contact

IMSUB Function (Gnumeric)

Engineering Intermediate Gnumeric

Learn the IMSUB function in Gnumeric: Returns the difference of two complex numbers.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Gnumeric. How formula examples are checked

What the function calculates

IMSUB(z1,z2) returns the difference z1 - z2, subtracting the real parts and imaginary parts separately. If z1 = a+bi and z2 = c+di, the difference is (a-c)+(b-d)i. Use it to compare complex measurements, calculate an error vector, or inspect changes in amplitude-and-phase representations without stripping away the imaginary component [1, IMSUB].

Version-specific error distinction: The online 1.12 manual describes malformed complex inputs as #VALUE!. The official 1.12.62 source instead returns #NUM! when parsing a malformed complex string; other unsupported value types can still return #VALUE!. Any #VALUE! expectations below are the manual’s older documented rule, not verified 1.12.62 output. No native error test was performed.

Exact Gnumeric syntax

=IMSUB(z1,z2)
Position Argument Required Accepted role Default
1 z1 Yes Complex-number starting value / minuend. None.
2 z2 Yes Complex-number value to subtract / subtrahend. None.

The Gnumeric manual defines exactly two positional arguments, each a complex value. It documents #VALUE! if either is invalid [1, IMSUB]. Unlike Gnumeric’s IMSUM(z1,z2,...), IMSUB has no documented variadic argument form. Additional subtractions can be nested.

Build and check a reproducible worksheet

Cell Enter Meaning
A1 Observed real Header
B1 Observed imag Header
C1 Baseline real Header
D1 Baseline imag Header
A2 3 Observed x
B2 4 Observed y
C2 1 Baseline x
D2 -2 Baseline y
E2 =COMPLEX(A2,B2) Observed complex number
F2 =COMPLEX(C2,D2) Baseline complex number
G2 =IMSUB(E2,F2) Complex difference

Independently expected G2: (3+4i)-(1-2i)=(3-1)+(4-(-2))i=2+6i. The sign of the second number’s imaginary component matters: subtracting -2i adds 2i. The formula, arguments and invalid-input error type are documented for Gnumeric [1, IMSUB]. Exact spaces or zero terms in the displayed complex result remain untested.

Additional formulas and mathematical expectations

Formula Expected mathematical result Use
=IMSUB("3+4i","1-2i") 2+6i Direct two-text-input example.
=IMSUB(COMPLEX(3,4),COMPLEX(3,4)) Zero complex difference Detect a matched pair.
=IMSUB(COMPLEX(1,0),COMPLEX(3,0)) -2 Purely real difference.
=IMSUB(COMPLEX(0,5),COMPLEX(0,-2)) 7i Purely imaginary difference.
=IMSUB("invalid","1+2i") #VALUE! documented Bad input troubleshooting [1].

As with any complex-number function, distinguish an algebraically expected value from the application’s exact printed representation. The text "2+6i" is a convenient notation, not an assertion about Gnumeric’s formatting of every sign and zero.

Practical example: quality-control error vector

Suppose the measured response is 3+4i and the reference is 1-2i. Their complex deviation is 2+6i. Put the difference =IMSUB(E2,F2) in G2 and use =IMABS(G2) in H2. Independently, the magnitude of the error vector is sqrt(2²+6²)=sqrt(40)≈6.3245553203 [1, IMABS]. This gives an interpretable scalar error size without discarding the original complex direction. To preserve direction, add =IMARGUMENT(G2) in I2, producing an independently expected angle atan2(6,2)≈1.2490457724 radians [1, IMARGUMENT].

This is a mathematical worksheet illustration, not a validated instrument tolerance or acceptance criterion. Define an allowable magnitude using the real-world process, not an arbitrary threshold in the tutorial.

Advanced use: reconcile a complex adjustment across multiple periods

Gnumeric documents IMSUM for adding complex numbers [1, IMSUM]. Starting with an original value E2, subtract a baseline F2 into G2, then calculate =IMSUM(G2,F2) in H2. Algebraically H2 should return E2. Check the difference using =IMABS(IMSUB(H2,E2)), with a mathematical expectation of zero. Do not compare stringified complex-number outputs when floating-point rounding is possible.

To subtract a sequence of adjustments, use nesting: =IMSUB(IMSUB(E2,F2),F3) represents (E2-F2)-F3, not E2-(F2-F3). If the user instead wishes to subtract the sum of the baseline values, an equivalent algebraic form is =IMSUB(E2,IMSUM(F2,F3)). The latter references Gnumeric’s documented IMSUM variadic form [1, IMSUM] and is easier to audit when row counts vary.

Troubleshooting and boundaries

Symptom Explanation or next step
#VALUE! Invalid complex input is a documented cause [1, IMSUB]. Rebuild the value with COMPLEX(real,imaginary).
Wrong imaginary sign Confirm that z2 is being subtracted; negative parts in the baseline reverse sign when subtracted.
Attempting IMSUB(z1,z2,z3) Only IMSUB(z1,z2) is documented. Nest or use IMSUM for the adjustment aggregate.
Unexpected numerical residue Compare via IMABS(IMSUB(...)) with a tolerance, not literal text equality.
Plain =A2-B2 gives unexpected behaviour These cells may hold complex notation rather than regular numeric scalars. Use IMSUB for the documented complex operation.
Blank cells, numbers represented as strings, i/j mixes The documentation does not enumerate all such coercions; verify in native Gnumeric before asserting an error or conversion.
Formula rejected with punctuation changes Match Gnumeric’s installation locale and documented formula syntax [5,6].

Version, software, locale and compatibility boundaries

This is a guide to Gnumeric, based on the Gnumeric 1.12 manual [1]. Gnumeric’s own function catalogue [2] lists IMSUB as Complete / Basic: the first term reports catalogue implementation classification; the second is the project’s test-suite category. Neither is a record of running the examples in this tutorial. The 1.12.62 release announcement [3] mentions improved compatibility for complex-number functions generally, but does not assert this tutorial’s examples were tested, nor identify every supported older release.

The official Gnumeric manual explicitly labels this function Microsoft Excel compatible [1, IMSUB]. This means a function-level description rather than validation of cell-formatting or undocumented argument coercions; it is not proof of byte-for-byte identical imports, worksheet display, coercion of blanks, text-number conversion, or localized formula entry in Microsoft Excel. Do not infer compatibility from another spreadsheet’s identically named function.

The formulas here use Gnumeric’s English-language function names, a period for the decimal separator, and commas between arguments. The Gnumeric 1.12 manual illustrates commas as function-argument separators [5]; its locale documentation explains that numeric conventions are influenced by system locale [6]. Confirm the actual installation’s formula editor and locale before pasting examples or changing separators. Gnumeric’s download guidance describes Linux/BSD distributor packages as the usual installation route and says the project does not currently distribute Windows binaries [4]. This does not prove a function works on every platform or build.

A complex number such as "3+4i" is passed as text notation to the complex-function family. A different unit suffix (i versus j), case, spaces, Unicode minus signs, explicit empty strings, missing cells, and errors are possible parsing or coercion edge cases; the official function reference is not a complete acceptance matrix. This page does not claim those cases were executed. Use COMPLEX(real,imaginary) to construct consistently formed values when possible [1, COMPLEX].

Official references and claim provenance — checked 2026-10-13

  1. Gnumeric 1.12: Complex-function reference — canonical signature, specific argument meanings and documented errors; function sections noted inline above.
  2. Gnumeric function catalogue — presence, implementation label and upstream test-suite classification; not independent execution of this guide.
  3. Gnumeric 1.12.62 release announcement — announced release context and general complex-number compatibility improvements.
  4. Gnumeric official download and platform guidance — distribution routes and lack of currently distributed Windows binaries.
  5. Gnumeric 1.12: types of cell elements / using functions — documented function-form and comma argument separator for the English examples.
  6. Gnumeric 1.12: languages and locales — locale behaviour and numeric formatting context.

Evidence boundary: The examples were independently calculated and checked against official documentation and the Gnumeric 1.12.62 source. Native execution, locale checks and file round-trips were not performed.