The Trace of a Matrix: A Dual and Tensor Perspective