This is an excercise that I'm trying to solve:
Let $X$ be a Banach space and $M: X \rightarrow X$ a linear map. Prove that M is bounded if and only if there exists a set $ S \subset X'$(the dual space), dense in $X'$, such that for each $\ell \in S$ the functional $m_{\ell}$ defined by: $m_{\ell}(x)=\ell(Mx), x \in X$ is continuous in $X$.
I think that one can use the closed graph theorem once $m_{\ell}$ is extended to all of $X'$ but I'm not sure how this extension can be done. I know this: Since $S$ is dense in $X'$ there is for every epsilon an $\ell \in S$ such that $\parallel f - \ell \parallel_{X'} < \epsilon, \forall f \in X'$. I thought that boundedness off $f$ could be shown by this inequality: $|f(x)|=|f(x)-\ell(x) +\ell(x)| \leq |f(x)-\ell(x)| +| \ell(x)| $.
Here I thougth that it might be possible to use the uniform boundedness principle, but I'm not sure how. If somebody could help me I would be very thankful.
Your idea is right.
Let's use the closed graph theorem. Suppose $x_n\to 0$ and $Mx_n\to y$. We have to show that $y=0$, and for this we use Hahn-Banach: It suffices to show that for every $L\in X'$, $Ly=0$.
First, given $\ell\in S$, we have $\ell Mx_n\to \ell y$, but $\ell M=m_\ell$ is continuous by assumption and $x_n\to 0$, so $\ell Mx_n\to 0$ which implies $\ell y=0$.
Now given arbitrary $L\in X'$, take $\ell_i\in S$ with $\ell_i\to L$ (in your problem, in norm, but weak-$*$ convergence is enough), so $Ly=\lim\ell_i y=0$.