Assume that the graph is compact. Assume for contradiction that is discontinuous at . Then there exists an and a sequence such that converges to . Look at the sequence . Since the graph is compact it has a subsequence which converges to a point . So converges to . But converges to which is a contradiction. This implies that is continuous and onto.