This page collects information and links about *factorization diagrams*, as seen on Hacker News and the cover of Hacker Monthly #31.

## About

The basic idea is to draw dots using a recursive layout based on the prime factorization of —for example, can be drawn as two groups of three groups of five dots, like this:

A full explanation can be found starting here and continuing here.

## Factorization diagram cards!

**Factorization diagram cards are now here**! You can purchase a print-on-demand deck from The Game Crafter for $13.99. I am selling them basically at cost; the moderately high price reflects the high quality of the cards and the fact that they are print-on-demand, so there are no economy of scale effects. If you are a game/educational publisher, or know one, who would be interested in publishing this deck and making it available at a lower price, please contact me!

Each deck contains 54 large (3.5“), high-quality square cards with a linen texture and UV coating to reduce glare. The front of each card has a diagram, and the back has the corresponding number and factorization. Numbers with multiple distinct prime factors have multiple cards with different diagrams, one for each distinct permutation of the prime factors.

- Let me know if you would be interested in a deck with the numbers 31-60!
- Here are a few suggested games you can play with the cards, from a middle school classroom.
**If you use them in a classroom and come up with a fun activity/game/puzzle using the cards, please let me know**! I would like to collect a big list of suggested activities for different ages and eventually be able to publish the list along with the cards.

The images used to make the cards are freely available here, and the source code is on github. Everything is released under a Creative Commons Attribution 3.0 license.

Let me know if you would be interested in a different downloadable format, *e.g.* a PDF with four cards per page, for easier printing and cutting out. I may get around to making such a thing eventually.

You can read about the redesigned version of the cards here. And here is the video from when I got the first printing of the first version of the cards. The colors and design are now a bit different, but it should give you a sense for the size and quality of the cards:

## Posters!

You can now buy high-quality, printed-on-demand factorization diagram posters from imagekind! The print quality is fantastic, and you can choose from a wide range of sizes, paper types, and even (if you like) frames. I think 32"x20" is the ideal size ($26 on matte paper); 24"x15" ($17) might be reasonable too though at that size it gets hard to see the finest detail. Of course you can also go bigger; 48"x31" ($44) could be a good size for a classroom, common area, or something like that.

Here’s a link to the source code for the poster as well as a high-resolution PNG (6000×9405, 4MB). The source code and image are both licensed under a Creative Commons Attribution 3.0 license, so feel free to modify the code as you like (see below), download the image and print your own poster if you have access to a high-quality large-format printer, and so on.

## Make your own!

All the factorization diagram images are generated using diagrams, a domain-specific language for vector graphics embedded in Haskell. Generating factorization diagrams can be accomplished using the `Diagrams.TwoD.Factorization`

module from the `diagrams-contrib`

package; the source code can be found here.

## Links

Some of my original inspirations were Sondra Eklund’s awesome prime factorization sweater and blanket and also Richard Evan Schwartz’s fun book, You Can Count on Monsters.

Here’s a complete list of blog posts I have published related to factorization diagrams:

- Factorization diagrams
- More factorization diagrams
- Factorization diagram cards: help?
- Factorization diagram posters!
- Factorization diagram cards!
- Factorization diagram card redesign: feedback welcome!
- Factorization diagram cards are here!

And here’s a list of stuff that other people were inspired to make (if you know of something that should be on this list but isn’t, please let me know!):

- factorization diagrams in JavaScript, with editable source code, by Jon Palin
- another JavaScript version, with D3.js, by Jason Davies
- variant prime factorization trees by Suhas Mathur
- animated factor diagrams by Sean Seefried
- animated “factor conga” by Stephen von Worley
- playing “factor dominos” with factorization diagram cards, by Malke Rosenfeld
- factorization diagram calculator and game, by Robert Woodley
- factorization diagrams posters, by Jeremy
- prime factorization dot-agons by Steven Ellis

## License

Factorization diagrams by Brent Yorgey are licensed under a Creative Commons Attribution 3.0 Unported License.

The source code for this page and other things related to factorization diagrams can be found on github.

As the father of a 6 year old, I’ve found they are a great way to introduce the concepts of primes and factorization.

Since then, I dabbled with the javascript animations by Sean Seefried to create 2 related products:

1. a calculator, and

2. a factorization game.

More here: rwoodley.org/?p=492

Hi! This is a good piece. I referenced it in my blog at http://quarbby.wordpress.com/2014/05/15/factorization-diagrams-by-mathlesstravelled/. I hope I didn’t infringe on any rights. Thanks for sharing!

Thanks! Nope, no rights infringement here, everything on my blog is licensed under a Creative Commons Attribution license: https://mathlesstraveled.com/license/ . And I guess you know that you can buy a poster version now: https://mathlesstraveled.com/factorization/ since you linked to it!

Thanks! Was just checking to be sure! Yup I know I can buy a poster… If only I’m at home 🙂

Love the factorisation diagram. As mentioned above this is a great way to introduce youngsters to numbers – which is precisely what I’m looking to do too.

Hey there Richard,

I am also an elementary school teacher implementing these diagrams for teaching. 😉

It’s very good math-art work!!! Thanks!

Great work! Your diagrams inspired me to create interactive, build-it-yourself versions that are similar but not the same as what you’ve done here. Have a look: http://wp.me/p1dfmY-34L

This is super cool, thanks for sharing!

By the way, the red and blue controls seem to be switched… =)

HI! Great work! I love these diagrams. Are the cards available in PDF? Thank you

Hi,

Try the fastest factorization algorithm for large numbers (like a public key), Prof Hal Mahutan’s algorithm …

https://stackoverflow.com/a/66774676/15372664