Integer vector space mapping problem from $\mathbb{Z}^3$ to $\mathbb{Z}^2$. (to do with hex grids) I have two sets, let's call them $A$ and $B$:
$A$ is a subset of $\mathbb{Z}^3$, such that for each element $(a_1, a_2, a_3)$:
$$a_1 + a_2 + a_3 = 0$$
$B$ is $\mathbb{Z}^2$ (possibly only a subset, not sure)
There is a function $L$ from domain $A$ to range $B$, such that all the following is true:
$$L(0,0,0) = (0,0)$$
$$L(1,0,-1) = (2,0)$$
$$L(0,-1,1) = (-1,-3)$$
$$L(-1,1,0) = (-1, 3)$$
and $L$ is a vector space mapping (or whatever the correct term is) as in:

*

*$\forall k \in \mathbb{Z}: kL(a_1, a_2, a_3) = L(ka_1, ka_2, ka_3)$; and


*$\forall x_i, y_i \in \mathbb{Z} : L(x_1, x_2, x_3) + L(y_1, y_2, y_3) = L(x_1 + y_1, x_2 + y_2, x_3 + y_3)$
In $L(a_1, a_2, a_3) = (b_1, b_2)$, what is $b_1$ and $b_2$ in terms of $a_1$, $a_2$ and $a_3$ ?
Any ideas?  It looks like it should be easy but I'm having a hard time with it for some reason.
(I derived the problem in relation to using cube coordinates on a hex grid, and trying to translate the cube coordinates into euclidean 2D coordinates.)
 A: Let
$$v_1 = (1,0,−1) \qquad v_2 = (0,−1,1) \qquad v_3 = (−1,1,0) $$
and
$$ w_1 = (2,0) \qquad w_2 = (−1,-3) \qquad w_3 = (−1,3) $$
Then $L(v_i) = w_i$ and actually $v_3=-v_1-v_2$, and as $L$ is linear:
$$w_3 = L(v_3) = -L(v_1)-L(v_2) = -w_1-w_2$$
which means that the equations with index 3 don't add any information. All we know is already expressed in indices 1 and 2.
Moreover $v_1, v_2 \in A$ because the sum over their coordinates equals zero.  And $v_1$ and $v_2$ are linearly independent and span $A$:
$$A=\operatorname{span}\{v_1,v_2\}$$
and more specifically, if $a=(a_1,a_2,a_3) \in A$ then
$$a=a_1v_1 -a_2 v_2$$
The 3rd component of $a$ is thus $a_3 = -a_1 -a_2$ so that actually $a_1+a_2+a_3 = 0$.
The image of $a\in A$ under $L$ is therefore:
$$L(a) = L(a_1v_1-a_2v_2) = a_1L(v_1)-a_2L(v_2) = a_1w_1 - a_2w_2$$
As $w_1$ and $w_2$ are independent, $B$ is 2-dimensional.  But $B\neq \Bbb Z^2$ because both $w_1$ and $w_2$ have an even sum of their coordinates, and thus any element of $w_1\Bbb Z + w_2\Bbb Z$ has an even sum of coordinates.  In particular $(1,0)\notin B$.
If $A$ and $B$ where vector spaces over $\Bbb R$ instead of $\Bbb Z$-modules, then $(1,0)\in B$ as
$$L(\tfrac12 v_1) = \tfrac12L(v_1) = \tfrac12 w_1 = \tfrac12(2,0) =  (1,0)$$
