Function that retrieves a value from a particular matrix entry.
Example M.get_element(i,j) gets the value in M(i,j).