Add more tests for matrix.