Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / Numerical Computation / Number Representation  /
Complex

  • Complex is the head used for complex numbers.
  • You can enter a complex number in the form x + I y.
  • _Complex can be used to stand for a complex number in a pattern.
  • You have to use Re and Im to extract parts of Complex numbers.
  • See the Mathematica book: Section 3.1.1.
  • See also: Real, Re, Im.

    Further Examples

    The number x is only approximately real.

    In[1]:=

    Out[1]=

    In[2]:=

    Out[2]=

    Chop gets rid of the small imaginary part.

    In[3]:=

    Out[3]=

    In[4]:=

    Out[4]=

    In[5]:=

    This defines a rule to convert a complex number into a list made up of its real and imaginary parts.

    In[6]:=

    You can apply the rule to all the elements of a list.

    In[7]:=

    Out[7]=

    In[8]:=



    Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
    THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
    SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.