# Lemma for Lagrange multiplier theorem

This is the problem 16 of Chapter 5 of Optimization be the vector space method, it is later used to prove the existence of Lagrange multipliers in equality constraint problems.

Let $g_1,g_2,\ldots, g_n$ be linearly independent linear functionals on a vector space $X$. Let $f$ be another linear functional such that for every $x$ satisfying $g_i(x)=0, i = 1,2,\ldots,n$ ,we have $f(x)=0$, show that there are constants $\lambda_1, \lambda_2, \ldots, \lambda_n$ such that $f = \sum_{i=1}^n\lambda_ig_i$.

I know it's supposed to use Hahn-Banach theorem, but I failed to figure out how.

I would construct vectors $x_1, \ldots, x_n$ with $g_i(x_j) = \delta_{ij}$. Then, for $x \in X$ you have $g_i(x + \alpha_1 x_1 + \ldots \alpha_n x_n) = 0$ for all $i$ and suitable $\alpha_i$. This can be used to determine $f(x)$.