Calculator
Example data table
Sample permutation: p = [3, 1, 4, 2] on the domain 1 to 4. Its inverse is p-1 = [2, 4, 1, 3].
| x | p(x) | p-1(x) | p-1(p(x)) |
|---|---|---|---|
| 1 | 3 | 2 | 1 |
| 2 | 1 | 4 | 2 |
| 3 | 4 | 1 | 3 |
| 4 | 2 | 3 | 4 |
Formula used
Core inverse rule: p-1(p(i)) = i and p(p-1(i)) = i.
One-line construction: if p = [a1, a2, ..., an], then place i at position ai in the inverse. In indexed form, p-1(ai) = i.
Cycle rule: the inverse of a cycle reverses its direction. So (a b c d)-1 = (a d c b).
Verification: every row must satisfy p-1(p(x)) = x. The calculator checks this in the result table.
How to use this calculator
- Select one-line, mapping, or cycle notation.
- Choose whether your labels start from 0 or 1.
- Enter the permutation in the input box.
- Set an expected size when cycle notation omits fixed points.
- Choose whether to show fixed points, verification, and steps.
- Press Calculate inverse to display the answer above the form.
- Review one-line, mapping, cycle, parity, order, and graph outputs.
- Use the CSV or PDF buttons to export the solved table.
FAQs
1) What is an inverse permutation?
It undoes the original rearrangement. If p sends i to j, then p-1 sends j back to i. Composing them returns every element to its starting position.
2) When does an inverse exist?
An inverse exists only when the input is a valid permutation. Every value must appear once, no duplicates may occur, and the mapping must cover the full domain exactly.
3) Can I use cycle notation here?
Yes. Enter cycles such as (1 3 4 2). The calculator reverses each cycle’s direction for the inverse, while omitted elements remain fixed when the chosen size includes them.
4) What is the difference between 0-based and 1-based indexing?
Base indexing defines the domain labels. With 1-based indexing, positions are 1 to n. With 0-based indexing, positions are 0 to n-1. Choose the one matching your notation.
5) Why did validation fail?
Validation fails when numbers repeat, values fall outside the chosen domain, mapping keys skip labels, or the list is not a bijection. Correct the notation and calculate again.
6) Does the inverse change parity or order?
No. A permutation and its inverse have the same parity, the same cycle lengths, and the same order. Only the direction inside each cycle changes.
7) Why are fixed points missing from the cycle output?
Cycle notation often omits fixed points to stay compact. Enable the fixed-point option to show one-cycles, or leave it off for a shorter decomposition.
8) How does the graph help?
The graph compares p(x) and p-1(x) across the domain. Crossings and reversals make the rearrangement pattern easier to inspect than a raw list alone.