5. Spoilers, Adding (Part 2) and Zero

Several people have asked for motivation to keep reading. “What will I learn if I stick around until Episode 10, or Episode 20?” It’s understandable: it takes effort to read this stuff, and you don’t want to waste your time.

I don’t want to give away the plot twists ahead. The thing about plot twists is that you only appreciate them fully if you are engrossed in the story. What if I told you about the events of the Red Wedding at the start of season one of the Game of Thrones? You wouldn’t have reacted like this!

Having said that, if you are dying of curiosity and you absolutely must know now, then there is a paper full of spoilers on the About page. For the people who just want to be teased, the next few paragraphs are a brief trailer for approximately the next 15 episodes. If you don’t know the jargon of linear algebra, don’t worry if you don’t understand; I will explain the terms when we need them. Feel free to skip to today’s content, below the horizontal line.

In the next 5 episodes you will learn how to do diagrammatic proofs, and how certain kinds of diagrams capture the same information as matrices. You will understand matrix multiplication in a way that you probably have never seen before. The 10 episodes after that is the really exciting stuff.

In ordinary linear algebra, the one taught in first year undergraduate maths around the world, there comes a point in the exposition where there is a certain sleight of hand, where your lecturer pulls a rabbit out of a hat, so to speak. It typically comes just after you learn about the algebra of matrices and vectors. Suddenly you’re talking about vector spaces and subspaces, which are sets of vectors closed under addition and scalar multiplication. Where did the sets of things come from?

In graphical linear algebra we will not need to leave the pleasant world of diagrams. We will not need to talk about sets of things. The conceptual leap from matrices to spaces in graphical linear algebra is, in my opinion, simply wonderful. I am very proud to have been involved in its discovery. It will be one of the highlights of this story, and will also have several side-effects. One will be a graphical way of understanding fractions, which includes a rather unexpected bombshell featuring the star of this episode, zero. Stay tuned!


Diagrams are very much like magic Lego from the last episode. Remember how the important thing with magic Lego was keeping track of the number of holes on the left and the number of studs on the right? Diagrams are similarly easy: we only need to record the number of dangling wires. Here’s the diagram for addition that we discussed two episodes ago, together with the associated information (2,1) that tells us that there are two dangling wires on the left, and one dangling wire on the right.typedaddIn graphical linear algebra, this diagram is considered a basic, atomic diagram, just like the basic bricks of magic Lego. We will construct more complicated diagrams from it and other “core” diagrams. Instead of saying “basic diagram”, we will use the word generator from now on.

There are two very special diagrams that it’s high time we met. We will see why they are special in the next episode, which will wrap up the Rules of the Game of graphical linear algebra. The first one may seem a bit useless. You will learn to love it though, because it’s more important than its rather unassuming looks. In fact, it has a name of its own, it is called identity. Identity is simply a single wire that dangles from both ends. identity The second special diagram also has a name—it is called twist—and consists of two crossing wires, dangling from both ends. twist The algebra of diagrams uses the same operations that we used for Lego. Actually, we can use exactly the same rules. sumrule Direct sum of diagrams works just like we would expect: we stack the first argument on top of the second. sumplusid Why did the identity become curved in the second diagram? Well, there’s no reason for it not to curve. I could have drawn it straight, and we would have considered that result to be the same diagram.  Just like magic Lego, where we deformed the shapes of the bricks as if they were rubber, we can deform diagrams. When deforming diagrams, we will usually leave the circles alone, and simply stretch the wires, as if they were rubber bands.

To get back to the concrete operation above, we just have to draw the identity wire below the addition in the result. No rulers needed! The important information in a diagram is what connects to what, reading from left to right, and in which order the generators (basic diagrams) come, reading from top to bottom. For now, that’s all you really need to know; in the next episode we will discuss the kinds of things that you are not allowed to do with diagrams.

Just like in Lego, direct sum is not commutative. idplussum Now let’s focus on composition, which also uses exactly the same rule as in the last episode. compositionrule In Lego, composition worked by fitting studs into holes. In diagrams, we simply connect wires together. For example: twadd You’ve already seen the result above, it is the right hand side of (Comm) equation from two episodes ago! Here is that equation again, for your convenience. commutativity Composition is easy, right? Now let’s construct some other interesting diagrams: assocl and assocr This brings us to the second equation of graphical linear algebra. assocCan you guess what it means? Think about it for a few moments before reading on.

 

(Assoc) captures the associativity property of addition. Let’s try to figure out what it says and why it makes sense. Consider the left hand side, and think about variables x, y and z arriving on the dangling wires from the left: x on the topmost, then y on the middle and z on the bottom wire. In the left diagram, the first thing that happens is that we add x and y, and then we add z to the result. Like this: assoclvars Doing the same thing on the right hand side gives us: assocrvars An operation is associative when it doesn’t matter how you bracket it; the result will always be the same. Addition is a well-known example of an associative operation. A mathematician might write:

 ∀ x,y,z. (x + y) + z = x + (y + z).

