Closed-graph criterion with compact codomain
= Closed-graph criterion with compact codomain
If $X,Y$ are metric spaces, $Y$ is compact, and the graph of $f:X\to Y$ is closed, then $f$ is continuous. Any failure of sequential continuity gives a subsequence whose images stay away from the proposed limit; compactness produces a convergent image subsequence, and closedness of the graph forces its limit to be the correct value.