Returns the trace of the product of two matrices.
TraceProduct(A, B, b.is.symmetric = FALSE)The first matrix in the product.
The second matrix in the product.
Logical. A TRUE value indicates that
B is a symmetric matrix. A slight computational savings is
possible if B is symmetric.
Returns a number equivalent to sum(diag(A %*% B)).