In mathematics, a filter is a special subset of a partially ordered set. For example, the power set of some set, partially ordered by set inclusion, is a filter. Filters appear in order and lattice theory, but can also be found in topology whence they originate. The dual notion of a filter is an ideal.
Filters were introduced by Henri Cartan in 1937 and subsequently used by Bourbaki in their book Topologie Générale as an alternative to the similar notion of a net developed in 1922 by E. H. Moore and H. L. Smith.
Intuitively, a filter in a partially ordered set (poset), X, is a subset of X that includes as members those elements that are large enough to satisfy some criterion. For example, if x is an element of the poset, then the set of elements that are above x is a filter, called the principal filter at x. (Notice that if x and y are incomparable elements of the poset, then neither of the principal filters at x and y is contained in the other one, and conversely.)
Similarly, a filter on a set contains those subsets that are sufficiently large to contain something. For example, if the set is the real line and x is one of its points, then the family of sets that include x in their interior is a filter, called the filter of neighbourhoods of x. (Notice that the thing in this case is slightly larger than x, but it still doesn't contain any other specific point of the line.)
The above interpretations do not really, without elaboration, explain the condition 2. of the general definition of filter (see below). For, why should two "large enough" things contain a common "large enough" thing? (Note, however, that they do explain conditions 1 and 3: Clearly the empty set is not "large enough", and clearly the collection of "large enough" things should be "upward closed".)