Solution (source code)

= Solution

By the <rank-nullity theorem>, $\operatorname{nullity}A=n-\operatorname{rank}A\ge n-m>0$. Thus a first dependent column prefix exists. Minimality of $k$ makes the first $k-1$ columns independent, so $\operatorname{rank}A_{k-1}=k-1$. Adding one column cannot reduce this <rank>, while nonzero <nullity> of $A_k$ implies <rank> at most $k-1$. Hence
$$
\operatorname{rank}A_k=k-1,\qquad
\boxed{\operatorname{nullity}A_k=1.}
$$
For $k=1$ the earlier prefix is the zero-dimensional empty <matrix>, and the same argument applies.