UniqueElements[{list1,list2,…}]
gives the elements for each listi that are not in any other list.
UniqueElements[lists,test]
uses test to determine whether pairs of elements should be considered equivalent.


UniqueElements
UniqueElements[{list1,list2,…}]
gives the elements for each listi that are not in any other list.
UniqueElements[lists,test]
uses test to determine whether pairs of elements should be considered equivalent.
Details

- UniqueElements[{list1,list2,…,listn}] returns another list of length n, with elements being sublists of the corresponding inputs lists.
- Order of elements in the original lists is preserved in output. Multiplicity is not preserved.
- The listi must have the same head, but it need not be List.
Examples
open all close allBasic Examples (3)
Properties & Relations (3)
UniqueElements returns a list of the same length as the input:
UniqueElements[{}] is {}:
UniqueElements[{l1,l2,…}] effectively complements each list li with all other lists:
Order of elements in the original lists is preserved, but multiplicity is not:
Related Guides
History
Text
Wolfram Research (2022), UniqueElements, Wolfram Language function, https://reference.wolfram.com/language/ref/UniqueElements.html.
CMS
Wolfram Language. 2022. "UniqueElements." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/UniqueElements.html.
APA
Wolfram Language. (2022). UniqueElements. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/UniqueElements.html
BibTeX
@misc{reference.wolfram_2025_uniqueelements, author="Wolfram Research", title="{UniqueElements}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/UniqueElements.html}", note=[Accessed: 11-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_uniqueelements, organization={Wolfram Research}, title={UniqueElements}, year={2022}, url={https://reference.wolfram.com/language/ref/UniqueElements.html}, note=[Accessed: 11-August-2025]}