Centering matrix
In mathematics and multivariate statistics, the centering matrix is a symmetric and idempotent matrix, which when multiplied with a vector has the same effect as subtracting the mean of the components of the vector from every component of that vector. == Definition == The centering matrix of size n is defined as the n-by-n matrix C n = I n − 1 n J n {\displaystyle C_{n}=I_{n}-{\tfrac {1}{n}}J_{n}} where I n {\displaystyle I_{n}\,} is the identity matrix of size n and J n {\displaystyle J_{n}} is an n-by-n matrix of all 1's.