  We prove uniqueness of a decomposition of $1$ into indecomposable Hermitian
idempotents in an order of a finite-dimensional $\mathbb{Q}$-algebra with
positive involution, by generalising a result of Eichler on unique
decomposition of lattices. We use this result to prove that polarised abelian
varieties over any field admit a unique decomposition into indecomposable
polarised abelian subvarieties, a result previously shown by Debarre and Serre
with different methods and over algebraically closed fields. We prove that an
analogous uniqueness result holds true for arbitrary polarised integral Hodge
structures, and derive a consequence for their automorphism groups.
