Number Portraits

I designed a set of number portraits for the integers from 1 to 36.

Each number is either a prime or a composite. If it is a prime number, then it has two divisors: 1 and itself. This is visualized as the gray-colored half circle, where the top represents 1 and the bottom represents the number itself. Composite numbers have other pairs of divisors, and these are visualized as the smaller, colored arcs.

The perfect squares (4, 9, 16, 25, and 36) each have a line segment located at the square root.

The numbers 6 and 8 each have one pair of divisors (besides 1 and themselves); they are (2,3) and (2,4), respectfully. Since the first number in each pair is 2, these arcs are colored green. Divisor pairs in which the first divisor is 3 are colored blue; divisor pairs in which the first divisor is 4 are colored red. And divisor pairs in which the first divisor is 5 are colored yellow. These colors visualize divisibility by these first 5 positive integers.

The highly-composite numbers 12, 24, and 36 are shown enlarged below.

The number 36 has the most divisors in this set. It’s divisor pairs are

(1, 36)  (2, 18) (3, 12) (4, 9) (6, 6).

These are in a similar spirit to the Divisor Plot images I created in 2010:


Thelonius Monk’s Shapeshifting Chord


One of my part-time hobbies is being a Monk interpreter. A Monk interpreter not only learns how to play Monk’s compositions, but also makes a point of getting into the head of this eccentric man. The reason to do this is that Monk was an improvisor – and he was driven by an inner vision. If you can tap that inner vision, then you can generate Monk-like music – and improvise on it…even while playing Beatles songs.

I wrote a piece in 2013 about Monk as a mathematician.


Math can be about patterns (visual or sonic). Math does not always have to be expressed in numbers. Monk once said,“All musicians are subconsciously mathematicians”.

A Symmetrical Chord

The chord I’m talking about has four notes. It is typically used as a dominant chord – which naturally resolves to the tonic. Unlike the classical dominant-seventh, this chord has a flatted fifth – which makes it slip into a symmetrical regime – as shown in the picture above – inscribed in the circle of fifths.



According to Wikipedia, this chord is called the “Dominant Seventh Flat-Five Chord“. The cool trick about this chord is that it can resolve to either of two different tonics – each being a tri-tone apart.

So for instance, a chord with these notes:     Eb   F   A   B      can resolve to either Bb or E as the home key.

This chord also happens to contain 4 of the 6 tones in a whole tone scale, which Monk famously used (often as a dominant arpeggio).

If you are not familiar with music theory, you may still appreciate the beauty of sonic geometry and how it can generate such variety. If you apply similar concepts to rhythm as to harmony then you have a wonderfully rich canvas for endless musical expression. I like the way Monk wove these geometries together in a way that makes the foot tap and the ear twinge – and the brain tweak.

Monk was of course not the only one to apply these ideas – but he did accomplish something remarkable: the application of embodied math. If you have spent as much time as I have learning his language, listening to him improvise can cause a smile – or the occasional giggle – to pop out. Like an inside joke.

There is plenty of material on the internet about Monk. Here’s one voice among the many who have acquired an appreciation for Monk:  How to Listen to Thelonius Monk – by George H. Jensen, Jr.

Why is it a Color “Wheel” and Not a Color “Line”?

This blog post was published in May of 2012 on EyeMath. It is being migrated to this blog, with a few minor changes.

I’ve been discussing color algorithms recently with a colleague at Visual Music Systems.

We’ve been talking about the hue-saturation-value model, which represents color in a more intuitive way for artists and designers than the red-green-blue model. The “hue” component is easily explained in terms of a color wheel.

Ever since I learned about the color wheel in art class as a young boy, I had been under the impression that the colors are cyclical; periodic. In other words, as you move through the color series, it repeats itself: red, orange, yellow, green, blue, violet…and then back to red. You may be thinking, yes of course…that’s how colors work. But now I have a question…


Consider five domains that can be used as the basis for inventing a color theory:

