This is an if and only if. Let

denote the graph, note then that
)
where

is the canonical projection onto the first coordinate--why does this tell us

's connected. Conversely, if

is connected then
)
where
))
--why is

continuous and why does this tell us that

is connected?