Index Ai Academy
Glossary · Phase 0 · Tools

Factorial

Also written: factorials

The product n × (n − 1) × ... × 1, written n!. It counts the orders n different things can be put in: 5! is 120.

Two more counts you will need. Orders: 5 books can stand in 5 4 3 2 1 = 120 orders, since each place uses one up. That shrinking product is the factorial, 5!. Groups: when only the members matter, count the ordered picks and divide out the orders. A pizza with 2 of 4 toppings: 4 * 3 = 12 ordered picks, each pair counted twice, so 6 pizzas.

Try it now

Then change the terms and press Use these numbers: a sum is always a running total.

Learn it properly

Loops that add and count: sequences, sums and combinations · Sequences that add or multiply each step, a formula for any term, and adding a sequence up. About 34 minutes.

Other terms from the same lesson

  • arithmetic sequence: A list of numbers that adds the same amount each step, such as 5, 10, 15. Its term after n steps is start + step × n.
  • geometric sequence: A list of numbers that multiplies by the same amount each step, such as 1, 2, 4, 8. Its term after n steps is start × ratio to the power n.
  • multiplication rule: Choices made one after another multiply: 3 shirts and 2 pairs of trousers make 3 × 2 = 6 outfits.
  • permutation: One ordering of a group of things. Three books have 3 × 2 × 1 = 6 permutations.
Keep learning

More in plain English.

1286 terms in the glossary, each with the lesson that teaches it.

1286 terms

The glossary

Every word you'll meet in AI and machine learning, explained in everyday language.

Never trained an AI? Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account. Teach it to write