Let $f(x)=a_0x+a_1x^q+... a_{k-1}x^{q^{k-1}}$ be a nonzero polynomial for a prime $q$. It is easy to observe that $$f:F_{q^n}\to F_{q^n}$$
a linear function. I want to show that $f$ has at most $k-1$ roots to be able to say that $\text{rank} (f)\geq n-k+1$. But I could not show it. Any help would be appriciated.