Add toString methods to the matrix classes.