X, Y are metric spaces and X is compact, f is a function mapping X into Y . Let ϕ : X ->

X x f(X) which is a subset of X x Y be defined by ϕ(x) = (x; f(x)): ϕ(X) is said to be the graph of f. Show that

f is continuous if and only if ϕ(X) is compact in the metric space X x Y with metric given by

d((x; y); (p; q)) = dX(x; p) + dY (y; q)