Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / Element Extraction  /
First

  • First[ expr ] gives the first element in expr.
  • First[ expr ] is equivalent to expr [[1]].
  • See the Mathematica book: Section 1.8.4.
  • See also: Part, Last, Rest, Take, Select.

    Further Examples

    This gives the first element from the list.

    In[1]:=

    Out[1]=

    The result may seem strange until you see how the polynomial is stored internally.

    In[2]:=

    Out[2]=

    In[3]:=

    Out[3]//FullForm=



    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.