Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Full Permutation


Press ▶ Play to auto-build all permutations, or Step ▶ to advance one ball at a time. Switch between balls / letters and adjust n to change the number of items.
● BallsA Letters
n =3?
Speed
P(3) = 3! = 6Press Play or Step to beginSOURCE (n = 3)123BUILD AREA#1#2#3
Building all permutations
P(3) = 3! = 3 × 2 × 1 = 6
Each step builds the family of permutations starting with one fixed item. With n items there are n such families, each containing (n−1)! arrangements. Steps appear here as they unfold.
Three items wait in the source row and three dashed slots wait below — nothing is chosen yet, and every one of the n! orders is still possible. Learn more about getting started · What is a full permutation





Key Terms



Key Terms

Full permutation — an arrangement of all nn distinct items in a line, where order matters and every item is used exactly once. The count is n!n!.

Factorial $n!$ — the product n×(n1)×(n2)××2×1n \times (n-1) \times (n-2) \times \cdots \times 2 \times 1. The number of full permutations of nn distinct items.

Position — a slot in the arrangement, numbered #1\#1 through #n\#n from left to right in the build area.

Step / first-item group — the family of permutations that share the same item in position #1\#1. With nn items there are nn such groups, each containing (n1)!(n - 1)! permutations.

Permutation prefix — the part of the arrangement already filled at any moment during the build. A landed ball is part of the prefix; the source row dims items already used.

$P(n)$ notation — alternative writing for the count of full permutations: P(n)=n!P(n) = n!.

Getting Started

The tool opens with n=3n = 3 items and is ready to build. The scene is split into three areas:

• A source row at the top showing the available items.

• A build area in the middle with nn empty slots labeled #1\#1 through #n\#n.

• A completed section below, where every finished permutation is recorded and organized by which item went into position one.

To run the visualization:

• Press ▶ Play to auto-build all n!n! permutations.

• Press Step ▶ to advance one ball at a time.

• Press to step backward through the animation.

• Adjust the Speed slider to control how fast play advances.

The badge in the top right shows the formula P(n)=n!P(n) = n! together with the total, and a live status line such as "Step X (item name): k / (n-1)!" while building, or "Complete · n! / n!" when done.
P(3) = 3! = 6Press Play or Step to beginSOURCE (n = 3)123BUILD AREA#1#2#3
n = 3, idle, frozen

Three source balls, three dashed slots, an empty completed list: the tool before any choice — all six orders still ahead.

The frozen frame above is the opening position: three source balls, three dashed slots, an empty completed list. Nothing is decided, yet the count already is — 3!=63! = 6 is a fact about the future, fixed before a single ball moves.

That is the quiet lesson of the idle state: counting problems are settled by structure, not by carrying out the process. The transport controls merely make the enumeration watchable.

The Build Area

The build area is where one permutation at a time is constructed. Five things to watch:

Empty slot outlines with dashed borders, labeled #1,#2,,#n\#1, \#2, \dots, \#n from left to right. The label tells you the position number.

• When a ball is in flight from the source row to a slot, a dotted guide line in that ball's color traces the trajectory.

• Each ball lands in its assigned slot and stays put until the permutation completes.

• In the source row above, every item already placed in the current permutation (plus the one currently in flight) is dimmed to indicate it's out of play.

• When all nn slots are filled, a flash ring briefly pulses around the build area. The completed permutation is then copied to the appropriate row in the completed section below, and the build area resets for the next permutation.
P(3) = 3! = 6Step 2 (Blue): 0 / 2SOURCE (n = 3)123BUILD AREA#1#2#321COMPLETED2 / 611231322
Mid-build, frozen

The third arrangement under way: B has landed in slot #1, A is dropping into #2 along its dotted guide, and the source row dims whatever is spoken for.

The frozen frame above catches the machinery mid-move: B has landed in slot #1, A is dropping into #2 along its dotted guide, and both are dimmed in the source row. What remains bright is exactly what can still be chosen.

The dimming is the visual form of "without repetition": each landing shrinks the pool by one, which is why the choice counts run nn, then n1n - 1, then n2n - 2 — the multiplication chain behind the factorial.

Adjusting n

The n stepper in the control bar changes the number of items. The visual handles:

n = 3 — produces 3!=63! = 6 permutations, displayed in 22 columns per first-item group.

