test for immutable matrix