Contact

COMPLEX Function (Gnumeric)

Engineering Intermediate Gnumeric

Learn the COMPLEX function in Gnumeric: Converts real and imaginary coefficients into 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

Use COMPLEX when a calculation stores the real component and the imaginary component separately but a Gnumeric complex-number function needs a single value. If a measurement is represented as real part 3 and imaginary part 4, the mathematical number is 3+4i; COMPLEX assembles that notation. Gnumeric documents this under Complex, not as a generic text-concatenation shortcut [1, COMPLEX].

Exact Gnumeric syntax

=COMPLEX(x,y,i)
Argument Required? Meaning and accepted input Default
x Yes Real coefficient; a numeric value, numeric expression or cell reference. None
y Yes Imaginary coefficient; a numeric value, numeric expression or cell reference. None
i No Imaginary-unit suffix. Supply the text "i" or "j" (use double quotes around the suffix in a formula). "i"

The third argument is a suffix, not the imaginary coefficient. It is written as i in the manual’s argument placeholder, although its value may be "i" or "j". Gnumeric explicitly documents #VALUE! when the suffix is neither choice [1, COMPLEX]. The function constructs complex-number representation; it does not return the vector length (IMABS) or the imaginary coefficient (IMAGINARY).

Reproduce the first result

Enter the following in a fresh worksheet, using a comma-based English formula locale:

Cell Enter Role
A1 Real part Header
B1 Imaginary part Header
C1 Complex value Header
A2 3 Real coefficient
B2 4 Imaginary coefficient
C2 =COMPLEX(A2,B2) Builds one complex number

Expected C2 mathematical value: 3+4i. This follows from the two inputs and the documented default suffix [1]. Treat the precise displayed spacing, zero suppression, and text formatting as requiring a native Gnumeric check.

Additional formula checks

Formula Expected mathematical meaning / result Why it is useful
=COMPLEX(3,-4,"j") 3-4j Explicit alternative imaginary-unit suffix.
=COMPLEX(-2,5) -2+5i Negative real coefficient is allowed mathematically.
=COMPLEX(0,-2) -2i A purely imaginary value; formatting of zero real part is not independently observed.
=IMREAL(COMPLEX(3,4)) 3 Checks the real coefficient after construction.
=IMAGINARY(COMPLEX(3,4)) 4 Checks the imaginary coefficient after construction.
=COMPLEX(3,4,"k") #VALUE! Specifically documented invalid-suffix case [1, COMPLEX].

None of these outcomes are represented as native execution results. The numerical parts follow elementary complex arithmetic; the error follows the Gnumeric manual.

Practical application: impedance readings

A simplified electrical-impedance worksheet has a resistance component (real) and reactance component (imaginary). Suppose A2=8 ohms and B2=6 ohms. In C2, enter =COMPLEX(A2,B2). It represents the complex impedance 8+6i ohms; for engineering notation use =COMPLEX(A2,B2,"j"), which represents 8+6j. In D2, calculate =IMABS(C2) to get the independently calculated magnitude SQRT(8^2+6^2)=10 ohms. Keeping A and B numeric allows filtering and auditing before you construct the complex value. This is a simplified calculation, not advice for electrical equipment.

If separate measurement columns are updated each day, copy the COMPLEX formula down the column to construct a consistently formatted result. You can then use IMREAL(C2) and IMAGINARY(C2) for an audit of the original inputs. Avoid hand-building a complex number with text joins such as A2&"+"&B2&"i": a negative B2 would produce ambiguous signs, and a manually concatenated string is not evidence of Gnumeric’s parser accepting it.

Advanced use: combine measured components and verify magnitude

Let A2=3, B2=4 and A3=1, B3=-2. Put =COMPLEX(A2,B2) in C2 and =COMPLEX(A3,B3) in C3. Use =IMSUM(C2,C3) to add complex measurements: the independent expected result is (3+1)+(4-2)i = 4+2i. Use =IMPRODUCT(C2,C3) to multiply them: (3+4i)(1-2i)=11-2i. Use =IMABS(C2) to obtain 5. These checks help identify wrong coefficient signs more readily than looking at the assembled text alone. The complex operations are separately documented in the same Gnumeric manual [1, IMSUM / IMPRODUCT / IMABS].

Errors, limits and troubleshooting

Symptom Explanation and a defensible next check
#VALUE! with =COMPLEX(3,4,"k") Documented invalid suffix. Change it to "i", "j" or omit it [1].
An unexpected negative imaginary part Inspect the sign of the source coefficient y, not merely the displayed complex string.
A result looks like text The complex-number representation is used by the IM* family. Verify with IMREAL(COMPLEX(3,4)) and IMAGINARY(COMPLEX(3,4)); do not assume ordinary cell arithmetic treats the representation as a scalar.
An omitted third argument behaves differently The manual specifies "i" as the default. A literal empty cell or an explicit empty string in argument 3 is not the same as omitting the argument; those coercions were not tested here.
Numeric text, blanks or booleans The accessible Gnumeric reference does not fully specify all coercions of x and y; do not assert their exact runtime results without Gnumeric testing. Use explicit numeric input where possible.
#NAME? or formula rejection Verify you are editing in Gnumeric and have entered the documented function name and locale-appropriate separators. A catalogue entry is not proof of support in every older installation.
Pasting 3,4 as a decimal In some locales the comma is interpreted differently. Confirm both decimal conventions and separators on the actual installation rather than treating formula punctuation as universal.

Compatibility and what is not established

The official manual explicitly labels COMPLEX Microsoft Excel compatible [1]. This is a documented compatibility classification, not a guarantee that formatting, conversion of edge-case inputs, file export or importing an Excel workbook are identical. Release 1.12.62 reports broader complex-function compatibility improvements [3]. For version-specific assurance, a native test matrix should include nonnumeric coefficients, zero components, negative values, both suffixes, invalid suffix, omitted suffix, blank cells and an XLSX round-trip. Do not extrapolate behavior from LibreOffice’s similarly named function.

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.