(1) the physics of light, (2) the human retina, (3) the human brain, (4) the nature of pigment and paint, and (5) visual communication and cultural conventions.

(1) In terms of light physics, the electromagnetic spectrum has a band visible to the human eye with violet at one end and red at the other. Beyond violet is ultraviolet, and beyond red is infrared. Once you pass out of the visible spectrum, there aint no comin’ back. There are no wheels in the electromagnetic spectrum.

(2) In terms of the human retina, our eyes can detect various wavelengths of light. It appears that our color vision system incorporates two schemes: (1) trichromatic (red-green-blue), and (2) the opponent process (red vs. green, blue vs. yellow, black vs. white). I don’t see anything that would lead me to believe that the retina “understands” colors in a periodic fashion, as represented in a color wheel. However, it may be that the retina “encourages” this model to be invented in the human brain…

(3) In terms of the brain, our internal representations of color don’t appear to be based on the one-dimensional electromagnetic spectrum. Other factors are more likely to have influence, such as the physiology of the retina, and the way pigments can be physically mixed together (a human activity dating back thousands of years).

(4) Pigment and paint are very physical materials that we manipulate (using subtractive color), thereby constituting a strong influence on how we think about and categorize color.

(5) Finally: visual communication and culture. This is the domain in which the color wheel was invented, with encouragement from the mixing properties of pigment, the physiology of the retina, and the mathematical processes that are formulated in our brains. (I should mention another influence: technology…such as computergraphical displays).


Consider the red-green-blue model, which defines a 3D color space – often represented as a cube. This is a common form of the additive color model. Within the volume of the cube, one can trace a circle, or a hexagon, or any other cyclical path one wishes to draw. This cyclical path defines a periodic color representation (a color wheel). A volume yields 2D shapes, traced onto planes that slice through the volume. It’s a process of reducing dimensions.

But the electromagnet spectrum is ONE-DIMENSIONAL. The physical basis for colored light cannot yield a higher-dimensional color space. The red-green-blue model (or any multi-dimensional space) therefore could not originate from the physics of light.


An alternate theory as to the origin of the color wheel is this: the color wheel was created by taking the two ends of the visible spectrum and connecting them to form a loop (and adding some purple to form a connective link). I just learned that Purple is NOT a spectral color (although “violet” is :) Purple can only be made by combining red and blue. Here’s an explanation by Deron Meranda, in a piece called…


And here’s a page about how purple is constructed in the retina: HOW CAN PURPLE EXIST?

Did the human mind and human society impose circularity onto the color spectrum in order to contain it? Was this encouraged by the physiology of our eyes, in which various wavelengths are perceived, and mixed (mapping from a one-dimensional color space to a higher-dimensional color space)? Or might it be more a matter of the influence of pigments, and the age-old technology of mixing paints?

Might the color wheel be a metaphorical blend between the color spectrum and the mixing behavior of pigment?

Similar questions can be applied to many mathematical concepts that we take for granted. We understand number and dimensionality because of the ways our bodies, and their senses, map reality to internal representations. And this ultimately influences culture and language, and the ways we discuss things…like color…which influences the algorithms we design.


Enough with this Square Root of -1 Business!

Like so many other people, I was kept from appreciating the beauty and utility of mathematics because of the way it was taught to me.

The majority of introductions to complex numbers start with the elusive and mysterious square root of -1, denoted by i.

A number that has an i stuck on to it is called “imaginary” (a convenient differentiator to “real”). Being asked to learn something that is called “imaginary” is not very motivating to young learners who work best starting with concrete metaphors.


The imaginary number is counterintuitive and confusing. And it’s not the coolest part. Sure, i was an important invention at a critical stage in the history of math when there was no good way to express z2 = -1. And yes, it makes a good ending to a long story (which happens to be true): math has advanced through several expansions of the concept of “number” … from the counting numbers to the wholes – to the negatives – to the fractions – to the irrationals – and finally to complex numbers – where i came along and saved the day.

