Add 3x3 matrix scaling and test functions.