IMSUB in Collabora Office: Calculate Complex Residuals with a Clear Sign Convention
Subtract complex values in Collabora Calc, check observed-minus-expected components and distinguish directional residuals from distances.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: IMSUB subtracts the second complex value from the first. =IMSUB("7+9j";"1+j") has independently expected quantity 6+8j.
Availability and version history
- Introduced: the original Collabora release and launch date are not established by the reviewed sources.
- Availability: documented in Collabora Office 26.04 desktop help.
- Platform scope: online and mobile deployment support is not inferred from the desktop documentation.
- Checked: October 14, 2026. Function-specific documentation and independent controls; no native Collabora execution.
Syntax and operand order
=IMSUB("ComplexNumber1"; "ComplexNumber2")
Both arguments are supplied. The Collabora example subtracts 5+3j from 13+4j to obtain 8+j, establishing the order of the operation.
For a+bj minus c+dj, subtract corresponding coefficients: (a−c)+(b−d)j. Reversing the operands reverses both residual signs, rather than leaving the result unchanged.
The reference accepts complex text in x+yi or x+yj notation. The examples keep lowercase j consistent; broad coercion and exact invalid-input errors are not specified by the section.
Example 1: observed-minus-expected differences
Enter only the first two text columns in A1:B4. Put =IMSUB(A2;B2) in C2 and fill through C4. The last column is expected output.
| A, observed | B, expected | C, residual |
|---|---|---|
| 7+9j | 1+j | 6+8j |
| -2+7j | 3-5j | -5+12j |
| 6-11j | -2+4j | 8-15j |
The second imaginary difference is 7−(−5)=12. Subtracting a negative coefficient increases that residual component.
Label the sign convention explicitly. A reader interpreting positive residuals as “observed above expected” needs to know which coordinate and subtraction order the formula uses.
Example 2: verify both component columns
Use =IMREAL(A2)-IMREAL(B2) and =IMAGINARY(A2)-IMAGINARY(B2) in D2:E2, then fill down. Expected real residuals are 6, −5, 8; imaginary residuals are 8, 12, −15.
Constructing =COMPLEX(D2;E2;"j") gives the same expected residual quantity as C2. The suffix is explicit because the short COMPLEX section does not identify an omitted-suffix default.
Checking just one coordinate would miss mistakes in the other. IMREAL and IMAGINARY provide the two numeric inspections.
Advanced example: reverse direction but preserve distance
For the first record, =IMSUB(B2;A2) has expected quantity −6−8j. Both the original and reversed residuals have magnitude 10.
The other two magnitudes are 13 and 17, from sums of squares 25+144 and 64+225. IMABS removes direction and reports length.
A distance-only report cannot tell whether the observed coordinate was larger or smaller. Retain signed residuals when that direction matters.
Advanced example: parentheses change repeated subtraction
Let P=6+8j, Q=2−j and R=−3+4j. Subtracting Q and then R gives:
=IMSUB(IMSUB("6+8j";"2-j");"-3+4j")
Expected quantity: 7+5j. The first difference is 4+9j; the second adds three to its real coefficient and subtracts four from its imaginary coefficient.
Subtracting the sum Q+R from P also gives 7+5j. But subtracting Q−R from P gives 1+13j. The second expression effectively adds R, so subtraction is not associative.
Advanced example: center a small complex dataset
Use original values 2+2j, 4+6j and 6+4j. Their coordinate means are both four, so the center is 4+4j. Subtracting that center gives −2−2j, 2j and 2 as quantities.
The real residuals (−2,0,2) and imaginary residuals (−2,2,0) each sum to zero. Their magnitudes are the square root of eight, two and two, so centered residuals need not individually vanish.
This is an independent component-centering model, not an assumption that averaging magnitudes gives the same center.
Recovery and precision limits
For the primary fixture, =IMSUM(C2;B2) filled down recovers the observed quantities 7+9j, −2+7j and 6−11j. IMSUM adds the removed contribution back.
The checks use small exact coefficients. Malformed strings, mixed suffixes, blank inputs, native precision and error precedence remain unverified. Quantity recovery does not guarantee byte-identical text formatting for redundant zero terms.
References and verification
Complete function-specific documentation reviewed. Outputs are independent complex-component models or explicit documented controls, not captured native application results. Formulas use English names and semicolon separators; optional-argument brackets describe syntax and are not typed into working formulas.