In this paper we study the
action of SO(n) on m-tuples of n×n matrices by simultaneous conjugation. We show
that the polynomial invariants are generated by traces and polarized Pfaffians of
skewsymmetric projections. We also discuss the same problem for other classical
groups.