But…does this mean that invoking i is the best way to explain complex numbers to novices – to everyday people? I join many others in saying that there is a better way to learn about the wonderful world of two-dimensional numbers. One voice among those is Kalid Azad.

kalidphoto-color-homeHe speaks in metaphors and freely engages the visual mind to help us grasp math concepts using our whole brain. In his explanation on complex numbers, Azad says this about i: “It doesn’t make sense yet, but hang in there. By the end we’ll hunt down i and put it in a headlock, instead of the reverse.”


When you get an intuitive, aesthetic feeling for why certain mathematical ideas are being taught, you become more motivated to learn the notation. The corollary: learning math notation without understanding why is like learning musical notation before ever being allowed to listen to or play music.

Paul-Lockhart2Paul Lockhart, in A Mathematician’s Lament, compares the way math is taught to a nightmare scenario in which music is taught to students using sheet music notation only (no actual music is played or heard) – until the student is advanced enough to start “using” it.


What is a Two-Dimensional Number?

When I read that complex numbers are really no more “imaginary” than real numbers, I decided that I would start dismantling my old worldview. Why should I assume that numbers have to be one-dimensional? Over time, I became more accustomed to the notion that a number can occupy a plane (the complex plane) and not just a line (the number line). Learning how to make images of the Mandelbrot Set helped a lot.

Think of Multiplication as Rotation

Screen Shot 2015-12-18 at 9.49.07 AMInstead of trying to wrap your mind around i, and how it magically makes equations come out right, let’s start with geometry. Think of multiplication as rotation and expansion. In the blog Girls Angle, Ken Fan introduces complex number multiplication in a nice visual way… here.

Here’s a video explaining complex numbers in terms of physical metaphors, and eventually explaining why the square root of -1 becomes a necessary part of the notation.



Consider the following diagram showing what happens when you square certain complex numbers that lie on the unit circle:

complex plane gravitation

The dot on the right represents the complex number (1+0i). When you square it, it stays the same (no surprise: 1×1=1). The number at the left is (-1+0i). When you square that, it becomes (1+0i). But when you square the number at top (0+1i) it “rotates” by 90 degrees to (-1+0i). Finally, at the bottom, the number (0-1i) rotates…but would it be correct to say that it rotates by 90 degrees clockwise to (-1,0i)? Depends on how you look at it. Rotating by 270 degrees counter-clockwise has the same result. This is the nature of rotation and angular reality: it is periodic – it cycles…it repeats.

What an awesome idea. Multiplication is like doing a whirling dervish jig.

Animated Squaring

Here’s an interactive tool I made that allows you to play with 200 dots (complex numbers) randomly scattered on the complex plane. You can experience what happens when complex numbers are squared. It also allows you to multiply the dots (using a complex number dot that you can drag along the screen).

Screen Shot 2015-12-17 at 3.57.18 PM

This interactive tool might make you feel as if the dots on the screen are obeying some sort of gravitational law of physics. Well, in a way, yes, that’s what’s happening. When you add, multiply, or exponentiate numbers, you get a new number. In the complex plane, the space where that change takes place is two-dimensional. That’s cool! We like images.

Here’s another visual tool: when we multiply two complex numbers, such as (a+bi) and (c+di), we can visualize the operation in this way:


In pseudocode:

realPart      = (a*c) - (b*d);
imaginaryPart = (a*d) + (b*c);

This explanation of multiplication does not require i.

To this day, I STILL do not feel very much music when I think about the square root of -1.

On the other hand, the more I play around with visualizing and animating complex numbers, the more intuitive they become, and the deeper my sense that these numbers are as real as any old one-dimensional number.

They are not imaginary at all.

The Evolution of Mathematics on Planet Earth


math-heartMany people couldn’t imagine Math and Biology going out on a date. Flirting with each other from time to time…maybe. But a date? Never! Math is precise, abstract, cool, and distant. Biology is messy, unpredictable, prone to mood swings, and chemically dependent…as it were.

