<p>In this paper, we introduce a method for computing the primitive decomposition of idempotents in any semisimple finite group algebra, utilizing 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 group algebras correspond bijectively.</p>