Given a $n \times n$ matrix $A = \begin{bmatrix} a_1 & a_2 & \dots & a_n \end{bmatrix}$, where each $a_i$ are columns of $A$ for $i = 1 \dots n$.
Column mean is calculated by $\bar{a} =(a_1 + a_2 + \dots + a_n)/n$.
Then, define:
$B = \begin{bmatrix} a_1 - \bar{a} & a_2 - \bar{a}& \dots & a_n - \bar{a} \end{bmatrix}$.
May I know why the rank$(B)$ is $n-1$?
I did try many times with computer program to prove but I want a proof of this.
Thanks in advance.
We observe that the sum of all columns in $\mathbf{B}$ is equal to zero. That means one column can be rewritten as a linear combination of all the others. Hence the rank is at most $n-1$.