matrix, and transformation class (untested)