Ring and Field Calculator screenshot

Ring and Field Calculator

Classify Z/nZ as a ring or a field and list its units, zero divisors, idempotents and nilpotents, each decided by a gcd or a modular power.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
No sign-up, no upload
Exact integer arithmetic

Ring and Field Calculator

Classify Z/nZ as a ring or a field and list its units, zero divisors, idempotents and nilpotents, each decided by a gcd or a modular power.

How this page computes

The modulus is factorised by trial division. One pass over the residues collects the units (gcd 1) and the zero divisors (gcd above 1), and a second pass squares each residue to find the idempotents.

Primality is read from the factorisation, and nilpotency from the distinct prime factors. A pair of zero divisors whose product is 0 is found and printed, so the not-a-field claim has a witness.

The calculation runs entirely in this browser tab; nothing is uploaded.

The integers modulo n form a ring, and the page says exactly what kind. For n = 12 it reports a commutative ring with 1 that is not a field, because 2 × 6 = 12 = 0 while neither factor is 0.

For a prime modulus the ring is a field, and every non-zero residue has an inverse. The page lists the units, the zero divisors, the idempotents and the nilpotents, each computed by a gcd or a modular power rather than read from a table.

How to use Ring and Field Calculator

Type the modulus and press Run. The modulus must be at least 2, because modulo 1 every residue is 0 and the ring is trivial.

The output names the structure, then lists the four interesting subsets with counts, then prints a concrete product that shows a zero divisor when one exists. Long lists are summarised with their count rather than cut off silently.

Four membership tests, each one line of arithmetic

A residue is a unit exactly when it is coprime with n, which is a gcd. It is a zero divisor exactly when it is non-zero and not coprime, which is the same gcd negated. Both sets come from one pass over the residues.

An idempotent satisfies a² = a and a nilpotent has some power equal to 0. For Z/nZ an element is nilpotent exactly when every prime factor of n divides it, so the prime factorisation decides it without testing powers one by one.

What to Expect

Best for

  • Deciding whether Z/nZ is a field
  • Listing the units and zero divisors of a small modulus
  • Seeing why a composite modulus has no inverses for some residues

Not ideal for

  • Polynomial rings or other rings, which are different structures
  • A modulus above one hundred thousand, where the enumeration would be slow
  • The multiplicative order of one element, which has its own page

What this tool keeps

  • The modulus exactly as typed

What may need cleanup

  • Nothing: every list is computed, not looked up

Common errors

  • A modulus below 2 is refused
  • A non-integer modulus is refused by name

Example use cases

  • See that Z/12Z is not a field and name a zero divisor
  • Confirm that Z/7Z is a field
  • List the idempotents of Z/12Z

Sample input

n = 12

Sample output

a ring that is not a field, with units 1, 5, 7, 11 and zero divisors 2, 3, 4, 6, 8, 9, 10

Who this is for

  • Students meeting ring theory
  • Readers checking a modular-inverse question

Frequently asked questions

Why is Z/12Z not a field?

Because 2 has no inverse modulo 12: every multiple of 2 is even, so none can be congruent to 1 modulo an even number. The page prints that product, 2 x 6 = 0, as the witness.

What is an idempotent?

An element that equals its own square. Every ring has at least 0 and 1, and Z/12Z has two more, 4 and 9, because 4² = 16 = 4 and 9² = 81 = 9 modulo 12.

Is every non-zero element of Z/pZ a unit when p is prime?

Yes, and that is exactly why it is a field. A prime shares no factor with any smaller positive integer, so the gcd test passes for every non-zero residue.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.