I am trying to understand the definition of homomorphism of $I$-graded vector spaces from the Wikipedia page, where $I$ is any set. According to this web page, a homomorphism of two $I$-graded vector spaces $V = \bigoplus_{i \in I} V_i$ and $W = \bigoplus_{i \in I} W_i$ is a linear map $f: V \to W$ such that it preserves the grading of homogeneous elements; i.e., $f(V_i) \subseteq W_i \, \forall i \in I$.
My Questions
What is the 'grading' of a homogeneous element $v_i \in V_i$? How is that related to the condition given above: $f(V_i) \subseteq W_i \, \forall i \in I$.
Can you please provide a simple example of a linear map $h: V \to W$ that does not preserve the grading; i.e., violet the condition above?
The grading of $v_i\in V_i$ is $i$.
For a simple example, consider the $\mathbb Z_2$-graded space $\mathbb R^2$. It has a basis $v_0=(1,0)$ and $v_1=(0,1)$, where $v_0$ has grading $0$ and $v_1$ has grading $1$. Consider a map from the space to itself by rotation by $\pi/4$, so $v_0\mapsto \frac1{\sqrt2}(v_0+v_1)$ and $v_1\mapsto \frac1{\sqrt2}(-v_0+v_1)$. This doesn't preserve the grading, as the space $V_0:=\text{span}_{\mathbb R}v_0$ is not mapped into a subspace of $V_0$. In fact the only maps of the space to itself that are $\mathbb Z_2$-graded homomorphisms are linear maps that multiply $v_0$ and $v_1$ by constants.