We introduce an algebraic method to study local stability in the Newtonian $n$-body problem when certain symmetries are present. We use representation theory of groups to simplify the calculations of certain eigenvalue problems. The method should be applicable in many cases, we give two main examples here: the square central configurations with four equal masses, and the equilateral triangular configurations with three equal masses plus an additional mass of arbitrary size at the center. We explicitly found the eigenvalues of certain 8x8 Hessians in these examples, with only some simple calculations of traces. We also studied the local stability properties of corresponding relative equilibria in the four-body problems.