If T is the image of S through a continuous function f, and two open sets separate two pieces of T, pull these back to find two open sets that separate S. If T is disconnected then so is S. Turning it around, the continuous image of a connected set is connected. A continuous function may blend components together, but it can't pull them apart.

Consider the closed unit interval from 0 to 1. Let this be the entire space, or embed it in n dimensional space if you prefer. If it is not connected then partition it into sets S and T. Assume, without loss of generality, that T contains 1. Let u be the upper bound of S. Now u is in S or in T. Suppose it is in S. Every open set containing S contains some of T, and S and T cannot be housed in disjoint open sets. similar trouble arises if u is in T, hence the unit interval is connected.

If h is a path's function, the path connects x and y if h(0) = x and h(1) = y. Clearly x is connected to itself, and path connectivity is symmetric and transitive. This is an equivalence relation. All the points in a path connected component can be connected to each other. A set, or space, is path connected if it consists of one path connected component.

The continuous image of a path is another path; just compose the functions. The image of a path connected component is another path connected component. Again, a continuous function may blend path components together, but it cannot pull them apart.

If two spaces are homeomorphic, connected components, or path connected components correspond 1-1. The number of components and path components is a topological invariant. Deform the space in any continuous reversible manner and you still have the same number of "pieces".

Next suppose the set is path connected, thus there is a path from the origin to the point 1,sin(1), and this path is restricted to our curve. Let f be the continuous function that implements the path, with f(0) = 0. Let t be the lower bound of the values of x for which f(x) is not 0. Everything below t maps to 0, and by continuity f(t) equals 0. The path just sits at the origin for a while, then moves on. We may as well remove the segment from 0 to t. Reparameterize the path so that f(x) is nonzero for values of x arbitrarily close to 0.

Remember that f is continuous at 0. Choose a disk of radius ½ about the origin, and consider the preimage of our sine curve, as it intersects this disk. In other words, we want the preimage of points on the sine curve that are never farther than ½ from the origin. The preimage is open, a union of base open sets, and one of these base open sets is [0,δ). This is a connected half open interval, and its image under the continuous function f is connected. The image cannot contain more than one of the arcs of the sin curve slicing through the open disc of radius ½, for that would not be a connected set. Yet the image contains points away from the origin, so it contains one of the arcs of the sin curve. This arc, and the origin, form a disconnected set, and that is a contradiction. The set is not path connected.

A similar definition exists for locally path connected. Every x,U has its open neighborhood Q in S such that Q is path connected.

With some imagination, you can build a connected set that is not locally connected. Let x be the pathological point. An open set containing x is disconnected, and x is in one of the two open components. this too is disconnected, and x is in one of the open components, and so on. So we're going to need a descending chain of open sets. Let U1 U2 U3 etc be such a chain, intersecting in the point x. Each Ui is open, and each Ui-Ui+1 is also open. Now include a connecting point c. The only open set containing c is the entire space. Thus the space is connected, even though it is not locally connected at x.

A variation of the above builds a path connected space that is not locally path connected. Each Ui is an open region in [0,1), and c is a point in the plane below the real line. Each Ui+1 is the left "piece" of Ui, crunching down to 0. Draw an arc from c to each Ui. I'll leave the details to you.

Of course a set with two components could be locally [path] connected, but not [path] connected.

Some connected sets aren't even locally path connected. The earlier curve sin(1/x) union the origin is not locally path connected; the origin always causes trouble. Note, if it were locally path connected, it would be path connected, as shown by the next theorem.

Let y be a point in U. Enclose y in an open set H in C, such that y is path connected to all of H. Since an arc can run from x to y to anything in H, H is in U. Therefore U is the union of open sets and is open, relative to C.

Let y be a point in C that is a limit point of U. Put an open set H around y such that H is path connected. Let z be common to H and U. Now x connects to z connects to y, and y is in U.

Since U contains its limit points it is closed. thus U is both open and closed in C. If U is not all of C, separate U and the rest of C in open sets. This contradicts the fact that C is connected. Therefore U is all of C, and C is path connected.

In n dimensional space, every open ball is path connected, and every open set is locally path connected, hence every open connected set is path connected.

If P is the product of finitely many spaces, it is locally path connected iff its components are locally path connected. Find path connected open sets in the components and put them together to build a path connected open set in P; or take the path connected base open set in P and find path connected open sets in the components.

Now ask whether P is connected. Suppose C, one of the component spaces, is not connected. Split C into open sets S and T and cross these sets with all other component spaces to partition P into two open sets, whence P is also disconnected. A similar argument applies when W, a subspace of P, has a projection that is disconnected in one of the components. Separate the projection in two open sets and cross with all other sets to find two disjoint open sets that separate W. If something casts two separate shadows, it must be in two pieces.

Conversely, assume all the component spaces are connected. I'm pretty sure P is connected, but I can't prove it right now. If you have a proof or counterexample please send it along.