Matrix Representations of Trace Monoids