This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / List Operations  /

  • Complement[ eall , , , ... ] gives the elements in eall which are not in any of the .
  • The list returned by Complement is sorted into standard order.
  • Example: Complement[ a,b,c,d,e , a,c , d ].
  • Complement[ eall , , ... , SameTest-> test ] applies test to each pair of elements in eall and the to determine whether they should be considered the same.
  • See the Mathematica book: Section 1.8.8.
  • See also: Intersection, Union.

    Further Examples

    This gives all those elements of the first list that do not appear in either of the other two lists.