Now, suppose that is a decomposition as described above and that neither nor is empty. Thus we can choose and Now consider the decomposition of where and Since is the continuous image of a compact set it is also compact, and hence closed. Thus the closures in satisfy and Hence we deduce that So using the connectedness of we deduced that one of of must be empty, but this contradicts the assumption that both and are non-empty. Thus one of or must in fact be empty and this means that itself must be connected.
Remark: What you are showing here is that `pathwise connectedness implies connectedness'.