If A is a $m\times n$ matrix and $M = (A \mid b)$ the augmented matrix for the linear system $Ax = b$.
Show that either
$(i) \operatorname{rank}A = \operatorname{rank}M$, or
$(ii)$ $\operatorname{rank}A = \operatorname{rank}M - 1$.
My attempt:
The rank of a matrix is the dimension of its range space. Let the column vectors of $A$ be $a_1,\ldots,a_n$. If $\text{rank}\;A = r$, then $r$ pivot columns of $A$ form a basis of the range space of $A$. The pivots columns are linearly independent. For the matrix $M = (A \mid b)$, there are only two cases. Case $(i)$: $b$ is in the range of $A$. Then the range space of $M$ is the same as the range space of $A$. Therefore $\operatorname{rank}M = \operatorname{rank}A$.
I am stuck on how to do case $(ii)$?