It is proved that the discriminant of n x n real symmetric matrices can be written as a sum of squares, where the number of summands equals the dimension of the space of n-variable spherical harmonics of degree n. The representation theory of the orthogonal group is applied to express the discriminant of 3 x 3 real symmetric matrices as a sum of five squares and to show that it cannot be written as the sum of less than five squares. It is proved that the discriminant of 4 x 4 real symmetric matrices can be written as a sum of seven squares. These improve results of Kummer from 1843 and Borchardt from 1846. (C) 2010 Wiley Periodicals, Inc.