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.

$$C_n = I_n - \tfrac{1}n J_n$$