TITLE: The Hahn-Banach theorem for Hilbert spaces follows from Riesz's theorem
QUESTION [9 upvotes]: How does the Hahn-Banach theorem for Hilbert spaces follow from Riesz's representation theorem?

REPLY [14 votes]: Yes. Given a subspace $M$ of a Hilbert space $H$, and a continuous linear functional $f : M \to \mathbb{C}$, you can extend $f$ to a unique continuous linear functional $g : \overline{M} \to \mathbb{C}$.
Now, $\overline{M}$ is a Hilbert space, to there is $y \in \overline{M}$ such that
$$
g(x) = \langle x, y\rangle
$$
for all $x\in \overline{M}$.
Now write $h : H \to \mathbb{C}$ to be $x \mapsto \langle x, y\rangle$ and this extends $f$.