In the Roman's book (Advanced Linear Algebra) he defines the direct product of a family of vector spaves over $\mathbb{F}$ as follows:
Definition: Let $\mathcal{F}=\{V_{i}| i\in K\}$ be any family of vector spaces over $\mathbb{F}$. The direct product of $\mathcal{F}$ is the vector space $\prod_{i\in K}V_{i}=\{f:K\rightarrow\cup_{{i\in K}} V_{i}|f(i)\in V_{i}\}$ thought of as a subspace of the vector space of all functions from $K$ to $\cup_{{i\in K}}V_{i}$. ( Here $K$ is a set of indexes).
I don't understand how $V=\{f:K\rightarrow \cup_{{i\in K}}V_{i}\}$ is a vector space over the field $\mathbb{F}$. Is the set $\cup_{{i\in K}}V_{i}$ a vector space over $\mathbb{F}$? I can't see how.
Thanks for your help.