## Archive for the 'topology' category

For some reason, lately I've been seeing a bunch of mentions of Banach Tarski. B-T is a fascinating case of both how counter-intuitive math can be, and also how profoundly people can misunderstand things.

For those who aren't familiar, Banach-Tarski refers to a topological/measure theory paradox. There are several variations on it, all of which are equivalent.

The simplest one is this: Suppose you have a sphere. You can take that sphere, and slice it into a finite number of pieces. Then you can take those pieces, and re-assemble them so that, without any gaps, you now have two spheres of the exact same size as the original.

Alternatively, it can be formulated so that you can take a sphere, slice it into a finite number of pieces, and then re-assemble those pieces into a bigger sphere.

This sure as heck seems wrong. It's been cited as a reason to reject the axiom of choice, because the proof that you can do this relies on choice. It's been cited by crackpots like EE Escultura as a reason for rejecting the theory of real numbers. And there are lots of attempts to explain why it works. For example, there's one here that tries to explain it in terms of density. There's a very cool visualization of it here, which tries to make sense of it by showing it in the hyperbolic plane. Personally, most of the attempts to explain it intuitively drive me crazy. One one level, intuitively, it doesn't, and can't make sense. But on another level, it's actually pretty simple. No matter how hard you try, you're never going to make the idea of turning a finite-sized object into a larger finite-sized object make sense. But on another level, once you think about infinite sets - well, it's no problem.

The thing is, when you think about it carefully, it's not really all that odd. It's counterintuitive, but it's not nearly as crazy as it sounds. What you need to remember is that we're talking about a mathematical sphere - that is, an infinite collection of points in a space with a particular set of topological and measure relations.

Here's an equivalent thing, which is a bit simpler to think about:

Take a line segment. How many points are in it? It's infinite. So, from that infinite set, remove an infinite set of points. How many points are left? It's still infinite. Now you've got two infinite sets of the same size. So, now you can use one of the sets to create the original line segment, and you can use the second one to create a second, identical line segment.

Still counterintuitive, but slightly easier.

How about this? Take the set of all natural numbers. Divide it into two sets: the set of even naturals, and the set of odd naturals. Now you have two infinite sets,
the set {0, 2, 4, 6, 8, ...}, and the set {1, 3, 5, 7, 9, ...}. The size of both of those sets is the ω - which is also the size of the original set you started with.

Now take the set of even numbers, and map it so that for any given value i, f(i) = i/2. Now you've got a copy of the set of natural numbers. Take the set of odd naturals, and map them with g(i) = (i-1)/2. Now you've got a second copy of the set of natural numbers. So you've created two identical copies of the set of natural numbers out of the original set of natural numbers.

The problem with Banach-Tarski is that we tend to think of it less in mathematical terms, and more in concrete terms. It's often described as something like "You can slice up an orange, and then re-assemble it into two identical oranges". Or "you can cut a baseball into pieces, and re-assemble it into a basketball." Those are both obviously ridiculous. But they're ridiculous because they violate one of our instinct that derives from the conservation of mass. You can't turn one apple into two apples: there's only a specific, finite amount of stuff in an apple, and you can't turn it into two apples that are identical to the original.

But math doesn't have to follow conservation of mass in that way. A sphere doesn't have a mass. It's just an uncountably infinite set of points with a particular collection of topological relationship and geometric relationships.

Going further down that path: Banach-Tarski relies deeply of the axiom of choice. The "pieces" that you cut have non-measurable volume. You're "cutting" from the collection of points in the sphere in a way that requires you to make an uncountably infinite number of distinct "cuts" to produce each piece. It's effectively a geometric version of "take every other real number, and put them into separate sets". On that level, because you can't actually do anything like that, it's impossible and ridiculous. But you need to remember: we aren't talking about apples or baseballs. We're talking about sets. The "slices" in B-T aren't something you can cut with a knife - they're infinitely subdivided, not-contiguous pieces. Nothing in the real world has that property, and no real-world process has the ability to cut like that. But we're not talking about the real world; we're talking about abstractions. And on the level of abstractions, it's no stranger than creating two copies of the set of real numbers.

## Topoi Prerequisites: an Intro to Pre-Sheafs

