Element orders and subgroups

The order of every element of Z_n* or Z_n, how many have each order, and every subgroup with the lattice of inclusions.

How it works

The order of an element $a$ is the smallest $k \ge 1$ with $a^k = 1$ (in $\mathbb Z_n$: $k \cdot a \equiv 0$). The powers of $a$ form the cyclic subgroup $\langle a \rangle$ of that size, and by Lagrange’s theorem the size of every subgroup divides the size $N$ of the group.

In a cyclic group of order $N$ the picture is simple: for every divisor $d$ of $N$ there is exactly one subgroup of order $d$, and it holds exactly $\varphi(d)$ elements of order $d$. $\mathbb Z_{18}^*$ has $6$ elements and $4$ subgroups, of orders $1, 2, 3, 6$. A group that is not cyclic can have several subgroups of the same order: $\mathbb Z_8^* = \{1, 3, 5, 7\}$ has three of order $2$, and $\mathbb Z_{15}^*$ has three subgroups of order $4$, two cyclic and one not.

The tool finds every subgroup from the cyclic ones: it adds one element at a time and closes up under the operation. The table lists each subgroup with its elements, generators and the subgroups directly above it, which is the subgroup lattice. In cryptography a subgroup of small order is a danger: an attacker who sends an element of it learns the secret exponent modulo that order.

Everything is calculated in your browser. Nothing you type leaves your device.