All matrices have real entries, products are matrix products, (⋅)⊤ is the transpose, and tr is the trace, so that tr(M)=∑iMii for a square matrix M.
Claim 1. The diagonal entries of the entrywise combination aM+bN are aMii+bNii, so
tr(aM+bN)=i=1∑p(aMii+bNii)=ai=1∑pMii+bi=1∑pNii=atr(M)+btr(N),
by the field axioms for the real numbers applied to finite sums.
Claim 2. By the definition of the transpose, (M⊤)ii=Mii for every i, so the two traces are sums of the same numbers.
Claim 3. By the definition of the matrix product, (UV)ii=∑j=1qUijVji, so
tr(UV)=i=1∑pj=1∑qUijVji.
Likewise (VU)jj=∑i=1pVjiUij, so tr(VU)=∑j=1q∑i=1pVjiUij. The two double sums have the same finitely many terms UijVji and hence are equal, since finite sums of real numbers may be reordered by commutativity and associativity of addition.
Claim 4. By the definitions of transpose and product, (U⊤V)jj=∑i=1p(U⊤)jiVij=∑i=1pUijVij, so
tr(U⊤V)=j=1∑qi=1∑pUijVij=i=1∑pj=1∑qUijVij,
again by reordering a finite sum. Similarly (UV⊤)ii=∑j=1qUij(V⊤)ji=∑j=1qUijVij, so tr(UV⊤) equals the same double sum. □