I think I understood it.
sum(qi'T*R*qi) = sum(Trace(qi'T*R*qi)) = sum(Trace(Rqiqi'T)) = Trace(sum(Rqiqi'T))
I'm reading the following paper:
"Least-Squares Fitting of Two 3-D Point Sets"
by Arun, Huang, and Bolstein
IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 9, No. 5, September 1987, pages 698-700
I can't understand the equation 14 of this paper, where Trace is used.
Thank you in advance!