im

im(x)

Try it yourself:

See also:

im(): get an imaginary component

im(x) returns the imaginary part of a complex number. For 3 + 4i, im(3 + 4i) is 4; for an ordinary real number it is 0.

Complex-number calculations

Complex values have a real and imaginary coordinate. Pair im() with re() to inspect both parts, and use conj() to build a value. The conj() function reverses the imaginary sign, while abs() gives its magnitude.

Practical care

im() extracts a component; it does not test whether a result is complex. Tiny floating-point residues can appear where theory predicts zero, so use an appropriate tolerance before declaring an imaginary part absent.

Try Im in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions