Given an $n \times 1$ vector of outputs $y$, how does one prove that the total sum of squares $$S_\text{tot}=y^TB^TBy$$ where $B=(I-\vec1(\vec1^T\vec{1})^{-1}\vec{1}^T)$
Further, how does one show that $B$ is symmetric and idempotent?
Note: $\vec{1}$ is the vector of ones and $I$ is the $n \times n$ identity matrix.