Let $\mathbb{Z}_m = \mathbb{Z}/m\mathbb{Z}$. Let $A$ be an $k \times n$ matrix. Let $f: \mathbb{Z}_m^n \to \mathbb{Z}_m^k$ be a linear map defined by $f(x) = Ax$, $x \in \mathbb{Z}_m^n$. Are there some references about the condition such that $|\ker(f)|=m^k$ for some positive integer $k$?

For example, the kernel of the map $f: \mathbb{Z}_4 \to \mathbb{Z}_4$ given by $f(x) = 2x$ is $\ker(f) = \{0, 2\}$. Therefore $|\ker(f)|$ is not a positive integer power of $4$.

Let $f: \mathbb{Z}_m^4 \to \mathbb{Z}_m^2$ be a linear map given by $f(x) = (2x_1-x_3-x_4, x_2-x_3-x_4)^T$. In this case, $|\ker(f)| = m^2$. Thank you very much.