Consider the linear transformation define by
$$u(x) = \begin{bmatrix} x_1 - \bar{x} \\ x_2 - \bar{x} \\ \vdots \\ x_m - \bar{x} \end{bmatrix}, $$ for all $x \in R^m$, where $\bar{x} = (1/m) \sum x_i$.
Find the matrix $A$ for which $u(x) = Ax$, and then determine the dimension of the range and null spaces of $A$.
I found $A$ to be:
$$ \begin{bmatrix} (1-\frac{1}{m}) - \frac{1}{m} \cdots -\frac{1}{m}\\ -\frac{1}{m} + (1-\frac{1}{m}) \cdots - \frac{1}{m}\\ -\frac{1}{m} - \frac{1}{m} + (1-\frac{1}{m}) \end{bmatrix} \begin{bmatrix} x_1\\ x_2\\ \vdots\\ x_m \end{bmatrix} = I_m -\frac{1}{m}1_m 1'_m $$
I am stuck at how to find the dimension of the range because the book has the answer has $\dim(R) = m-1$ but I'm not seeing where they get that from matrix $A$.
Hint: The easiest approach is to start by finding the nullspace, which is the space of solutions to the equation $u(x) = 0$. From there, the rank-nullity theorem says that we have $$ \dim(\mathcal R(u)) = n - \dim(\mathcal N(u)). $$