n = 4 — produces 4!=244! = 24 permutations, displayed in 33 columns per first-item group.

n = 5 — produces 5!=1205! = 120 permutations, mini balls shrink to fit a wider grid.

Changing nn resets the build state: the source row repopulates, the build area gets a new set of slot outlines, the completed section empties, and the formula in the top-right header updates to P(n)=n!P(n) = n! for the new value.

Counts grow fast — by n=5n = 5 you're already at 120120 permutations, and the formula 5!=5×4×3×2×15! = 5 \times 4 \times 3 \times 2 \times 1 reads out in the right-panel header. For n=7n = 7 you would be looking at 5,0405{,}040 arrangements; for n=10n = 10, over three million.
P(4) = 4! = 24Complete · 24 / 24SOURCE (n = 4)1234BUILD AREA#1#2#3#4COMPLETED24 / 241123412431324134214231432221342143231423412413243133124314232143241341234214412341324213423143124321
n = 4 complete, frozen

Twenty-four cards in four rows of six: one more item, four times the outcomes — exactly as n! promises.

The frozen frame above is the completed run at n=4n = 4: twenty-four cards in four rows of six. Compare it with the six-card layout under grouping by first item — one extra item quadrupled the outcome count, precisely the leading factor nn in n×(n1)!n \times (n-1)!.

Stepping nn is the tool's best experiment: the structure never changes, only the scale. One further step up gives the 120-card view shown under the derivation, which is where the factorial's growth stops feeling abstract.

Grouping by First Item

The most important pedagogical feature: the completed section organizes permutations into first-item groups. Every permutation that starts with the same item appears in the same row.

There are exactly nn groups (one per item) and each group holds exactly (n1)!(n - 1)! permutations. So the total count is:

n×(n1)!=n!n \times (n - 1)! = n!


This is the visual proof of the factorial formula. Pick any item to put in position #1\#1: that's nn choices. For each choice, the remaining n1n - 1 items fill the other n1n - 1 slots in any order: (n1)!(n - 1)! ways. Multiply.

Each group row in the completed area has:

• A tinted background in a faint version of the group's color.

• A colored accent stripe on the left edge.

• A left-side avatar showing the first item: a colored circle with the item's number in balls mode, or the letter in letters mode.

• Mini permutation cards, each one a full arrangement starting with that item.
P(3) = 3! = 6Complete · 6 / 6SOURCE (n = 3)123BUILD AREA#1#2#3COMPLETED6 / 6112313222132313312321
n = 3 complete, frozen

Six cards in three tinted rows: each first item owns exactly two arrangements, and 3 × 2 = 6 is the whole formula in one picture.

The frozen frame above is the finished n=3n = 3 run, and it is the formula drawn to scale: three tinted rows, two cards in each, six cards total. Cover any row with a hand and you have removed exactly (n1)!=2(n-1)! = 2 arrangements — no more, no less.

The rows also explain why the groups can never be uneven: within a row the first slot is fixed, so the cards in it are just the full permutations of the remaining two items. Each row is a smaller copy of the same problem — the recursion n!=n(n1)!n! = n \cdot (n-1)! made literal.

Transport Controls

The control bar offers four transport buttons plus a speed slider:

(Step back) — walks the animation one step backward. Useful for re-examining a single permutation or pausing mid-build.

Step ▶ (Step forward) — advances one ball into one slot. Stop after each step to read the partial arrangement.

▶ Play / ⏸ Pause — runs the animation continuously until all n!n! permutations are built, then auto-pauses.

↺ Reset — clears the completed section and starts over from the first permutation.

The Speed slider controls how fast play advances. At higher speeds the fly and land timings shrink proportionally; at slower speeds you can clearly see each ball travel from source to slot and follow the dotted guide line in detail.

Mode Switch

The Mode switch at the start of the control bar toggles how each item is rendered:

Balls mode (default) — items appear as colored circles. The first-item avatar in each completed group is a circle with the item's number. Best for tracking position and group membership visually.

Letters mode — items appear with letter labels (A, B, C, …). The first-item avatar in each completed group is just the letter, colored to match. Best for reading off the sequence in each permutation and matching it to algebraic notation like (A,B,C)(A, B, C).

The encoding is consistent across the source row, the build slots, the flying ball, every mini permutation card in the completed grid, and the right-panel narration. Switching modes mid-animation is safe — the build state preserves; only the rendering changes.

