In the setting $Y = X\beta + \epsilon$, we know the best unbiased linear estimate of $\beta$ is $\hat{\beta}=(X^TX)^{-1}X^TY$, where $X$ is a fixed (full-rank) design matrix. Now, supposing that I have a function $p$ that rearranges the rows from ${1, 2, 3, ..., n}$ to $p(1), p(2), p(3), ..., p(n)$, I'm mostly sure that the $\hat{\beta}$ shouldn't change. How can I show this?
As I write this, I think one can do:
There exists some matrix $A$ that rearranges the rows equivalently to $p$. So we have $$ ((AX)^T(AX))^{-1}(AX)^T(AY) = (X^T(A^TA)X)^{-1}X^T(A^TA)Y=(X^TX)^{-1}X^TY $$
Is that right? Also is there a geometric argument for this?