Compute Zn and unit groups accurately quickly. Check cyclicity, generators, and subgroup elements automatically here. Download results, verify steps, and learn formulas clearly now.
Choose a group model, enter parameters, then compute generators and orders.
| Group | n | a | Expected highlight |
|---|---|---|---|
| Additive Z_n | 12 | 5 | gcd(5,12)=1, so 5 generates Z_12. |
| Unit group U(n) | 10 | 3 | phi(10)=4, and 3 has order 4 (generator). |
| Unit group U(n) | 12 | 5 | U(12) is not cyclic by classification. |
a is n / gcd(a,n). An element is a generator iff gcd(a,n)=1.phi(n) (Euler's totient function).n = product p_i^{e_i}, then phi(n) = n product (1 - 1/p_i).phi(n). Order of a unit a is the smallest k with a^k congruent 1 (mod n).n = 1,2,4,p^k,2p^k where p is an odd prime.phi(phi(n)).A cyclic structure compresses an entire group into one repeatable step. In Z_n, the generator test is gcd(a,n)=1. For n=12, a=5 gives gcd=1, so the subgroup size equals 12 and the sequence hits every residue once. When gcd(a,n)=d>1, the subgroup size becomes n/d; for n=12, a=4 yields size 3.
The order of an element is the length of its orbit before returning to identity. Additively, ord(a)=n/gcd(a,n). With n=30 and a=12, gcd=6 and ord=5. Multiplicatively, ord(a) is the smallest k with a^k≡1 (mod n). For n=10 and a=3, ord=4, matching phi(10)=4.
phi(n) counts integers 1..n−1 that are coprime to n. It also equals the number of generators of Z_n. For n=15, phi(15)=15(1−1/3)(1−1/5)=8, meaning eight generators exist. In cyclic U(n), the generator count is phi(phi(n)); for n=10, phi(n)=4 and phi(4)=2.
Unit groups are not always cyclic. The known classification says U(n) is cyclic only for n=1,2,4,p^k, or 2p^k with odd prime p. This explains why U(12) fails: phi(12)=4, but no element reaches order 4. In contrast, n=14 fits 2·7, so U(14) is cyclic and contains generators.
The graph plots step index k on the x-axis and the subgroup element on the y-axis. A full-length orbit indicates generation. In Z_17 with a=3, the plotted values cover 0..16. In U(9) with a=2, the values cycle through units {1,2,4,8,7,5} with orbit length 6, equal to phi(9)=6, so 2 is a generator.
CSV exports keep numeric fields ready for audit: n, a, gcd, order, and subgroup listing. The PDF export provides a print-friendly snapshot for lectures and reports. Using list limits (10–500) prevents heavy pages for large n, while preserving correctness for computed invariants like phi(n) and element order.
It means there exists an element a such that repeated addition of a generates every residue class 0..n−1. The calculator checks this by gcd(a,n)=1 and shows the full sequence.
U(n) contains only invertible residues modulo n. An element is invertible exactly when gcd(a,n)=1. Otherwise, multiplication cannot produce an identity cycle within U(n).
The tool computes phi(n), factors it, and repeatedly tests reduced exponents. This avoids brute forcing all k, and typically finds the smallest k with a^k ≡ 1 (mod n) quickly.
Some moduli create unit groups with multiple independent cycles. For example, U(12) has size 4 but splits into smaller cycles, so no element reaches order 4, and the group is not cyclic.
Only the displayed table and graph are truncated. Core invariants such as gcd(a,n), phi(n), cyclicity classification, and computed order of a remain accurate for the provided inputs.
Try Z_12 with a=5 for a generator, Z_12 with a=4 for a proper subgroup, U(10) with a=3 for a cyclic unit group, and U(12) with a=5 to show a non-cyclic case.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.