Matrix Trace Calculator