2D matrix helper library.