In topology, a subbase (or subbasis, prebase, prebasis) for a topological space with topology is a subcollection of that generates in the sense that is the smallest topology containing as open sets. A slightly different definition is used by some authors, and there are other useful equivalent formulations of the definition; these are discussed below.
Let be a topological space with topology A subbase of is usually defined as a subcollection of satisfying one of the two following equivalent conditions:
(If we use the nullary intersection convention, then there is no need to include in the second definition.)
For any subcollection of the power set there is a unique topology having as a subbase. In particular, the intersection of all topologies on containing satisfies this condition. In general, however, there is no unique subbasis for a given topology.
Thus, we can start with a fixed topology and find subbases for that topology, and we can also start with an arbitrary subcollection of the power set and form the topology generated by that subcollection. We can freely use either equivalent definition above; indeed, in many cases, one of the two conditions is more useful than the other.
Less commonly, a slightly different definition of subbase is given which requires that the subbase cover ^{[2]} In this case, is the union of all sets contained in This means that there can be no confusion regarding the use of nullary intersections in the definition.
However, this definition is not always equivalent to the two definitions above. There exist topological spaces with subcollections of the topology such that is the smallest topology containing , yet does not cover . (An example is given at the end of the next section.) In practice, this is a rare occurrence. E.g. a subbase of a space that has at least two points and satisfies the T_{1} separation axiom must be a cover of that space. But as seen below, to prove the Alexander Subbase Theorem,^{[3]} one must assume that covers
The topology generated by any subset (including by the empty set ) is equal to the trivial topology
If is a topology on and is a basis for then the topology generated by is Thus any basis for a topology is also a subbasis for If is any subset of then the topology generated by will be a subset of
The usual topology on the real numbers has a subbase consisting of all semiinfinite open intervals either of the form or where and are real numbers. Together, these generate the usual topology, since the intersections for generate the usual topology. A second subbase is formed by taking the subfamily where and are rational. The second subbase generates the usual topology as well, since the open intervals with rational, are a basis for the usual Euclidean topology.
The subbase consisting of all semiinfinite open intervals of the form alone, where is a real number, does not generate the usual topology. The resulting topology does not satisfy the T_{1} separation axiom, since if every open set containing also contains
The initial topology on defined by a family of functions where each has a topology, is the coarsest topology on such that each is continuous. Because continuity can be defined in terms of the inverse images of open sets, this means that the initial topology on is given by taking all where ranges over all open subsets of as a subbasis.
Two important special cases of the initial topology are the product topology, where the family of functions is the set of projections from the product to each factor, and the subspace topology, where the family consists of just one function, the inclusion map.
The compactopen topology on the space of continuous functions from to has for a subbase the set of functions
Suppose that is a Hausdorff topological space with containing two or more elements (for example, with the Euclidean topology). Let be any nonempty open subset of (for example, could be a nonempty bounded open interval in ) and let denote the subspace topology on that inherits from (so ). Then the topology generated by on is equal to the union (see the footnote for an explanation), ^{[note 1]} where (since is Hausdorff, equality will hold if and only if ). Note that if is a proper subset of then is the smallest topology on containing yet does not cover (that is, the union is a proper subset of ).
One nice fact about subbases is that continuity of a function need only be checked on a subbase of the range. That is, if is a map between topological spaces and if is a subbase for then is continuous if and only if is open in for every A net (or sequence) converges to a point if and only if every subbasic neighborhood of contains all for sufficiently large
The Alexander Subbase Theorem is a significant result concerning subbases that is due to James Waddell Alexander II.^{[3]} The corresponding result for basic (rather than subbasic) open covers is much easier to prove.
The converse to this theorem also holds and it is proven by using (since every topology is a subbasis for itself).
Proof


Suppose for the sake of contradiction that the space is not compact (so is an infinite set), yet every subbasic cover from has a finite subcover. Let denote the set of all open covers of that do not have any finite subcover of Partially order by subset inclusion and use Zorn's Lemma to find an element that is a maximal element of Observe that:
We will begin by showing that is not a cover of Suppose that was a cover of which in particular implies that is a cover of by elements of The theorem's hypothesis on implies that there exists a finite subset of that covers which would simultaneously also be a finite subcover of by elements of (since ). But this contradicts which proves that does not cover Since does not cover there exists some that is not covered by (that is, is not contained in any element of ). But since does cover there also exists some such that Since is a subbasis generating 's topology, from the definition of the topology generated by there must exist a finite collection of subbasic open sets such that We will now show by contradiction that for every If was such that then also so the fact that would then imply that is covered by which contradicts how was chosen (recall that was chosen specifically so that it was not covered by ). As mentioned earlier, the maximality of in implies that for every there exists a finite subset of such that forms a finite cover of Define Let denote the union of all sets in (which is an open subset of ) and let denote the complement of in Observe that for any subset covers if and only if In particular, for every the fact that covers implies that Since was arbitrary, we have Recalling that we thus have which is equivalent to being a cover of Moreover, is a finite cover of with Thus has a finite subcover of which contradicts the fact that Therefore, the original assumption that is not compact must be wrong, which proves that is compact. 
Although this proof makes use of Zorn's Lemma, the proof does not need the full strength of choice. Instead, it relies on the intermediate Ultrafilter principle.^{[3]}
Using this theorem with the subbase for above, one can give a very easy proof that bounded closed intervals in are compact. More generally, Tychonoff's theorem, which states that the product of nonempty compact spaces is compact, has a short proof if the Alexander Subbase Theorem is used.
Proof


The product topology on has, by definition, a subbase consisting of cylinder sets that are the inverse projections of an open set in one factor. Given a subbasic family of the product that does not have a finite subcover, we can partition into subfamilies that consist of exactly those cylinder sets corresponding to a given factor space. By assumption, if then does not have a finite subcover. Being cylinder sets, this means their projections onto have no finite subcover, and since each is compact, we can find a point that is not covered by the projections of onto But then is not covered by Note, that in the last step we implicitly used the axiom of choice (which is actually equivalent to Zorn's lemma) to ensure the existence of 