Let $X$ be a normed linear space. Show that $X$ is separable if and only if there is a compact subset $K$ of $X$ for which $\overline{ \text{span}\{K\}}= X$
I can't figure out how to solve this exercise:
My first problem is: how to control cardinality of $\overline{ \text{span}\{K\}}$? According to the definition of separable space it has to be countable. But if the field is $\mathbb{R}$ (or $\mathbb{C}$) |$ \text{span}\{K\}$| is strictly greater than |$ \mathbb{N}$| because the span contains finite linear combinations of elements of $K$ and $K$ has at least one element.
Maybe i'm not getting the point of this exercise (Real Analysis - Royden, $4$ ed pag. $262$ n. $28$) or missing some basic properties of compact sets in normed linear spaces.
Can someone help me? Thanks in advance