  In this paper, we introduce a method computing the primitive decomposition of
idempotents of any semisimple finite group algebra based on its matrix
representations and Wedderburn decomposition. Particularly, we use this method
to calculate the examples of the dihedral group algebras $\mathbb{C}[D_{2n}]$
and generalized quaternion group algebras $\mathbb{C}[Q_{4m}]$. Inspired by the
orthogonality relations of the character tables of these two families of
groups, we obtain two sets of trigonometric identities. Furthermore, a group
algebra isomorphism between $\mathbb{C}[D_{8}]$ and $\mathbb{C}[Q_{8}]$ is
described, under which the two complete sets of primitive orthogonal
idempotents of these two group algebras we find correspond to each other
bijectively.
