Advanced maths

Ideal and quotient ring calculator

Generate a principal ideal in Z/nZ, partition residues into cosets and inspect exact quotient addition and multiplication tables with an SVG diagram.

Your numbers

The original ring is Z/nZ. A small bound keeps the complete coset and operation tables inspectable.
Any whole generator in this range, including zero or a negative value. It is reduced modulo n first.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Try it, understand it

Explore the result

Compare the size of an ideal, its cosets and the resulting quotient without confusing the original modulus with the quotient modulus.

Worked example comparison
ExampleOutputWhat to notice
Four cosets of a twelve-element ringNumber of quotient-ring elements4The ideal {0,4,8} produces a quotient isomorphic to Z/4Z.
Zero idealNumber of quotient-ring elements12Singleton cosets leave a quotient isomorphic to Z/12Z.
Whole-ring idealNumber of quotient-ring elements1The generator is coprime to 12, so one coset remains.
Prime quotientNumber of quotient-ring elements3The quotient is Z/3Z and is a field.

Check your understanding

Do generators 4 and 8 give different ideals modulo 12?

No. Both have gcd 4 with 12 and generate {0,4,8}.

Is coset addition the union of the two member sets?

No. It is induced by the ring addition and produces another coset.

Behind the numbers

How this calculation works

Reduce the ideal generator modulo the original modulus. Its gcd with n gives the step between ideal members and the number of quotient cosets. The diagram groups every original residue by its coset, while the two operation tables work on coset representatives modulo that gcd.

THE FORMULAd = gcd(n,k); I = {0,d,2d,…,n−d}; (Z/nZ)/I ≅ Z/dZ

A worked example

For n = 12 and k = 8, d = 4 and I = {0,4,8}. The quotient has four cosets: {0,4,8}, {1,5,9}, {2,6,10} and {3,7,11}. C3 + C2 = C1 and C3 × C2 = C2. The quotient is isomorphic to Z/4Z and is not a field.

Good to know

Exact finite integer-ring model, n from 2 to 48 and |k| at most 10^12. Does not construct a polynomial quotient ring or accept arbitrary ring presentations. The one-element quotient is the zero ring and is not classified as a field. SVG row positions are a partition schematic, not distances.

A little curiosity

Distinguish the original ring from its quotient

The original ring contains the n residue classes modulo n. The generator k specifies an ideal inside that ring. The quotient then treats members of the same ideal coset as one new element. Those are three different objects: original residues, the ideal and quotient elements. The displayed number of quotient elements is therefore not generally the original modulus.

For Z/12Z with generator 8, repeated multiples of 8 give residues 0, 8, 4 and then 0 again. The ideal is {0,4,8}. Its three members become the zero coset C0. Four distinct cosets cover the twelve original residues, so the quotient has four elements. The gcd 4 predicts the quotient size, while 12 divided by 4 predicts the size of each coset.

Read cosets as complete membership groups

The diagram displays one row for each coset and a chip for each original residue in that group. Each original residue belongs to exactly one row. In the example, C1 is {1,5,9}; entering a different representative from that same set does not create a new quotient element. This partition is the reason quotient arithmetic can use short labels rather than listing a set in every cell.

The finite set operations calculator can compare membership in two sets, but a ring quotient also needs compatible addition and multiplication. A coset sum is not set union. The subgroup and coset finder addresses additive or other group structure separately; multiplication in a quotient ring uses the ideal property to ensure that changing representatives leaves the same product coset.

Use both operation tables

Rows labeled Addition use the quotient sum. Rows labeled Multiplication use its product. Their column headers are quotient cosets, not the original integers. For d = 4, C3 + C2 gives C1 because 3 + 2 leaves remainder 1 modulo 4. C3 multiplied by C2 gives C2 because 3 times 2 leaves remainder 2 modulo 4. Every cell is constructed by exact bounded integer arithmetic.

The original generator need not divide n. The ideal depends on gcd(n,k), so generators 8 and 4 produce the same ideal in Z/12Z. Negative generators are reduced first: −4 has residue 8 and therefore gives that same ideal. This is an arithmetic fact about the generated ideal, not an approximation based on the spacing of the diagram.

Check the zero ideal whole ideal and field cases

Generator zero creates the zero ideal {0}. Its cosets are singletons, so the quotient remains isomorphic to the original Z/nZ. A generator coprime to n creates the entire ring as its ideal; all original residues collapse into one coset. That one-element quotient has 0 equal to 1 and is treated as the zero ring rather than a field in this calculator.

A quotient is a field here exactly when d is prime. For n = 12 and k = 6, d = 6 is composite and the quotient has nonzero zero divisors. For n = 12 and k = 3, d = 3 is prime, and every nonzero quotient class has a multiplicative inverse. The linear congruence solver can inspect an individual inverse by solving a·x ≡ 1 modulo d, while this field classification concerns the entire quotient ring.

Keep integer and polynomial quotients separate

The finite polynomial quotient calculator works with a different starting ring and a polynomial modulus. It cannot be substituted for a principal ideal inside Z/nZ merely because both pages use the word quotient. Here, n and k are whole numbers and every displayed original residue is an integer class. No polynomial coefficient field or irreducibility test is implied.

The complete tables and partition remain available for copying or export, and the SVG download contains the same set membership as the on-page sketch. The small modulus bound is there to keep these complete structures usable on an ordinary page. It is not a claim that larger rings lack quotients or that a picture proves arbitrary ring properties.

A few questions, answered

Must k divide n?

No. The ideal is determined by gcd(n,k). The generator is reduced modulo n before constructing the ideal.

Why are there gcd(n,k) quotient elements?

The ideal has n/gcd(n,k) members and its cosets partition n original residues into equal-sized groups.

Is the one-element quotient a field?

Not under the convention used here. It is the zero ring, where 0 equals 1.

Can I enter a polynomial ideal?

No. This page handles a principal ideal in the finite integer ring Z/nZ. Use the separate finite polynomial quotient tool for its supported polynomial task.

Find your calculator

Start typing to explore the library.