Solution
= Solution
The $j$th column of $B$ is
$$
c_j=v+aj\mathbf1,
\qquad
v=(1^2+b,2^2+b,\ldots,n^2+b)^T.
$$
Thus the image is contained in $\operatorname{span}\{v,\mathbf1\}$. Since $n>1$, $v$ is not constant; since $m>1$ and $a\ne0$, two columns have a nonzero constant difference. The two spanning <vectors> therefore both lie in the image, so $\operatorname{rank}B=2$. By <rank-nullity theorem>,
$$
\boxed{\operatorname{nullity}B=m-2}.
$$