But this may be changing.

“The conversion of biology into a more quantifiable science will continue to the extent that it might even become the main driving force behind innovation and development in mathematics”

Philip Hunter

Let me explain why I think Math and Biology are ultimately compatible, and in fact, part of a Single Reality.


I have written a few articles on the subject of math, and raised questions as to the universality, truth-status, and God-givenness of Math. Here is something to consider about Math and Biology:

Math Evolved in the Biosphere

Let’s start with numbers. Imagine a mother crow busily feeding her three chicks. She would become worried if she came back to her nest to suddenly find two chicks instead of three.


She would know there something is wrong with this picture…because crows can count (they can subitize small numbers, like about 2 or 3).

How did it come about that some animals, like crows and humans, can count? First of all, in order for intelligent beings to be able to count, they have to live in an environment where countable objects are found, and where counting has some evolutionary benefit. Consider a gaseous planet where fluids intermix and there is no way to detect a “thing” or “event” and to compare that with another “thing” or “event”. In this kind of world, there is nothing to count.

seahorseFor that matter, it is unlikely that an intelligent entity that can count could ever evolve on such a planet in the first place, because structure and differentiation at some physical level are required for living things to bootstrap themselves into existence.

Theories of autopoiesis, negentropy, and the emergence of mind from matter rely on the existence of a prior structure to the universe where it is possible for self-regulation, and self-creation to arise. One might say that the origins of life had a head start long before those first molecules started dancing together and accidentally reproducing. Maybe it wasn’t such an accident after all.


…which brings me to a core concept: since Earth’s biosphere gave rise to animals that can count, as well as those things that can be counted – at the same time, we must understand ourselves as in and of the biosphere – we and it all evolved together: one did not come before the other.

70212-1024x603Which came first: the chicken or the egg? Neither. They have both been in a continual state of becoming since egg-like things and chicken-like things have existed. And if you go back in time far enough, these things look less and less like chickens and eggs.

We animals have evolved to understand containment, and that is partly because hierarchy evolved within the fabric of physical biology. We know what it means for something to be “inside” or “outside” of something else. We clumpify, categorize, differentiate, compare, and identify. All animals need some degree of this compartmentalization of nature in order to operate within it.

We cannot separate our math from the environment from which it evolved. The very foundations of math evolved within the bodies and minds of animals as a part of evolution. At least this is what several recent scientists and philosophers are suggesting. (Mathematicians are more likely to claim that math is universal, constant, and unchanged by biology.)


In a previous article I consider what kind of math would have emerged if octopuses has evolved to become the complex and dominant species on earth, instead of humans. This is not so hard to imagine, considering how intelligent they are.

Screen Shot 2015-08-10 at 12.19.31 AM

Would an advanced octopus race have stumbled upon complex numbers? Would they have become as obsessed with the Cartesian coordinate system as we are? Since they have no skeletons, would they have formulated a geometry based on angles and lengths? Of course we can’t know, but it is likely that they would have created some math concepts that we may never achieve. And that would be because the long history of math that we have built and that we rely on to create new math has taken our brains and societies too far away from the place where an octopus-like math would naturally arise.

mouroborobius2Now consider aliens from a completely different kind of planet than Earth. What kind of math would originate in that world? Many people would argue that math is math and it doesn’t matter who or what discovers or articulates it. And there may be some truth to this. But we can only hope and imagine that this is the case.

Until we meet aliens from another planet and ask them if they understand and appreciate the fibonacci sequence, I have to assume that their math is different than ours.

What do you think?

(I would have consulted one of my octopus friends on the subject…but I don’t speak their language).

………….. The Beauty of Gray Code …………..











Gray Code is an alternative binary representation, cleverly devised so that, between any two adjacent numbers, only one bit changes at a time. If there is an error reading any bit that has changed then, at worse, the read value will never be out by more than one unit.

This has tremendous value in the real world. Computers might be digital, but we live in an analog world. Interfaces between these need to be carefully considered.