Initial dense 2d matrix implementation.