Changed to 'getDimension'.
Since we deal with square matrix, I only set this function to get the size information of the matrix.