Implemented `toString` for `Matrix`.