Conjugation covariants of matrices are applied to study the real algebraic variety consisting of complex Hermitian matrices with a bounded number of distinct eigenvalues. A minimal generating system of the vanishing ideal of degenerate three by three Hermitian matrices is given, and the structure of the corresponding coordinate ring as a module over the special unitary group is determined. The method applies also for degenerate real symmetric three by three matrices. For arbitrary n partial information on the minimal degree component of the vanishing ideal of the variety of n × n Hermitian matrices with a bounded number of eigenvalues is obtained, and some known results on sum of squares presentations of subdiscriminants of real symmetric matrices are extended to the case of complex Hermitian matrices. MSC: Primary: 13F20, 13A50, 14P05; Secondary: 15A15, 15A72, 20G05, 22E47