TITLE: Uniqueness of the direct product decomposition of finite groups
QUESTION [8 upvotes]: A group $G$ is  indecomposable  if:  $G = H \times K \Rightarrow \{  H,K \} = \{1, G \}$.
Then, a finite group $G$ decomposes into a direct product of indecomposable groups:  $G = \prod_i G_i$.  
Question: Is this decomposition unique (up to permutation and isomorphism)?

REPLY [10 votes]: Yes, the decomposition is unique for finite groups.  This is a consequence of the Remak-Krull-Schmidt Theorem, which applies to groups that satisfy both the minimum and maximum conditions on normal subgroups.  Since finite groups certainly have these properties, R-K-S applies here.