Definition: In mathematics, an ultrafilter is a type of filter that captures all sets in its domain. An ultrafilter on a set A is defined as a collection of subsets of A that are closed under finite intersection and complementation (i.e., for any two non-empty intersections of elements from the collection, their complements are also in the collection). An ultrafilter on a set A can be thought of as an ideal that captures all sets that are "too small" to be included in A.