I'm in the process of changing jobs. As a result of that, I've actually got some time between leaving the old, and starting the new. So I've been trying to look into Topoi. Topoi are, basically, an alternative formulation of mathematical logic. In most common presentations of logic, set theory is used as the underlying mathematical basis - set theory and a mathematical logic built alongside it provide a complete foundational structure for mathematics.

Topoi is a different approach. Instead of starting with set theory and a logic with set theoretic semantics, Topoi starts with categories. (I've done a bunch of writing about categories before: see the archives for my category theory posts.)

Reading about Topoi is rough going. The references I've found so far are seriously rough going. So instead of diving right in, I'm going to take a couple of steps back, to some of the foundational material that I think helps make it easier to see where the category theory is coming from. (As a general statement, I find that category theory is fascinating, but it's so abstract that you really need to do some work to ground it in a way that makes sense. Even then, it's not easy to grasp, but it's worth the effort!)

A lot of category theoretic concepts originated in algebraic topology. Topoi follows that - one of its foundational concepts is related to the topological idea of a sheaf. So we're going to start by looking at what a sheaf is.

## Topological Spaces and Continuity

In the last topology post, I introduced the idea of a metric space, and then used it to define open and closed sets in the space.

Today I'm going to explain what a topological space is, and what continuity means in topology.

A topological space is a set and a collection of subsets of , where the following conditions hold:

1. :both the empty set and the entire set are in the set of subsets, . is going to be the thing that defines the structure of the topological space.
2. : the union of collection of subsets of is also a member of .
3. : the intersection of any two elements of is also a member of .

The collection is called a topology on . The members of are the open sets of the topology. The closed sets are the set complements of the members of . Finally, the elements of the topological space are called points.

The connection to metric spaces should be pretty obvious. The way we built up open and closed sets over a metric space can be used to produce topologies. The properties we worked out for the open and closed sets are exactly the properties that are required of the open and closed sets of the topology.

The idea of the topology is that it defines the structure of X. We say collection when we talk about it, because it's not a proper set: a topology can be (and frequently is) considerably larger than what's allowable for a set.

What it does is define the notion of nearness for the points of a set. Take three points in the set : , , and . X contains a series of open sets around each of , , and . At least conceptually, there's a smallest open set containing each of them. Given the smallest open set around , there is a larger open set around it, and a larger open set around it. On and on, ever larger. Closeness in a topological space gets its meaning from those open sets. Take that set of increasingly large open sets around . If you get to an open set around that contains before you get to one that contains , then is closer to than is.

There are many ways to build a topology other than starting with a metric space, but that's definitely the easiest way. One of the most important ideas in topology is the notion of continuity. In some sense, it's the fundamental abstraction of topology. Now that we know what a topological space is, we can define what continuity means.

A function from topological space to topological space is continuous if and only if for every open set , the inverse image of on is an open set.

Of course that makes no sense unless you know what the heck an inverse image is. If C is a set of points, then the image is the set of points . The inverse image of on is the set of points .

Even with the definition, it's a bit hard to visualize what that really means. But basically, if you've got an open set in , what this says is that anything that maps to that open set must also have been an open set. You can't get an open set in using a continuous function from unless what you started with was an open set. What that's really capturing is that there are no gaps in the function. If there were a gap, then the open spaces would no longer be open.

Think of the metric spaces idea of open sets. Imagine an open set with a cube cut out of the middle. It's definitely not continuous. If you took a function on that open set, and its inverse image was the set with the cube cut out, then the function is not smoothly mapping from the open set to the other topological space. It's mapping part of the open set, leaving a big ugly gap.

If you read my old posts on category theory, here's something nifty.

The set of of topological spaces and continuous functions form a category, with the spaces as objects and continuous functions as arrows. We call this category Top.

Aside from the interesting abstract connection, when you look at algebraic topology, it's often easiest to talk about topological spaces using the constructs of category theory.

For example, one of the most fundamental ideas in topology is homeomorphism: a homeomorphism is a bicontinuous bijection (a bicontinuous function is a continuous function with a continuous inverse; a bijection is a bidirectional total function between sets.)

In terms of the category , a homeomorphism between topological spaces is a homomorphism between objects in Top. That much alone is pretty nice: if you've gotten the basics of category theory, it's a whole lot easier to understand that a homeomorphism is an homo-arrow in .

But there's more: from the perspective of topology, any two topological spaces with a homeomorphism between them are identical. And - if you go and look at the category-theoretic definition of equality? It's exactly the same: so if you know category theory, you get to understand topological equality for free!

## Metric Spaces

One of the things that topologists like to say is that a topological set is just a set with some structure. That structure is, basically, the nearness relation - a relation that allows us to talk about what points are near other points.

So to talk about topology, you need to be able to talk about nearness. The way that we do that in topology is through a fundamental concept called an open sphere. An open sphere defines the set of all points that are close to a particular point according to some metric. That's not the only way of defining it; there are various other ways of explaining it, but I find the idea of using a metric to be the easiest one to understand.

Of course, there's a catch. (There's always a catch, isn't there?) The catch is, we need to define just what we mean by "according to some metric".Fundamentally, we need to understand just what we mean by distance. Remember - we're starting with a completely pure set of points. Any structure like a plane, or a sphere, or anything like that will be defined in term of our open spheres - which, in turn, will be defined by the distance metric. So we can't use any of that to define distance.

## Defining Distance

So. Suppose we've got a totally arbitrary set of points, , consisting of elements . What's the distance between and ?

Let's start by thinking about a simple number line with the set of real numbers. What's the distance between two numbers on the number line? It's a measure of how far over the number line you have to go to get from one point to the other. But that's cheating: how far you have to go is really just a re-arrangement of the words; it's defining distance in terms of distance.

But now, suppose that you've got your real number line, and you've got a ruler. Then you can measure distances over the number line. The ruler defines what distances are. It's something in addition to the set of pointsthat allows you to define distance.

So what we really want to do is to define an abstract ruler. In pure mathematical terms, that ruler is just a function that takes two elements, and , and returns a real number. That real number is the distance between those two points.

To be a metric, a distance function needs to have four fundamental properties:

Non-Negativity
: distance is never negative.
Identity
; that is, the distance from a point to itself is 0; and no two distinct points are seperated by a 0 distance.
Symmetry
. It doesn't matter which way you measure: the distance between two points is always the same.
Triangle Inequality
.

A metric space is a pair of a set, and a metric over the set.

For example:

1. The real numbers are a metric space with the ruler-metric function. You can easily verify that properties of a metric function all work with the ruler-metric. In fact, they are are all things that you can easily check with a ruler and a number-line, to see that they work. The function that you're creating with the ruler is: (the absolute value of ). So the ruler-metric distance from 1 to 3 is 2.
2. A cartesian plane is a metric space whose distance function is the euclidean distance: . In fact, for every , the euclidean n-space is a metric space using the euclidean distance.
3. A checkerboard is a metric space if you use the number of kings moves as the distance function.
4. The Manhattan street grid is a metric space where the distance function between two intersections is the sum of the number of horizontal blocks and the number of vertical blocks between them.

With that, we can define the open spheres.

## Open and Closed Sets

You can start moving from metric spaces to topological spaces by looking at open sets. Take a metric space, , and a point . An open sphere (a ball of radius r around point p) in is the set of points such that .

Now, think of a subset . A point is in the interior of if/f there is some point where . is an open subset of if every element of is in its interior. A subset of space formed by an open ball is always an open subset. An open subset of a metric space is also called an open space in .

Here's where we can start to do some interesting things, that foreshadow what we'll do with topological spaces. If you have two open spaces and in a metric space , then is an open space in . So if you have open spaces, you can glue them together to form other open spaces.

In fact, in a metric space , every open space is the union of a collection of open spheres in .

In addition to the simple gluing, we can also prove that every intersection of two open subsets is open. In fact, the intersection of any finite set of open subsets form an open subset. So we can assemble open spaces with all sorts of bizarre shapes by gluing together collections of open balls, and then taking intersections between the shapes we've built.

So now, think about a subspace of a metric space . We can say that a point is adherent to if . The closure of , written is the set of all points adherent to .

A subset of is called a closed subset if and only if . Intuitively, is closed if it contains the surface that forms its boundary. So in 3-space, a solid sphere is a closed space. The contents of the sphere (think of the shape formed by the air in a spherical balloon) is not a closed space; it's bounded by a surface, but that surface is not part of the space.

## An Introduction to Topology

When I took a poll of topics that people wanted my to write about, an awful lot of you asked me to write about topology. I did that before - right after I moved my blog to ScienceBlogs. But it's been a while. So I'm going to go back to those old posts, do some editing and polishing, correct some errors, and repost them. Along the way, I'll add a few new posts.

I've said before that the way that I view math is that it's fundamentally about abstraction. Math is taking complex ideas, breaking down to simple concepts, and then exploring what those concepts really mean, and exactly what you can build using them.

I argue that topology, at its deepest level, is about continuity and nearness. In a continuous surface, what does in mean for things to be close to one another? What kind of structures can you build using nothing but nearness relationships? What is a structure defined solely by that notion of nearness?

## Chaos

One mathematical topic that I find fascinating, but which I've never had
a chance to study formally is chaos. I've been sort of non-motivated about
blog-writing lately due to so many demands on my time, which has left me feeling somewhat guilty towards those of you who follow this blog. So I decided to take this topic about which I know very little, and use the blog as an excuse to
learn something about it. That gives you something interesting to read, and
it gives me something to motivate me to write.

I'll start off with a non-mathematical reason for why it interests me.
Chaos is a very simple idea with very complex implications. The simplicity of
the concept makes it incredibly ripe for idiots like Michael Crichton to
believe that he understands it, even though he doesn't have a clue. There's an astonishingly huge quantity of totally bogus rubbish out there, where the authors are clueless folks who sincerely believe that their stuff is based on chaos theory - because they've heard the basic idea, and believed that they
understood it. It's a wonderful example of my old mantra: the worst math is no math. If you take a simple mathematical concept, and render it into informal non-mathematical words, and then try to reason from the informal stuff, what
you get is garbage.

So, speaking mathematically, what is chaos?

## Understanding Non-Euclidean Hyperbolic Spaces - With Yarn!

One of my fellow ScienceBloggers, Andrew Bleiman from Zooilogix, sent me an amusing link. If you've done things like study topology, then you'll know about non-euclidean spaces. Non-euclidean spaces are often very strange, and with the exception of a few simple cases (like the surface of a sphere), getting a handle on just what a non-euclidean space looks like can be extremely difficult.

One of the simple to define but hard to understand examples is called a hyperbolic space. The simplest definition of a hyperbolic space is a space
where if you take open spheres of increasing radius around a point, the amount of space in those open spheres increases exponentially.

If you think of a sheet of paper, if you take a point, and you draw progressively larger circles around the point, the size of the circles increases
with the square of the radius: for a circle with radius R, the amount of space inside the circle is proportional to R2. If you did it in three dimensions, the amount of space in the spheres would be proportional to R3. But it's always a fixed exponent.

In a hyperbolic space, you've got a constant N, which defines the "dimensionality" of the space - and the open spheres around it enclose a
quantity of space proportional to NR. The larger the open circle around
a point, the higher the exponent.

What Andrew sent me is a link about how you can create models of hyperbolic
spaces using simple crochet.
And then you can get a sense of just how a hyperbolic space works by playing with the thing you crocheted!

It's absolutely brilliant. Once you see it, it's totally obvious
that this is a great model of a hyperbolic space, and just about anyone
can make it, and then experiment with it to get an actual tactile sense
of how it works!

It just happens that right near where I live, there's a great yarn shop whose owners my wife and I have become friends with. So if you're interested in trying this out, you should go to their shop, Flying Fingers, and buy yourself some yarn and crochet hooks, and crochet yourself some hyperbolic surfaces! And tell Elise and Kevin that I sent you!

## Geometric L-systems

As I alluded to yesterday, there's an analogue of L-systems for things more complicated than curves. In fact, there are a variety of them. I'm going to show you one simple example, called a geometric L-system, which is useful for generating a certain kind of iterated function fractal; other variants work in a similar way.

## Wonderful Mobius Transformation Video

Via The Art of Problem-Solving, a great video on Mobius transformations. I never really got how the inversion transformation fit in with the others before seeing this!