That is, no matter what numbers we substitute x, y and z, it does not matter whether you first calculate x + y or y + z.

Covering up both sides of (Assoc) with a square piece of paper of the right size gives us two diagrams that both look as follows

box31 and—using the associativity property of addition—no matter what three numbers we feed in along the wires on the left, the result will be the same. In other words, the two diagrams in (Assoc) have the same behaviour.

It’s time for the star of this episode to make its entrance.


500px-Cero_maya

Zero is absolutely essential in linear algebra. It is a mathematical abstraction, and one of the first ones we learn at school. For that reason, zero may seem to be quite obvious to you now. In fact, it was a major discovery in the history of science, and it is far from trivial. How can we tell that, one, zero is very important, and two, that it wasn’t so obvious to discover?

Some good evidence for these claims is, one, we all know what it is, and two, that in the entire history of human civilisation, it was only discovered twice, maybe three times.

If something is easy and useful, it tends to be invented many times. For example, it’s a fairly simple observation that when a tree falls in a body of water, it tends to float. A canoe is only a few thoughts away. So canoes are easy to conceive of, and are clearly very useful. For those reasons, they were invented and reinvented many times, in many different places across the globe over the last few millenia.

If something is hard and useless, it tends to be invented in academic departments across the world, and be understood by very few, very specialised scientists. I will not give you any examples, dear reader, because I live in a glass house and I certainly don’t want to start throwing stones. I don’t think that hard and useless is an insult by the way; let me explain why. Hard and useless things sometimes lead to hard and useful things. This is why the hard and useless is worth doing.

If something is hard and useful—the most interesting of cases—it tends to be invented a small number of times, and the idea spreads quickly from person to person, from culture to culture. Zero is firmly in this category. Hard and useful things are very rare. Nowadays, they are usually called scientific breakthroughs.

There has been intense political pressure on the academy to stop working on hard and useless things over the last 30 years or so. The result is a new generation of academics who do easy and useful things, things that impact the economy in the 5-10 year scale, and which bring in research funding. This is by design, because research funding is closely tied to academic career progression. Unfortunately, it’s not very hard to disguise easy and useless things as easy and useful. This has resulted in a totally out-of-control epidemic of easy and useless research. A symptom of this disease is the ever expanding use of increasingly ridiculous buzzwords. Easy and useless never leads to hard and useful. I’d much rather the government invest my tax money in the hard and useless.

Back to our friend zero: it is an essential ingredient of a positional number system, the thing that Fibonacci was so excited about. In fact, the word “zero” comes to us from Fibonacci, who called it zephyrum. For our story, zero is important because it is the additive identity, as we will discover below.


In graphical linear algebra, zero gets the royal treatment, which is no more than it deserves. It gets its own generator, which looks like this: unitgen Again we have a white circle, with a connected wire that’s dangling from the right. So actually, I was a bit dishonest in the first addition episode when I said that whenever you will see a white circle it will mean addition. Whenever the white circle has just one wire attached, it is our friend zero. It wasn’t much of a lie; zero is very closely linked to addition. It is weird to consider one without the other.

How are we to think of the behaviour of this generator? Remember that with addition, we think of numbers arriving on the two dangling wires on the left, and the result—their sum— exiting on the right. The new zero generator’s behaviour is very simple, the single dangling wire on the right simply always outputs the number 0. This brings us to the third equation of graphical linear algebra. unit Why does it make sense? Well, consider the left hand side. zeroplusxA number arrives on the dangling wire on the left, let’s call it x. We know that the only thing that can exit from the zero generator is 0. Then 0 is fed in as the first argument to addition, and x as the second. The result is 0 + x. Of course, we know that adding zero to any number does not have any effect. So, whatever the x, 0 + x is simply x. It follows that the behaviour of the left hand side and the right hand side of (Unit) is exactly the same.

The three equations (Comm), (Assoc) and (Unit) are the only things that we need to know about addition (and zero) for now. By the way, mathematicians have a name for structures that satisfy these three properties: they are called commutative monoids.

The three equations imply many other equations. In particular, the following “upside down” version of (Unit).

upsidedownunit We could, of course, check that it makes sense by feeding in a variable and performing the easy calculation—just as we did when we discussed (Unit). Eventually, though, we will want to stop this way of thinking; it’s too simplistic and it will not get us very far. I will explain later, but we need to start preparing for it now. What we want is to use (Comm), (Assoc) and (Unit) to prove that the equation above holds.

This is our task for the next episode. Being graphical linear algebra, the proof will only use diagrams!

Continue reading with Episode 6: Crema di Mascarpone and Diagrammatic Reasoning.

Advertisements

4 thoughts on “5. Spoilers, Adding (Part 2) and Zero

  1. At this point it seems 0 and the symbol = share the same properties. Are they Isomorphic objects? let’s keep reading.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s