Matrix tests.