Contact

IMAGINARY Function (Gnumeric)

Engineering Intermediate Gnumeric

Learn the IMAGINARY function in Gnumeric: Returns the imaginary coefficient of a complex number.

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

In a number of the form a+bi, IMAGINARY returns the coefficient b. For 3+4i, the return value is 4, not the string "4i". For 3-4j, the coefficient is -4, even though the imaginary-unit suffix is j. Gnumeric documents this specific function, its one-argument syntax and invalid-number error in the official 1.12 Complex manual [1, IMAGINARY].

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

=IMAGINARY(z)
Argument Required? Type / meaning Default
z Yes A valid complex-number input, either a recognized complex-number literal or a reference/expression returning one. None

The function extracts the signed imaginary coefficient. It is not IMABS (magnitude), IMARGUMENT (angle) or IMREAL (real coefficient). The manual says invalid complex numbers produce #VALUE! [1]. No second argument or default has been documented.

First reproducible sheet

In Gnumeric’s English comma-separator notation, enter the following:

Cell Content Use
A1 Real Header
B1 Imaginary Header
C1 Complex result Header
D1 Extracted imaginary Header
A2 3 Numeric real coefficient
B2 4 Numeric imaginary coefficient
C2 =COMPLEX(A2,B2) Assemble the complex input.
D2 =IMAGINARY(C2) Read its imaginary coefficient.
A3 3 Numeric real coefficient
B3 -4 A negative imaginary coefficient.
C3 =COMPLEX(A3,B3,"j") Alternative imaginary-unit suffix.
D3 =IMAGINARY(C3) Read the signed coefficient.

Expected D2 = 4, D3 = -4. The coefficient signs are mathematical expectations. The official COMPLEX reference recognizes "i" and "j"; exact complex-string formatting in C2/C3 has not been observed in Gnumeric in this review [1].

Formula-only checks

Expression Independently expected value Explanation
=IMAGINARY("3+4i") 4 Positive imaginary coefficient.
=IMAGINARY("3-4j") -4 Suffix changes, signed coefficient does not.
=IMAGINARY(COMPLEX(-2,5)) 5 Result created by Gnumeric’s COMPLEX function.
=IMAGINARY(IMCONJUGATE("3+4i")) -4 Conjugation reverses the imaginary sign.
=IMAGINARY(IMPRODUCT("3+4i","1-2i")) -2 Product 11-2i has imaginary part -2.
=IMAGINARY("unparseable") #VALUE! per documented invalid-z rule A helpful explicit invalid-input check.

These are expected outputs, not captured worksheets, screenshots or application-test results.

Applied example: quadrature components of a measurement

Suppose a measurement’s in-phase value is 8 and quadrature value is -6. Type 8 in A2 and -6 in B2; put =COMPLEX(A2,B2,"j") in C2. =IMAGINARY(C2) in D2 should return -6, while =IMREAL(C2) in E2 should return 8 and =IMABS(C2) in F2 should return 10 because √(8²+(-6)²)=10. If D2 unexpectedly shows a positive number, you may have accidentally applied IMCONJUGATE somewhere upstream or removed the minus sign on B2.

For a spreadsheet with hundreds of rows, the extraction is useful when imported complex values need to be separated into real and quadrature columns for charting, filtering, or validating signs. It does not identify whether the input represents a frequency-domain measurement, physical impedance or another complex quantity—that meaning belongs to your data model.

Advanced workflow: compare products via scalar arithmetic

For inputs z1=a+bi and z2=c+di, the imaginary coefficient of the product is ad+bc. For a=3, b=4, c=1, d=-2, calculate 3×(-2)+4×1 = -2. In a worksheet, with A2=3, B2=4, A3=1, B3=-2, compare:

=IMAGINARY(IMPRODUCT(COMPLEX(A2,B2),COMPLEX(A3,B3)))
=A2*B3+B2*A3

Both should produce -2. The second formula is an independent numerical audit. This comparison is particularly helpful when complex-number formatting obscures the sign of a term. Use IMCONJUGATE as a second check: for any z, the imaginary coefficient of its conjugate is the negative of the coefficient of z, provided both inputs are valid complex numbers. The documented Gnumeric functions support writing these formulas, while the numerical identity is mathematics [1].

Errors, limitations and corrections

Issue What to check
#VALUE! for a string Gnumeric documents this error for an invalid complex z [1]. Construct the number with COMPLEX or correct the literal.
Output is -4 instead of +4 A negative imaginary coefficient is not an error. Read the minus sign in "3-4i" or "3-4j".
Confusion with imaginary unit IMAGINARY("3+4i") returns 4 as a coefficient; the formula does not return 4i as a separate complex-number string.
Different result from IMABS IMABS produces nonnegative modulus; for 3+4i, its mathematical value is 5.
A pasted complex string is rejected Check text quoting, use COMPLEX(x,y), and validate the exact accepted formats in native Gnumeric. Whitespace, I uppercase, and Unicode â…ˆ were not tested.
Missing or nonscalar source data The Gnumeric manual’s compact note does not establish full treatment of missing values/arrays, nor does this review claim tests. Avoid asserting results for blanks, logical values or locale-specific coercions.
Formula separator seems invalid Examples follow comma-based English syntax. Verify the installed locale’s entry conventions; this is not evidence of universal separators.

Compatibility and test limitations

Gnumeric’s official manual marks this function Microsoft Excel compatible [1], and the catalogue reports Complete / Basic [2]. Neither label establishes precise behavior across all editions or file import/export routes. Version 1.12.62 is a published upstream release and mentions complex-function Excel compatibility updates [3], but does not identify this exact worksheet as tested. For version-specific assurance, test positive, negative and zero coefficients, both i/j suffixes, malformed text, native cell entry versus quoted formula strings, blank cells, and XLSX round-trip in an actual installed Gnumeric environment.

Software, version and evidence boundaries

This is a Gnumeric tutorial, not a formula transplanted from another spreadsheet. The Gnumeric 1.12 function manual documents the signature, argument meanings and listed errors [1]; the current official function catalogue lists this function as Complete / Basic (upstream status, not a test run here) [2]. The upstream 1.12.62 announcement describes improvements to complex-function Excel compatibility [3], but does not establish which older releases exhibit every behavior. The preferred distributed desktop environment is Linux/BSD; the project does not currently distribute Windows binaries [4].

All displayed results below are expected mathematical results independently checked, or directly documented error expectations. They are not observations from executing Gnumeric. Native tests, import/export round-trips and locale variants remain pending. The examples use the manual’s English function names, decimal points and comma argument separators; installed application locale/settings can affect formula entry and number display. Confirm your actual separators and formula editor on the target system before pasting formulas.

Official sources, checked 2026-10-13

  1. Gnumeric 1.12 Complex function reference — Gnumeric-specific syntax, descriptions, optional defaults and documented errors; function sections are identified inline.
  2. Gnumeric official function catalogue — catalogue presence and implementation/upstream test classifications, not runtime evidence for these worksheets.
  3. Gnumeric 1.12.62 upstream release announcement — release-level version and complex-compatibility context; no per-example validation claimed.
  4. Official Gnumeric download/platform guidance — supported distribution pathways as stated by maintainers.

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.