Right Panel and Progress

The right panel narrates the build as it unfolds. Initially empty, it adds a StepRow for each first-item group as soon as a permutation in that group either starts building or completes.

Each StepRow shows:

• The first item as a chip plus its name — for instance, *First item: A* or the equivalent in balls mode.

• A progress counter like k/(n1)!k / (n - 1)! that tracks how many permutations in this group have completed.

• A short narration explaining the structure: *Position 1 is locked to A. The remaining n1n - 1 positions are filled with B or C or … in (n1)!=M(n - 1)! = M ways.*

• A status marker (current, done) that updates as the group progresses.

When all groups complete, every StepRow shows *(n1)!/(n1)!(n-1)! / (n-1)! \checkmark* and the overall counter in the header reaches n!/n!n! / n!.

What Is a Full Permutation

A full permutation of nn distinct items is an arrangement of all nn items in a line, where order matters and no item repeats. The number of such arrangements is the factorial of nn:

P(n)=n!=n×(n1)×(n2)××2×1P(n) = n! = n \times (n - 1) \times (n - 2) \times \cdots \times 2 \times 1


Examples of full permutations:

• Arranging 55 books on a shelf: 5!=1205! = 120 orderings.

• Lining up 44 runners for a relay: 4!=244! = 24 lineups.

• Listing the order of finish in a race with 66 distinct competitors: 6!=7206! = 720 rankings.

The full permutation is the simplest of the five permutation scenarios — no repeated items, no partial selection, no circular structure. Every item used, every position distinct, every order counted separately.

On this page the idea runs live: from the opening position, the build area assembles one arrangement at a time, the completed grid groups results by first item, and changing n rescales the whole enumeration — up to the 120-arrangement view at n=5n = 5.

For deeper coverage of full permutations and the other four scenarios, see the full permutation section on the permutations theory page.

Deriving n! Step by Step

The factorial formula follows from the multiplication principle of counting. Build the permutation one position at a time:

Position $\#1$: any of the nn items can go here. nn choices.

Position $\#2$: any of the remaining n1n - 1 items. n1n - 1 choices.

Position $\#3$: any of the remaining n2n - 2 items. n2n - 2 choices.

\dots

Position $\#n$: only 11 item left. 11 choice.

Multiply the choices at each step:

n×(n1)×(n2)××1=n!n \times (n - 1) \times (n - 2) \times \cdots \times 1 = n!


The tool visualizes the equivalent split: fix the first item (nn ways), then permute the rest ((n1)!(n - 1)! ways), giving n×(n1)!=n!n \times (n - 1)! = n!. Every row in the completed section is one of those nn first-item families.

Factorials grow extremely fast: 5!=1205! = 120, 10!3.610! \approx 3.6 million, 20!2.4×101820! \approx 2.4 \times 10^{18}. This is why full permutations of even moderately large sets are uncountable in practice — you need the formula, not enumeration.
P(5) = 5! = 120Complete · 120 / 120SOURCE (n = 5)12345BUILD AREA#1#2#3#4#5COMPLETED120 / 12011234512354124351245312534125431324513254134251345213524135421423514253143251435214523145321523415243153241534215423154322213452135421435214532153421543231452315423415234512351423541241352415324315243512451324531251342514325314253412541325431331245312543142531452315243154232145321543241532451325143254134125341523421534251345123452135124351423521435241354123542144123541253413254135241523415324213542153423154235142513425314312543152432154325143512435214512345132452134523145312453215512345124351324513425142351432521345214352314523415241352431531245314253214532415341253421541235413254213542315431254321
n = 5 complete, frozen

One hundred twenty mini cards in five rows of twenty-four — the factorial explosion at the largest n the tool allows.

The frozen frame above shows the derivation's endpoint at the tool's largest setting: n=5n = 5, all 120120 arrangements on screen, cards shrunk just to fit. It is the last value where enumeration is even drawable — and that is the point. Two more items would demand 5,0405{,}040 cards; the picture would fail long before the formula does.

Seen against the six-card and twenty-four-card views reached by adjusting n, this frame is the third term of a geometric story: 6, 24, 120 — each step multiplying by the new nn. Enumeration is the proof; the factorial is the escape from ever needing it again.