TITLE: Why can you turn clothing right-side-out?
QUESTION [609 upvotes]: My nephew was folding laundry, and turning the occasional shirt right-side-out. I showed him a  "trick" where I turned it right-side-out by pulling the whole thing through a sleeve instead of the bottom or collar of the shirt. He thought it was really cool (kids are easily amused, and so am I).
So he learned that you can turn a shirt or pants right-side-out by pulling the material through any hole, not just certain ones. I told him that even if there was a rip in the shirt, you could use that to turn it inside-out or right-side-out, and he was fascinated by this and asked "why?"
I don't really know the answer to this. Why is this the case? What if the sleeves of a long-sleeve shirt were sewn together at the cuff, creating a continuous tube from one sleeve to the other? Would you still be able to turn it right-side-out? Why? What properties must a garment have so that it can be turned inside-out and right-side-out?
Sorry if this is a lame question, but I've always wondered. I wouldn't even know what to google for, so that is why I am asking here.
If you know the answer to this, could you please put it into layman's terms?
Update: Wow, I really appreciate all the participation. This is a really pleasant community and I have learned a lot here. It seems that the answer is that you need at least one puncture in the garment through which to push or pull the fabric. It appears that you can have certain handles, although it's not usually practical with clothing due to necessary stretching.
Accepted (a while ago actually -- sorry for not updating sooner) Dan's answer because among the answers that I understand, it is the highest ranked by this community.

REPLY [187 votes]: I'm going to try to give a lighter-flavoured version of my previous answer.  I'd rather not edit the previous one anymore so here goes another response.  I want to make clear, this response is to you, not your 10-year-old nephew.  How you translate this response to any person depends more on you and that person than anything else. 
Take a look at the Wikipedia page for diffeomorphism. In particular,the lead image 
When I look at that image I see the standard Cartesian coordinate grid, but deformed a little. 

There's a "big theorem" in a subject called Manifold Theory and it's name is the "Isotopy Extension Theorem".  Moreover, it has a lot to do with these kinds of pictures. 
The isotopy extension theorem is roughly this construction: say you have some rubber, and it's sitting in a medium of liquid epoxy that's near-set.  Moreover, imagine the epoxy to be multi-coloured.  So when you move the rubber bit around in the epoxy, the epoxy will "track" the rubber object.  If your epoxy had a happy-face coloured into it originally, after you move the rubber, you'll see a deformed happy-face.  


So you get images that look a lot like mixed paint.  Stir various blotches of paint, and the paint gets distorted.  The more you stir, the more it mixes and it gets harder and harder to see the original image.  The important thing is that the mixed paint is something of a "record" of how you moved your rubber object.  And if your motion of the rubber object returns it to its initial position, there is a function
$$ f : X \to X $$
where $X$ is all positions outside your rubber object.  Given $x \in X$ you can ask where the particle of paint at position $x$ went after the mixing, and call that position $f(x)$. 
All my talk about fibre bundles and homotopy-groups in the previous response was a "high level" encoding of the above idea.  An intermediate step in the formalization of this idea is the solution of an ordinary differential equation, and that differential equation is essentially the "paint-mixing idea" above, in case you want to look at this subject in more detail later. 
So what does this mean?  A motion of an object from an initial position back to the initial position gives you an idea of how to "mix paint" outside the object.  Or said another way, it gives you an Automorphism of the complement, in our case that's a 1-1, continuous bijective function between 3-dimensional space without the garment and itself. 
You may find it odd but mathematicians have been studying "paint mixing" in all kinds of mathematical objects, including "the space outside of garments" and far more bizarre objects for well over 100 years.  This is the subject of dynamical systems.  "Garment complements" are a very special case, as these are subsets of 3-dimensional euclidean space and so they're 3-manifolds.  Over the past 40 years our understanding of 3-manifolds has changed and seriously altered our understanding of things.  To give you a sense for what this understanding is, let's start with the basics.  3-manifolds are things that on small scales look just like "standard" 3-dimensional Euclidean space.   So 3-manifolds are an instance of "the flat earth problem".  Think about the idea that maybe the earth is like a flat sheet of paper that goes on forever.  Some people (apparently) believed this at some point. And superficially, as an idea, it's got some things going for it.  The evidence that the earth isn't flat requires some build-up. 

Anyhow, so 3-manifolds are the next step.  Maybe all space isn't flat in some sense.  That's a tricky concept to make sense of as space isn't "in" anything -- basically by definition whatever space is in we'd call space, no?  Strangely, it's not this simple.  A guy named Gauss discovered that there is a way to make sense of space being non-flat without space sitting in something larger. Meaning curvature is a relative thing, not something judged by some exterior absolute standard.  This idea was a revelation and spawned the idea of an abstract manifold.  To summarize the notion, here is a little thought experiment. 
Imagine a rocket with a rope attached to its tail, the other end of the rope fixed to the earth.  The rocket takes off and goes straight away from the earth.  Years later, the rocket returns from some other direction, and we grab both loose ends of the rope and pull.  We pull and pull, and soon the rope is tight.  And the rope doesn't move, it's taut. as if it was stuck to something.  But the rope isn't touching anything except your hands.  Of course you can't see all the rope at one time as the rope is tracing out the (very long) path of the rocket. But if you climb along the rope, after years you can verify: it's finite in length, it's not touching anything except where it's pinned-down on the earth.  And it can't be pulled in.  
This is what a topologist might call a hole in the universe.  We have abstract conceptions of these types of objects ("holes in the universe") but by their nature they're not terribly easy to visualize -- not impossible either, but it takes practice and some training.
In the 1970's by the work of many mathematicians we started to achieve an understanding of what we expected 3-manifolds to be like.  In particular we had procedures to construct them all, and a rough idea of how many varieties of them there should be.  The conjectural description of them was called the geometrization conjecture. It was a revelation in its day, since it implied that many of our traditional notions of geometry from studying surfaces in 3-dimensional space translate to the description of all 3-dimensional manifolds.   The geometriztion conjecture was recently proven in 2002. 
The upshot of this theory is that in some sense 3-dimensional manifolds "crystalize" and break apart in certain standard ways.  This forces any kind of dynamics on a 3-manifold (like "paint mixing outside of a garment") to respect that crystalization. 
So how do I find a garment you can't turn inside-out?  I manufacture one so that its exterior crystalizes in a way I understand.  In particular I find a complement that won't allow for this kind of turning inside-out.  The fact that these things exist is rather delicate and takes work to see.  So it's not particularly easy to explain the proof.  But that's the essential idea. 
Edit: To say a tad more, there is a certain way in which this "crystalization" can be extremely beautiful.  One of the simplest types of crystalizations happens when you're dealing with a finite-volume hyperbolic manifold.  This happens more often than you might imagine -- and it's the key idea working in the example in my previous response.  The decomposition in this case is very special as there's something called the "Epstein-Penner decomposition" which gives a canonical way to cut the complement into convex polytopes.  Things like tetrahedra, octahedra, icosahedra, etc, very standard objects.  So understanding the dynamics of "garments" frequently gets turned into (ie the problem "reduces to") the understanding of the geometry of convex polytopes -- the kind of things Euclid was very comfortable with.  In particular there's software called "SnapPea" which allows for rather easy computations of these things. 

(source: utk.edu) 

Images taken from Morwen Thistlethwaite's webpage.  These are images of the closely-related notion of a "Dirichlet domain". 
Here is an image of the Dirichlet domain for the complement of $8_{17}$, the key idea in the construction of my previous post.
Dirichlet domain for the complement of $8_{17}$
Technically, this in the Poincare model for hyperbolic space, which gives it the jagged/curvy appearance.