It's both. Since $f$ is a functional, $f(e_k)$ is a scalar (assuming $e_k$ is a vector). So, $f(e_k) e_k$ is a vector (it's the vector $e_k$ scaled by the scalar $f(e_k)$), and according to linearity,
$$f(\color{red}{f(e_k)}e_k) = \color{red}{f(e_k)}f(e_k) = f(e_k)^2.$$
It's both. Since $f$ is a functional, $f(e_k)$ is a scalar (assuming $e_k$ is a vector). So, $f(e_k) e_k$ is a vector (it's the vector $e_k$ scaled by the scalar $f(e_k)$), and according to linearity, $$f(\color{red}{f(e_k)}e_k) = \color{red}{f(e_k)}f(e_k) = f(e_k)^2.$$