Proposition
Let xx∈Rn×1 then we can construct a symmetric and idempotent matrix that provides deviations from the mean for a vector of inputs.
This matrix takes is the form:
M0=I−nιιιι′
where ιι is a vectors of 1 in RN.
Proof
Symmetric
M0′=(I−nιιιι′)′=I′−n(ιιιι′)′=I−nιι′′ιι′=I−nιιιι′=M0
Idempotence
M0M0=(I−nιιιι′)(I−nιιιι′)=I(I−nιιιι′)−nιιιι′(I−nιιιι′)=(I−nιιιι′)−nιιιι′+nιιιι′=I−nιιιι′
Deviations From the Mean
M0xx=(I−nιιιι′)xx=xx−⎣⎡ιι′xx/nιι′xx/n⋮ιι′xx/n⎦⎤=xx−xxˉ=xx¨