example of a nonempty subset is closed under scalar multiplication but not a subspace

The cross.

(More precisely, the union of the $x$-axis and $y$-axis.)


Take the set of all points sitting on either the x or y axis, i.e. $\left\{(x, y) | x = 0 \mbox{ or } y = 0\right\}$. This is clearly a subset of $\mathbb{R}^2$ that is closed under scalar multiplication (because $(x, 0) \times c = (cx, 0)$ and similarly for $(0, y)$), but it is not closed under addition (because $(1, 0) + (0, 1) = (1, 1)$ is not in the set), and hence it is not a subspace.


Take $\mathbb{R}^2 \setminus (\{(0,y) | y \neq 0 \} \cup \{(x,0) | x \neq 0 \})$.