$T:\Bbb Z_5^n \to\Bbb Z_5^3$, $n>1$. Prove that if $T$ is onto and $\ker T$ contains 5 vectors then $n=4$ 
$T:\Bbb Z_5^n \to \Bbb Z_5^3$, $n>1$. Prove that if $T$ is onto and $\ker T$ contains 5 vectors then $n=4$

This is supposed to be simple and the solution in the textbook is just a line but I couldn't  understand a certain part.
since it is onto we know that $dimImT=3$ and according to the dimension theorem $dimkerT=n-dimImT$ from here we get $dimkerT=n-3$ the following part is what I did not understand I will quote the textbook "on the other hand $dimkerT=1$ because it has 5 vectors therefore $n=4$ I cannot understand how they got to $dimkerT=1$ because it contains 5 vectors? I know this is a simple question and there isn't much to show on what I tried but I do not seem to understand it.
Thank you!

Since $T$ is onto, $n-\dim\ker T=3$, that is, $\dim\ker T=n-3$. Since $\ker T$ contain only 5 vectors we get that $\dim\ker T=1$, so $n=4$.
