The first Hahn–Banach theorem was proved by Eduard Helly in 1921 who showed that certain linear functionals defined on a subspace of a certain type of normed space () had an extension of the same norm. Helly did this through the technique of first proving that a one-dimensional extension exists (where the linear functional has its domain extended by one dimension) and then using induction. In 1927, Hahn defined general Banach spaces and used Helly's technique to prove a norm-preserving version of Hahn–Banach theorem for Banach spaces (where a bounded linear functional on a subspace has a bounded linear extension of the same norm to the whole space). In 1929, Banach, who was unaware of Hahn's result, generalized it by replacing the norm-preserving version with the dominated extension version that uses sublinear functions. Whereas Helly's proof used mathematical induction, Hahn and Banach both used transfinite induction.
The Hahn–Banach theorem arose from attempts to solve infinite systems of linear equations. This is needed to solve problems such as the moment problem, whereby given all the potential moments of a function one must determine if a function having these moments exists, and, if so, find it in terms of those moments. Another such problem is the Fourier cosine series problem, whereby given all the potential Fourier cosine coefficients one must determine if a function having those coefficients exists, and, again, find it if so.
Riesz and Helly solved the problem for certain classes of spaces (such as and where they discovered that the existence of a solution was equivalent to the existence and continuity of certain linear functionals. In effect, they needed to solve the following problem:
(The vector problem) Given a collection of bounded linear functionals on a normed space and a collection of scalars determine if there is an such that for all
If happens to be a reflexive space then to solve the vector problem, it suffices to solve the following dual problem:
(The functional problem) Given a collection of vectors in a normed space and a collection of scalars determine if there is a bounded linear functional on such that for all
Riesz went on to define space () in 1910 and the spaces in 1913. While investigating these spaces he proved a special case of the Hahn–Banach theorem. Helly also proved a special case of the Hahn–Banach theorem in 1912. In 1910, Riesz solved the functional problem for some specific spaces and in 1912, Helly solved it for a more general class of spaces. It wasn't until 1932 that Banach, in one of the first important applications of the Hahn–Banach theorem, solved the general functional problem. The following theorem states the general functional problem and characterizes its solution.
Theorem(The functional problem) — Let be vectors in a real or complex normed space and let be scalars also indexed by
There exists a continuous linear functional on such that for all if and only if there exists a such that for any choice of scalars where all but finitely many are the following holds:
The Hahn–Banach theorem can be deduced from the above theorem. If is reflexive then this theorem solves the vector problem.
A real-valued function defined on a subset of is said to be dominated (above) by a function if for every
Hence the reason why the following version of the Hahn-Banach theorem is called the dominated extension theorem.
which is the (equivalent) conclusion that some authors write instead of
It follows that if is also symmetric, meaning that holds for all then if and only
Every norm is a seminorm and both are symmetric balanced sublinear functions. A sublinear function is a seminorm if and only if it is a balanced function. On a real vector space (although not on a complex vector space), a sublinear function is a seminorm if and only if it is symmetric. The identity function on is an example of a sublinear function that is not a seminorm.
The dominated extension theorem for real linear functionals implies the following alternative statement of the Hahn–Banach theorem that can be applied to linear functionals on real or complex vector spaces.
Hahn–Banach theorem — Suppose a seminorm on a vector space over the field which is either or
If is a linear functional on a vector subspace such that
then there exists a linear functional such that
The theorem remains true if the requirements on are relaxed to require only that for all and all scalars and satisfying 
This condition holds if and only if is a convex and balanced function satisfying or equivalently, if and only if it is convex, satisfies and for all and all unit length scalars
A complex-valued functional is said to be dominated by if for all in the domain of
With this terminology, the above statements of the Hahn–Banach theorem can be restated more succinctly:
Hahn–Banach dominated extension theorem: If is a seminorm defined on a real or complex vector space then every dominated linear functional defined on a vector subspace of has a dominated linear extension to all of In the case where is a real vector space and is merely a convex or sublinear function, this conclusion will remain true if both instances of "dominated" (meaning ) are weakened to instead mean "dominated above" (meaning ).
and moreover, if is a norm on then their operator norms are equal: 
In particular, a linear functional on extends another one defined on if and only if their real parts are equal on (in other words, a linear functional extends if and only if extends ).
The real part of a linear functional on is always a real-linear functional (meaning that it is linear when is considered as a real vector space) and if is a real-linear functional on a complex vector space then defines the unique linear functional on whose real part is
If is a linear functional on a (complex or real) vector space and if is a seminorm then[proof 2]
Suppose is a seminorm on a complex vector space and let be a linear functional defined on a vector subspace of that satisfies on
Consider as a real vector space and apply the Hahn–Banach theorem for real vector spaces to the real-linear functional to obtain a real-linear extension that is also dominated above by which means that it satisfies on and on
The map defined by is a linear functional on that extends (because their real parts agree on ) and satisfies on (because and is a seminorm).
The proof above shows that when is a seminorm then there is a one-to-one correspondence between dominated linear extensions of and dominated real-linear extensions of the proof even gives a formula for explicitly constructing a linear extension of from any given real-linear extension of its real part.
A linear functional on a topological vector space is continuous if and only if this is true of its real part if the domain is a normed space then (where one side is infinite if and only if the other side is infinite).
Assume is a topological vector space and is sublinear function.
If is a continuous sublinear function that dominates a linear functional then is necessarily continuous. Moreover, a linear functional is continuous if and only if its absolute value (which is a seminorm that dominates ) is continuous. In particular, a linear functional is continuous if and only if it is dominated by some continuous sublinear function.
Given any real number the map defined by is always a linear extension of to [note 1] but it might not satisfy
It will be shown that can always be chosen so as to guarantee that which will complete the proof.
where are real numbers.
To guarantee it suffices that (in fact, this is also necessary[note 2]) because then satisfies "the decisive inequality"
To see that follows,[note 3] assume and substitute in for both and to obtain
If (respectively, if ) then the right (respectively, the left) hand side equals so that multiplying by gives
Assume that is convex, which means that for all and Let and be as in the lemma's statement. Given any and any positive real the positive real numbers and sum to so that the convexity of on guarantees
thus proving that which after multiplying both sides by becomes
This implies that the values defined by
are real numbers that satisfy As in the above proof of the one–dimensional dominated extension theorem above, for any real define by
It can be verified that if then where follows from when (respectively, follows from when ).
The set of all possible dominated linear extensions of are partially ordered by extension of each other, so there is a maximal extension By the codimension-1 result, if is not defined on all of then it can be further extended. Thus must be defined everywhere, as claimed.
In the above form, the functional to be extended must already be bounded by a sublinear function. In some applications, this might close to begging the question. However, in locally convex spaces, any continuous functional is already bounded by the norm, which is sublinear. One thus has
Continuous extensions on locally convex spaces — Let X be locally convextopological vector space over (either or ), a vector subspace of X, and a continuous linear functional on Then has a continuous linear extension to all of X. If the topology on X arises from a norm, then the norm of is preserved by this extension.
The key element of the Hahn–Banach theorem is fundamentally a result about the separation of two convex sets: and This sort of argument appears widely in convex geometry,optimization theory, and economics. Lemmas to this end derived from the original Hahn–Banach theorem are known as the Hahn–Banach separation theorems.
Theorem — Let and be non-empty convex subsets of a real locally convex topological vector space
If and then there exists a continuous linear functional on such that and for all (such an is necessarily non-zero).
When the convex sets have additional properties, such as being open or compact for example, then the conclusion can be substantially strengthened:
If is open then and are separated by a closed hyperplane. Explicitly, this means that there exists a continuous linear map and such that for all If both and are open then the right-hand side may be taken strict as well.
If is locally convex, is compact, and closed, then and are strictly separated: there exists a continuous linear map and such that for all
If is complex (rather than real) then the same claims hold, but for the real part of
Then following important corollary is known as the Geometric Hahn–Banach theorem or Mazur's theorem. It follows from the first bullet above and the convexity of
Theorem (Mazur) — Let be a vector subspace of the topological vector space and suppose is a non-empty convex open subset of with
Then there is a closed hyperplane (codimension-1 vector subspace) that contains but remains disjoint from
Mazur's theorem clarifies that vector subspaces (even those that are not closed) can be characterized by linear functionals.
Corollary(Separation of a subspace and an open convex set) — Let be a vector subspace of a locally convex topological vector space and be a non-empty open convex subset disjoint from Then there exists a continuous linear functional on such that for all and on
Since points are trivially convex, geometric Hahn-Banach implies that functionals can detect the boundary of a set. In particular, let be a real topological vector space and be convex with If then there is a functional that is vanishing at but supported on the interior of 
Call a normed space smooth if at each point in its unit ball there exists a unique closed hyperplane to the unit ball at Köthe showed in 1983 that a normed space is smooth at a point if and only if the norm is Gateaux differentiable at that point.
For example, linear subspaces are characterized by functionals: if X is a normed vector space with linear subspace M (not necessarily closed) and if is an element of X not in the closure of M, then there exists a continuous linear map with for all and (To see this, note that is a sublinear function.) Moreover, if is an element of X, then there exists a continuous linear map such that and This implies that the natural injection from a normed space X into its double dual is isometric.
That last result also suggests that the Hahn–Banach theorem can often be used to locate a "nicer" topology in which to work. For example, many results in functional analysis assume that a space is Hausdorff or locally convex. However, suppose X is a topological vector space, not necessarily Hausdorff or locally convex, but with a nonempty, proper, convex, open set M. Then geometric Hahn-Banach implies that there is a hyperplane separating M from any other point. In particular, there must exist a nonzero functional on X — that is, the continuous dual space is non-trivial. Considering X with the weak topology induced by then X becomes locally convex; by the second bullet of geometric Hahn-Banach, the weak topology on this new space separates points.
Thus X with this weak topology becomes Hausdorff. This sometimes allows some results from locally convex topological vector spaces to be applied to non-Hausdorff and non-locally convex spaces.
The Hahn–Banach theorem is often useful when one wishes to apply the method of a priori estimates. Suppose that we wish to solve the linear differential equation for with given in some Banach space X. If we have control on the size of in terms of and we can think of as a bounded linear functional on some suitable space of test functions then we can view as a linear functional by adjunction: At first, this functional is only defined on the image of but using the Hahn–Banach theorem, we can try to extend it to the entire codomain X. The resulting functional is often defined to be a weak solution to the equation.
To illustrate an actual application of the Hahn–Banach theorem, we will now prove a result that follows almost entirely from the Hahn–Banach theorem.
Proposition — Suppose is a Hausdorff locally convex TVS over the field and is a vector subspace of that is TVS–isomorphic to for some set
Then is a closed and complemented vector subspace of
Since is a complete TVS so is and since any complete subset of a Hausdorff TVS is closed, is a closed subset of
Let be a TVS isomorphism, so that each is a continuous surjective linear functional.
By the Hahn–Banach theorem, we may extend each to a continuous linear functional on
Let so is a continuous linear surjection such that its restriction to is
Let which is a continuous linear map whose restriction to is where denotes the identity map on
This shows that is a continuous linear projection onto (that is, ).
Thus is complemented in and in the category of TVSs.
The above result may be used to show that every closed vector subspace of is complemented because any such space is either finite dimensional or else TVS–isomorphic to
There are now many other versions of the Hahn–Banach theorem. The general template for the various versions of the Hahn–Banach theorem presented in this article is as follows:
is a sublinear function (possibly a seminorm) on a vector space is a vector subspace of (possibly closed), and is a linear functional on satisfying on (and possibly some other conditions). One then concludes that there exists a linear extension of to such that on (possibly with additional properties).
Theorem — If is an absorbingdisk in a real or complex vector space and if be a linear functional defined on a vector subspace of such that on then there exists a linear functional on extending such that on
Theorem(Andenaes, 1970) — Let be a sublinear function on a real vector space let be a linear functional on a vector subspace of such that on and let be any subset of
Then there exists a linear functional on that extends satisfies on and is (pointwise) maximal on in the following sense: if is a linear functional on that extends and satisfies on then on implies on
If is a singleton set (where is some vector) and if is such a maximal dominated linear extension of then 
The following theorem of Mazur–Orlicz (1953) is equivalent to the Hahn–Banach theorem.
Mazur–Orlicz theorem — Let be a sublinear function on a real or complex vector space let be any set, and let and be any maps. The following statements are equivalent:
there exists a real-valued linear functional on such that on and on ;
for any finite sequence of non-negative real numbers, and any sequence of elements of
The following theorem characterizes when any scalar function on (not necessarily linear) has a continuous linear extension to all of
Theorem(The extension principle) — Let a scalar-valued function on a subset of a topological vector space
Then there exists a continuous linear functional on extending if and only if there exists a continuous seminorm on such that
for all positive integers and all finite sequences of scalars and elements of
Let X be a topological vector space. A vector subspace M of X has the extension property if any continuous linear functional on M can be extended to a continuous linear functional on X, and we say that X has the Hahn–Banach extension property (HBEP) if every vector subspace of X has the extension property.
The Hahn–Banach theorem guarantees that every Hausdorff locally convex space has the HBEP. For complete metrizable topological vector spaces there is a converse, due to Kalton: every complete metrizable TVS with the Hahn–Banach extension property is locally convex. On the other hand, a vector space X of uncountable dimension, endowed with the finest vector topology, then this is a topological vector spaces with the Hahn-Banach extension property that is neither locally convex nor metrizable.
A vector subspace M of a TVS X has the separation property if for every element of X such that there exists a continuous linear functional on X such that and for all Clearly, the continuous dual space of a TVS X separates points on X if and only if has the separation property. In 1992, Kakol proved that any infinite dimensional vector space X, there exist TVS-topologies on X that do not have the HBEP despite having enough continuous linear functionals for the continuous dual space to separate points on X. However, if X is a TVS then every vector subspace of X has the extension property if and only if every vector subspace of X has the separation property.
Relation to axiom of choice and other theoremsEdit
^This definition means, for instance, that and if then In fact, if is any linear extension of to then for In other words, every linear extension of to is of the form for some (unique)
^Explicitly, for any real number on if and only if Combined with the fact that it follows that the dominated linear extension of to is unique if and only if in which case this scalar will be the extension's values at Since every linear extension of to is of the form for some the bounds thus also limit the range of possible values (at ) that can be taken by any of 's dominated linear extensions. Specifically, if is any linear extension of satisfying then for every
The geometric idea of the above proof can be fully presented in the case of
First, define the simple-minded extension It doesn't work, since maybe . But it is a step in the right direction. is still convex, and Further, is identically zero on the x-axis. Thus we have reduced to the case of on the x-axis.
If on then we are done. Otherwise, pick some such that
The idea now is to perform a simultaneous bounding of on and such that on and on then defining would give the desired extension.
Since are on opposite sides of and at some point on by convexity of we must have on all points on Thus is finite.
Geometrically, this works because is a convex set that is disjoint from and thus must lie entirely on one side of
Define This satisfies on It remains to check the other side.
For all convexity implies that for all thus
Since during the proof, we only used convexity of , we see that the lemma remains true for merely convex
^If has real part then which proves that Substituting in for and using gives
^Let be any homogeneous scalar-valued map on (such as a linear functional) and let be any map that satisfies for all and unit length scalars (such as a seminorm). If then For the converse, assume and fix Let and pick any such that it remains to show Homogeneity of implies is real so that By assumption, and so that as desired.