For matrix_trace(A %*% B), uses the O(n^2) identity
trace(A %*% B) = sum(A * t(B)) instead of forming the
full matrix product.
For matrix_trace(A %*% B), uses the O(n^2) identity
trace(A %*% B) = sum(A * t(B)) instead of forming the
full matrix product.