How can I write $(\mathbb{Z}_5)^n$ as a union of finite hyperplanes Consider $V=(\mathbb{Z}_5)^n$ a vector space over the field $F=\mathbb{Z}_5$, How can I write $(\mathbb{Z}_5)^n$ as a union of finite hyperplanes? I am just looking for an example of how I can do it.
I guess it is possible for the fact that $F$ is finite and it implies that $V$ is also finite.
 A: Well, for example, to write the $2$-dimensional plane as a union of lines, we consider the collection of lines given by their "slope":
$$\begin{align*}
L_0 &= \langle (1,0)\rangle\\
L_1 &= \langle (1,1)\rangle\\
L_2 &=\langle (1,2)\rangle\\
L_3 &=\langle (1,3)\rangle\\
L_4 &=\langle (1,4)\rangle\\
L_{\infty} &= \langle (0,1)\rangle.
\end{align*}$$
Given $(a,b)\in (\mathbb{Z}_5)^2$, if $a=0$ then $(a,b)\in L_{\infty}$; and if $a\neq 0$, then $(a,b)\in L_{a^{-1}b}$.
In $3$-dimensional space, you could do the equivalent of looking at the planes defined by their "normal lines", after enumerating the lines through the origin; the latter correspond to points in projective $2$-space, so they are of the form $[1:a:b]$ with $a,b\in F$, or $[0:1:0]$, or $[0:0:1]$.
A: I think you'd want a union affine hyperplanes, right ? The image here will probably help: https://en.wikipedia.org/wiki/Linear_subspace
Notice that any $n$-dimensional subspace of $(\mathbb{Z}/p\mathbb{Z})^d$ has $p^d$ elements. Then you can always express elements of $(\mathbb{Z}/p\mathbb{Z})^d$ as a linear combination of an element of a subspace $F$ isomorphic to $(\mathbb{Z}/p\mathbb{Z})^{d-1}$, and an element of $F^\perp$ the orthogonal complement to that subspace, which is isomorphic to $(\mathbb{Z}/p\mathbb{Z})$.
For this, your union should then be
$$ \bigcup_{v \in F^\perp} F \; + \; v$$
where each $F+v$ is an affine hyperplane (or just a hyperplane when $v$ is the null vector), and all $F+v$ are parallel to each other.
