Permutation Cycle Notation Calculator
Convert permutations, compose them, and compute cycles, order, parity, powers, and inverses.
Results are calculated automatically as you enter data.
▼ See explanations and tips below ▼
Related Calculators
What Is Permutation Cycle Notation?
A permutation is a rearrangement of a finite set in which every element is used exactly once. In this context, the set is usually written as \(\{1,2,\ldots,n\}\), and a permutation tells where each number goes.
For example, the one-line notation
means
Cycle notation writes the same information by following each element until it returns to where it started. In the example above, \(1\) goes to \(2\), \(2\) goes to \(3\), and \(3\) goes back to \(1\), so those three elements form the cycle \((1\,2\,3)\). The elements \(4\) and \(5\) swap places, so they form the cycle \((4\,5)\).
Therefore,
This is called disjoint cycle notation because the cycles do not share any elements. Disjoint cycles are useful because they reveal the structure of a permutation at a glance: which elements move together, which elements are fixed, how long the repeated motion lasts, and how the permutation behaves under powers and inverses.
Why Cycle Notation Matters
One-line notation is compact, but it can hide patterns. Cycle notation shows those patterns directly.
Cycle notation is especially useful when you need to:
- understand how a permutation moves elements;
- find the inverse of a permutation;
- compute powers such as \(A^2\), \(A^5\), or \(A^{-1}\);
- determine the order of a permutation;
- compare even and odd permutations;
- work with symmetric groups in algebra;
- model rearrangements, shuffles, rotations, swaps, and puzzles.
Instead of repeatedly applying a permutation one value at a time, the cycle form lets you reason from the lengths and directions of the cycles.
Key Terms to Know
- Permutation: A bijection from a finite set to itself. Every input has exactly one output, and every output is used exactly once.
- One-line notation: A list of images, such as \([2,3,1,5,4]\), meaning \(\sigma(1)=2\), \(\sigma(2)=3\), and so on.
- Two-line notation: A notation with the domain on the top row and the images on the bottom row.
- Cycle: A sequence such as \((1\,2\,3)\), meaning \(1\mapsto2\), \(2\mapsto3\), and \(3\mapsto1\).
- Disjoint cycles: Cycles that do not share elements, such as \((1\,2\,3)\) and \((4\,5)\).
- Fixed point: An element that maps to itself, such as \(4\) when \(\sigma(4)=4\).
- Identity permutation: The permutation that leaves every element fixed.
- Inverse permutation: The permutation that undoes the original permutation.
- Composition: Applying one permutation and then another.
- Order: The smallest positive number of times a permutation must be applied to return to the identity.
- Parity: Whether a permutation is even or odd, commonly determined by the parity of its inversion count or by the number of transpositions in a decomposition.
- Inversion: A pair of positions \(i<j\) where the entries are out of order, meaning \(\sigma(i)>\sigma(j)\).
How Permutation Cycle Notation Works
A permutation on \(\{1,2,\ldots,n\}\) can be written in two-line notation as
To convert a mapping to disjoint cycles, start with the smallest unused element and repeatedly apply the permutation until the path returns to the starting element. Then start again with the next unused element.
For the mapping
start with \(1\):
That gives the cycle \((1\,2\,3)\). The next unused element is \(4\):
That gives the cycle \((4\,5)\). So the full disjoint cycle form is
Fixed points
A fixed point is an element that does not move. If \(\sigma(i)=i\), then \(i\) is fixed. Fixed points are often omitted from the main cycle notation because they do not change the action of the permutation.
For example,
when fixed points are omitted. If fixed points are included, the same permutation can be written as
The identity permutation fixes every element. When fixed points are omitted, it may be displayed as \(()\).
Inverses
The inverse of a permutation reverses the direction of every movement. If
then
A cycle is inverted by reversing its order:
For a two-element cycle such as \((4\,5)\), the inverse is the same cycle because swapping twice undoes the swap.
Powers
A power means applying the same permutation repeatedly. For example, \(\sigma^2\) means apply \(\sigma\) twice.
If
then
The cycle \((4\,5)\) disappears from the simplified notation for \(\sigma^2\) because applying a swap twice returns \(4\) and \(5\) to themselves.
The exponent \(0\) always gives the identity permutation:
Negative powers use the inverse:
Order of a permutation
The order of a permutation is the smallest positive integer \(m\) such that
In disjoint cycle notation, the order is the least common multiple of the cycle lengths:
where \(\ell_1,\ell_2,\ldots,\ell_r\) are the lengths of the disjoint cycles.
For
the cycle lengths are \(3\) and \(2\), so
That means applying \(\sigma\) six times returns every element to its starting position.
Composition order
Composition means applying one permutation first and then the other. The notation
means apply \(B\) first, then apply \(A\).
This order matters. For example, let
Then
but
So “A after B” is not the same as “B after A” in general.
Parity and inversions
For a one-line permutation \(\sigma\), an inversion is a pair of positions \(i<j\) where
The inversion count is
A permutation is even if its inversion count is even and odd if its inversion count is odd. Equivalently,
For
the inversions are caused by \(2>1\), \(3>1\), and \(5>4\). There are \(3\) inversions, so the permutation is odd.
Examples of Permutations in Practice
Example 1: Convert a one-line mapping to cycle notation
Suppose
Write it as a mapping:
Trace from \(1\):
so the first cycle is \((1\,2\,3)\). Then trace from \(4\):
so the second cycle is \((4\,5)\).
The disjoint cycle notation is
The order is
and the permutation is odd because it has \(3\) inversions.
Example 2: Find an inverse
Let
Reverse each cycle:
This inverse sends \(2\) back to \(1\), \(3\) back to \(2\), \(1\) back to \(3\), and swaps \(4\) and \(5\) again. Applying \(A\) and then \(A^{-1}\) returns every element to itself.
Example 3: Compute a power
Using the same permutation,
apply \(A\) twice. The \(3\)-cycle advances by two steps, while the \(2\)-cycle advances by two steps and returns to the identity:
In one-line notation, this is
Example 4: Understand a fixed-point edge case
Consider
Here, \(1\mapsto1\) and \(4\mapsto4\), so \(1\) and \(4\) are fixed points. The nontrivial movement is only
With fixed points omitted,
With fixed points included,
Both forms describe the same permutation; the second form simply shows the fixed points explicitly.
How to Interpret the Result
The main disjoint cycle notation describes the primary permutation. If the result is \(()\), then there are no nontrivial cycles under the default convention, meaning the permutation is the identity when fixed points are omitted.
The order tells how many repeated applications are needed to return every element to its starting position. A small order means the permutation repeats quickly. A larger order means the combined cycle lengths take longer to align back at the identity.
The parity result tells whether the permutation is even or odd. When the result says “even,” the inversion count is even. When it says “odd,” the inversion count is odd.
The fixed points are elements that do not move. If no fixed points are listed, every element moves somewhere else. If fixed points are listed, those elements stay in place even if other elements move.
The inverse shows the permutation that undoes the primary permutation. If applying \(A\) sends an element forward, applying \(A^{-1}\) sends it back.
The two-line form shows the full mapping from each domain element to its image. It is often the clearest way to check the exact value of \(A(i)\) for a specific \(i\).
The power result shows \(A^k\), where \(k\) is the selected integer exponent. Positive powers repeat the permutation, \(0\) returns the identity, and negative powers repeat the inverse.
The composition result appears when a second permutation is supplied. “A after B” means \(A(B(x))\): apply \(B\) first, then \(A\). “B after A” means \(B(A(x))\): apply \(A\) first, then \(B\).
The mapping diagram visualizes arrows of the form \(i\mapsto A(i)\). Loops represent fixed points.
Common Mistakes and Misconceptions
A valid permutation on \(\{1,2,\ldots,n\}\) must contain each integer from \(1\) through \(n\) exactly once. A list such as \([2,2,1]\) is not a permutation because \(2\) is repeated and \(3\) is missing.
Another common mistake is using zero-based indexing. In this setting, the elements are \(1,2,\ldots,n\), not \(0,1,\ldots,n-1\). A value of \(0\) is not a valid image.
Composition order is also easy to misread. “A after B” means apply \(B\) first and then \(A\). It does not mean that \(A\) is applied first.
Fixed points may not appear in the main cycle notation. If a result shows \((2\,3)\), that does not necessarily mean the set has only two elements. It may mean all other elements are fixed and omitted.
Do not assume cycle notation can be pasted into every import field. A calculator may accept one-line, two-line, or two-column mapping formats while not accepting cycle notation as an import format.
Finally, powers of permutations use integer exponents. A fractional exponent such as \(A^{1/2}\) is not part of the usual finite permutation power operation handled here.
When to Use Permutation Cycle Notation
Use cycle notation when you want to understand the structure of a permutation, not just list its outputs.
It is especially helpful for:
- converting a mapping table into a more readable form;
- finding repeated behavior under powers;
- checking whether a permutation is the identity;
- finding inverse permutations;
- comparing composition orders;
- studying symmetric groups and elementary group theory;
- analyzing puzzles or rearrangement processes where elements move in cycles.
One-line notation is often best for direct data entry. Cycle notation is often best for understanding.
Limitations and Things to Keep in Mind
Permutation notation is exact, so there is no decimal rounding. Cycle entries, fixed points, inverse mappings, powers, composition outputs, inversion counts, parity, and order are all integer-based results.
The usual setup here assumes the permutation acts on \(\{1,2,\ldots,n\}\). Custom symbols, negative labels, decimals, fractions, missing values, duplicate values, and out-of-range values are not valid in this setting.
A second permutation can be composed with the first only when both act on the same size set. For example, a permutation of \(\{1,2,3,4\}\) cannot be directly composed with a permutation of \(\{1,2,3,4,5\}\) without first changing the domain.
Negative integer powers are meaningful because every permutation has an inverse. Fractional powers are not generally supported in elementary finite permutation calculations.
Very large permutations can be mathematically valid but harder to read. Long cycle notation may be bulky, and mapping diagrams can become crowded.
How to Use This Calculator
- Enter the values of \(A(i)\) in the primary mapping table.
- Make sure the values contain each integer from \(1\) through \(n\) exactly once.
- Optionally enter a second permutation \(B(i)\) if you want a composition result.
- Choose the composition order: A after B for \(A(B(x))\), or B after A for \(B(A(x))\).
- Enter an integer power \(k\) for \(A^k\), or leave the power blank to use \(0\).
- Use the import option when you want to paste one-line, two-line, or two-column integer mapping notation.
- Review the cycle notation, order, parity, fixed points, inverse, power, composition, and diagram outputs.
Frequently Asked Questions
What does \(()\) mean in cycle notation?
The notation \(()\) means the identity permutation when fixed points are omitted. It means every element maps to itself, so there are no nontrivial cycles to display.
Why are some numbers missing from the cycle notation result?
Missing numbers are usually fixed points. For example, on the set \(\{1,2,3,4\}\), the notation \((2\,3)\) means \(2\) and \(3\) swap, while \(1\) and \(4\) stay fixed.
How do I know whether my mapping is a valid permutation?
For a permutation of \(\{1,2,\ldots,n\}\), the list of values must contain every integer from \(1\) through \(n\) exactly once. If a value is repeated, missing, zero, negative, fractional, or outside the range, the mapping is not valid.
Is “A after B” the same as applying A first?
No. “A after B” means apply \(B\) first and then apply \(A\), which is written as \(A(B(x))\). This convention follows the usual notation for function composition.
Why is the order the least common multiple of the cycle lengths?
Each cycle returns to its starting position after a number of applications equal to its length. The whole permutation returns to the identity only when all cycles return at the same time, so the order is the least common multiple of the cycle lengths.
Can a permutation have a negative power?
Yes, as long as the exponent is an integer. A negative power uses the inverse permutation, so \(A^{-2}\) means apply \(A^{-1}\) twice.
Can I import cycle notation directly?
This calculator’s import format is for integer mappings, such as one-line notation, two-line notation, or two-column notation. Cycle notation import is not supported.
Sources and References
Books and Textbooks
- Thomas W. Judson. Abstract Algebra: Theory and Applications. Open-source textbook, Chapter 5, “Permutation Groups,” especially Section 5.1, “Definitions and Notation.” Available through Judson Books and Mathematics LibreTexts. LibreTexts section and Judson Books.
- Al Doerr and Ken Levasseur. Applied Discrete Structures. Mathematics LibreTexts, Chapter 15, “Group Theory and Applications,” Section 15.3, “Permutation Groups.” LibreTexts section.
Online and Educational Sources
- Pamini Thangarajah. “3.1: Symmetric Groups.” Mathematics LibreTexts / Mount Royal University Abstract Algebra I, accessed July 4, 2026. Source.
- Eric W. Weisstein. “Permutation Inversion.” MathWorld—A Wolfram Resource, accessed July 4, 2026. Source.
- Eric W. Weisstein. “Inverse Permutation.” MathWorld—A Wolfram Resource, accessed July 4, 2026. Source.