If e is an idempotent (e2=e) in an associative algebra A, then the two-sided Peirce decomposition writes A as the direct sum of eAe, eA(1&minus;e), (1&minus;e)Ae, and (1&minus;e)A(1&minus;e).
More generally, if e1,..,en are commuting idempotents with sum 1, then A is the direct sum of the spaces eiAej for 1≤i,j≤n.