Explicit example of Hahn-Banach theorem on the finite dimensional space $\mathbb^2$?

In case of $(\mathbb^2, \|\cdot\|_2)$ , things are quite simple.

Let $U \le \mathbb^2$ be a subspace and $\phi : U \to \mathbb$ a linear functional. By the Riesz representation theorem, there exists $a \in U$ such that $\phi(x) = \langle x, a\rangle, \forall x \in U$ . Then the linear functional $\psi : \mathbb^2 \to \mathbb$ given by the same formula $\psi(x) = \langle x, a\rangle, \forall x \in \mathbb^2$ is the unique Hahn-Banach extension of $\phi$ .

Namely, clearly $\psi$ extends $\phi$ and $\|\phi\| = \|a\|_2 = \|\psi\|$ so $\psi$ is a Hahn-Banach extension of $\phi$ .

Let $\zeta : \mathbb^2 \to \mathbb$ be another Hahn-Banach extension of $\phi$ . By the Riesz representation theorem, there exists $b \in \mathbb^2$ such that $\zeta(x) = \langle x, b\rangle,\forall x \in \mathbb^2$ . Since $\zeta$ extends $\phi$ , we have

$$\langle x, a\rangle = \phi(x) = \zeta(x) = \langle x, b\rangle, \forall x \in U \implies \langle x, a - b\rangle = 0, \forall x \in U \implies a - b \perp U$$

$$\|a\|_2^2 + \|b - a\|_2^2 = \|b\|_2^2 = \|\zeta\|^2 = \|\phi\|^2 = \|a\|_2^2 \implies b - a = 0 \implies a = b$$

Therefore $\zeta = \phi$ .

This explicit construction is in fact always possible when dealing with a Hilbert space, which $(\mathbb^2, \|\cdot\|_2)$ is an example of.

For an explicit example of the above discussion, consider the subspace $Y = \^2 : x \in \mathbb\> \le \mathbb^2$ and the linear functional $\phi :Y \to \mathbb$ given by $\phi(x,y) = x$ .

An orthonormal basis for $Y$ is $\left\>(1,2)\right\>$ so the orthogonal projection $P_Y$ onto $Y$ is given by

$$P_Y(x,y) = \left\langle (x,y),\frac1>(1,2)\right\rangle \frac1>(1,2) = \left(\frac5, \frac5\right)$$

Now notice that for all $(x,y) \in Y$ we have

$$\phi(x,y) = x = \langle (x,y), (1,0)\rangle = \langle (x,y), P_Y(1,0)\rangle = \left\langle (x,y), \left(\frac15, \frac25\right)\right\rangle$$

Now the above discussion implies that the unique Hahn-Banach extension of $\phi$ is given by $\psi : \mathbb^2 \to \mathbb$ defined as

$$\psi(x,y) = \left\langle (x,y), \left(\frac15, \frac25\right)\right\rangle = \frac5 + \frac5, \quad\forall (x,y)\in\mathbb^2$$