Added functions to know the dimensions of a matrix