Finding the finest simultaneous block diagonalization of multiple matrices by sequentially exploring invariant subspaces under matrix multiplications. Applications include the efficient analysis of arbitrary synchronization patterns in complex networks.