This website is supported by the iPhone app called Frrraction.
Current with Frrraction Version 0.96.11
Modular numbers, or residues, are a generalization of circular measurements such as hourly time: 1 through 24 o'clock on an analog clock (residues modulo 24); or compass heading: 1 through 360 degrees on a circle (residues modulo 360).
Modular arithmetic is about position and distance around such circles, adjusted to ignore full trips around the circle in either direction, as in: "What time is 17 hours later than 10 o'clock?"," or "4 hours earlier than 3 o'clock ?" The answers can be calculated by ordinary arithmetic as 10 + 17 = 27 and 3 - 4 = -1 — and then adjusted for the circle to get the normal residue answers: 27 - 24 = 3 (wee hours) and -1 + 24 = 23 o'clock (late evening) .
Frrraction treats only the most interesting version of modular arithmetic, the exact integer version.
↑ to menuReal numbers are well represented by positions and distances along an infinitely long straight line, the real line. Modular numbers are similarly represented by positions and distances around a circle, the modular circle.
The modular circle brings a wrinkle to the position metaphor: Each position around the modular circle, from zero to just shy of the modulus m, represents a unique residue modulo m. But whereas each position on the real line has a unique label, each position on the modular circle logically admits infinitely many labels. The labels are integers, subject to integer arithmetic, while the positions they label are residues, subject to modular arithmetic. Adding integer multiples of the integer m to any label yields an alias for that label—another equivalent label for the identical residue position.
↑ to menuIt is customary but not mandatory to refer to residues by their remainders. For instance it would not be wrong to say that the sum 16 + 11 modulo 24 is 27, but commonly — as is standard usage in common examples like time and compass heading — we prefer to use the remainder, 3 — even though that requires a bit of extra computation.
Virtually every computer language makes that easy by providing a special and very efficient instruction — often called something like mod(r,m) — which replaces r by its modulo-m remainder. Frrraction uses such a function at the end of virtually all its modular computations, to support the "remainder" convention.
↑ to menuNegative positions on the number line are shown to the left of the 0-position. In contrast, a negative label on the modular circle, say t−m where t < m, requires no new space on the circle—it is simply an alias for the label t.
↑ to menuThe arithmetic of addition and subtraction plays well with such positional metaphors as displacements, on the modular circle as well as on the real number line: To add a positive number to a position is to move the added distance to reach a position—to the right on the line or clockwise on the circle; subtraction moves linearly left or circularly counterclockwise.
Modular multiplication, too, is mostly straightforward, but needs extra interpretation. Division has always been and remains the trickiest math op.
↑ to menuWhen 'op' is '+' or '−' then one but not both of the operands of the infix expression "a op b" can be a position, the other one or both must be a distance (displacement). If one operand is a position the result will be a position; it doesn't matter which of the two operands a or b is the distance. If both operands are distances, the result will be a distance.
↑ to menuMultiplication and division require careful interpretation, especially in the modular case. They operate on and produce only scalars and distances, not positions.
What could 3 o'clock times 10 o'clock or "three 10 o'clocks" mean? Nothing, certainly not along the lines of "30 square o'clocks". But, treating 3 as a scalar operating on 10 and 30 as distances, the arithmetic 3⋅10=30 hours later has clear meaning "on the clock"—and is the same "on the clock" as 6 hours later, and the same as 18 hours earlier, etc. This makes perfect sense of the formula for modular multiplication: multiply two residues by performing integer multiplication on their remainders, then adjust via multiples of the modulus to get the remainder of the result.
So. Multiplying or dividing a scalar by a scalar yields a scalar. Multiplying or dividing a distance by a scalar yields a distance. Dividing a distance by a distance yields a scalar.
Operationally, you don't need to be thinking about the scalar/distance/position distinctions all the time—they really are all just residues.
↑ to menuDivision always has been more devious than multiplication.
The original idea of division was to share some given quantity in equal portions among several recipients. The numerator n was a measure of the given quantity; the denominator d specified the intended number of recipients; and the quotient q was a measure of each of the resulting equal portions. The language suggests that d is a counting number — an answer to the question "How many?" — but usage evolved as arithmetic grew more abstract.
Real numbers use distances along the real line to model all three aspects: The measure of the given quantity, the count of the desired number of portions, and the measure of each resulting portion. Modular numbers do the same with distances around the modular circle.
Generically, denominator d is said to divide numerator n, and we write d | n, if there exists a solution of the equation d⋅q = n. If a solution for q exists and is unique, the solution is called the quotient and we write q = n/d.
The existence of quotients is more easily resolved for residues than for the euclidean integers, which actually stumble over it: All integers except 1 and −1 (the units) suffer a severe restriction on which real integers they can divide. One answer to the general question of which integers a given integer can divide is easily stated: d | n if and only if n is in the trace of d. (The trace of any number is defined to be the set of all multiples of the number. Unfortunately, q⋅d is such a multiple of d, so traces rather beg the question.) The Fundamental Theorem of Arithmetic provides constructive help when it's feasible to factor n and d: It offers that d | n if the list of factors of n includes all the prime power factors of d.
Existence of residue quotients is decisively solved by traces, even though traces are unhelpful for real integers.
Uniqueness remains a big issue for modular division. It proved to be no obstacle for real integer division because integers have primes and a property called The Fundamental Theorem of Arithmetic. Problematically, the residue systems of most moduli do not completely support such a theorem.
The (euclidean-)integer division rule is: Find a solution of d⋅q + r = n, and make up side conditions such as Euclid's 0 ≤ r < d to make q be the quotient. That may seem a bit lame, but the world has survived productively ever since. Interestingly, Euclid's remainders — a mere trick for getting unique integer quotients — actually originated our topic: remainders as a new type of number. And the idea of adding side conditions to the basic equation of division helps with modular quotients as well.
For modular-division, the founders (Euler and Gauss) parlayed real units along technical lines rather than intuitive lines. For instance, the result creates oddities like numbers equal to their own reciprocals: 1÷17≡17, and 1÷37≡37 (modulo 72). This has striking consequences, like: For any residue r modulo 72 it makes r⋅17 ≡ r÷17 as well as r⋅172 ≡ r. You don't see things like that every day in the "real" world but they're common in the residue world. Such quirks help make residues much more interesting than integers.
What the ur-theorists were struck by was the existence of real integers that can divide all real integers: the so-called units, 1 and -1. They appear to have entirely ignored the fact that each real integer i is part of an infinitely large trace of real integers — the multiples of i — which i can perfectly well divide. A special thing about the units 1 and -1 is that their trace contains all the real integers.
The founders then proceeded to notice that unit-like residues are also present in every residue system: Each unit has a reciprocal such that the product of it times its reciprocal is congruent to 1. Gauss called those unit-like residues units. Because of the recent discovery of more units, this website calls the originals euler units and the others residual units (or modal units because of their deep connection with the modulus). In this section we'll stick with euler units.
Gauss based his version of residue division upon that unit-fluke.
* Residue Division a la Euler and Gauss: They must have reasoned something like this: Let the quotient n ÷ d be some residue q. The most fundamental property of any quotient is that it is a solution of an equation or congruence like d⋅q ≡ n. Starting with that, we have n ≡ q⋅d, so
Thus, they defined dividing n by d to mean multiplying n by the reciprocal of d, i.e.
Good news: Euler found some fast and efficient ways to find the value of d-1 which are still good to this day.
This surely should be making sense, since most everything said so far has been fully established number theory for two centuries. It helps if you remember that residues and integers are very different number-systems, and the ancient arithmetic verbs "add", "subtract", "multiply", and "divide" are misnomers in the case of residues.
Consider, for example: The result of adding residues [5] and [7] modulo 10 is [2]--but doesn't adding something result in more? is 2 really more than 5?
Similarly: If you wanted to share 2 things among 3 people, you'd calculate 2 divided by 3, right? If we do it modulo 10 we get [2]/[3] ≡ [4] (mod 10). Try to interpret THAT as sharing 2 things among 3 people! Are we to give each person 4 of the 2 things? Well, yes, in the residue way: If we take 4 things from the original 2, then 2 minus 4 things remain—and 2−4 ≡ 8 (mod 10); we can do it twice more, leaving 8-4-4 ≡ 0, none left—and we did manage to deliver three sets of 4 to our three people, a total of 4 + 4 + 4 ≡ 2 things—which indeed matches the number we originally had.
This may sound like double-talk but it is no embarrassment within the mathematics because actually, residues are technically NOT "an ordered set". "Equal" is well defined (as "congruence") but notions like "smaller" and "larger", "less" and "more", "above" and "below" are undefined.
A mathematician's takeaway from this is that residues and reals are different kinds of numbers, effective to use in different applications. Quite specifically, if accumulation can occur, if less and more are notions that matter, beware of residues. But if residuals, leftovers, periodicity are in some way paramount — then residues might be the numbers to use.
A ship's captain must understand that changing the ship's course by 450 degrees is the same as making a 90-degree right turn: Navigational headings are residues. The ship's First Mate, on the other hand, as logistics officer, must understand that having no fuel oil is different from having m gallons—no matter what modulus m they might be tempted to consider as a way to save money.
So. The answer to the question "Does this all make sense?" is "Well...yes, and sometimes residues are the right numbers to use, and sometimes euclidean integers are the right numbers to use.
↑ to menu
a | b "a divides b" (residues)
a .|. b "a divides b" (euclidean integers)
a / b "a over b" (residues)
a . /. b or a .÷. b "a over b" (euclidean integers)
= equals (generic)
.=. "is equal to" (euclidean integers)
≡...(mod m) "is congruent to" (residues)
|S| "size of S" (number of members)
Gauss got us started, with his euler units†. He divined that the collection of euler units constitutes a special algebraic system that in later generations came to be known as an abelian group.
† I call them that, Gauss probably just called them units.
A group is a collection G of objects (residues, say) with an operation (residue multiplication ⋅ say), with the key properties that
(1) if r and s are both in G then r⋅s is also in G;
(2) there is a unique member ω in G with the property that if r in G then
r⋅ω ≡ r;
and (3) Each r in G has an inverse r-1, also in G, such that
r⋅invr ≡ ω.
The group is abelian if r⋅s ≡ s⋅r
for all r, s in G.
Division Cluster Cr of system Zm consists of the residues s whose
greatest common divisor with m is the same: gcd(s, m)=gcd(r, m).
There is a one-to-one correspondence between division clusters and
euclidean integer divisors of the modulus m.
The mod-m residue and euclidean integer
cr = gcd(r, m) is called the center of the cluster,
and is the only member of Cr that divides m.
We already met one of the clusters: C1 is Gauss's group of euler units. Curiously, Cm is a cluster consisting solely of the residue 0, and — depending on a detail of factorization — it too may be a group of units (group of unit?). Be that as it may, C1 and Cm are the only clusters that exist in every residue system.
Example Z12: The clusters for modulus m=12, showing centers as C-subscripts
and ω-values emphasized, are:
C1={1, 5, 7, 11}e,
C2={2, 10}i,
C4={4, 8}u,
C3={3, 9}u,
C6={6}i, and C12={0}u.
We sometimes call the clusters "modal" because of their
central connection — directly via their "centers" — with the structure
of the underlying system modulus.
A correct but inefficient computational method for generating a list of a
cluster's members derives directly from the definition:
Cr is the set cr ⋅ C1 obtained by multiplying cr by each euler unit.
The method is inefficient because it generates each member of the cluster multiple times. Notice in the
Z12 example, for instance, that C1 has twice as many members as C3: There
are not enough residues in any of the clusters except
C1.
We address this more specifically as a division issue in due course. In the meantime we can see the
numerical extent of the inefficiencies by counting the number of members of the various clusters as follows.
The number |C1| of residues in C1 is calculated
using the totient function φ(m) later named Euler's Phi function. If
cr ≠ 1
then the size of C1 is
always a multiple of
|Cr| — the multiple is almost always by 2 or more, the only exceptions occurring when 2 is a residual unit and |C2|=|C1|. Using Euler's totient function again,
the size of Cr is
|Cr| = φ(m .÷. cr).
It's worth noting that if cs > cr and if Cs and Cr are on the same trace with Cs being farther along the trace towards Cm then again
|Cs| ≤ |Cr| with |Cr| being an integer multiple ≥2 larger — even though φ(m) is
itself not monotonic.
Anyway, |C1| is larger than |Cr| by the factor
φ(m) .÷. φ(m .÷. cr).
A Chinese Cube for Zm is actually a "hyper-rectangle in euclidean integer n-space where n is the number of distinct prime divisors of m" — but "cube" is so much easier to say. Such cubes provide excellent displays of Zm when n≤3. Here's the n=2 cube for Z36:
Almost as important as clusters are their "traces": The trace Tr of
division cluster Cr is the collection of all residues t of the form
t ≡ x ⋅ s where x is any member of
Cr and s is any residue modulo m.
The trace of a cluster contains all the residues of the cluster and usually more.
The trace of a cluster is important because it turns out to be the complete set of all residues that can be divided in a broad sense♦ by the residues of the cluster.With reference to 2-dimensional Chinese CUbe graphics, the closest boxes in the trace of a given box are: the neigboring box just below and the neighboring box just to the right of the given box. The trace continues, always down and to the right of each box in the trace, ending with the 0-cluster at the bottom-right corner. Summary, good for any number of dimensions: The given box is in its own trace; and for each box in the trace, all neighboring boxes that are closer to the 0-box are in the trace.
♦That's true "in a broad sense", but the best version of division — (i;u)-division — breaks the trace of a cluster of pure residual integers with center c into three parts:
First, the power stack of clusters with centers from c1 up to and including ck-1 where ck is the center of the unit cluster at the top of that power stack of integer clusters;
Second, the entire face of the particular Chinese cube which contains that particular unit cluster and includes its merger with all the other integer traces of the residue system; and
Third, the region where the first part of the trace merges with all the other integer-or-unit traces.
The first part of the trace is divisible by the particular integers in question, and the second part only by the top-of-stack units along with all other integer clusters. This part contains pure integer clusters and mixed integer×unit clusters, but no pure unit clusters.
Uniquely, the trace T1 of the group of euler units contains every residue in the modulo-m system—that's why euler units can divide every residue in the system. A handy test of whether any given residue is divisible by the members of a given cluster is:
If r is a unit then residue x is in Tr if and only if
ωr ⋅ x ≡ x
(mod m).
Curiously, the product ωr ⋅ x
is always in Tr regardless of whether or not x is in Tr.
If r is not a unit then residue x is in Tr if and only if
cr euclidean divides cx. That is to say, gcd(r,m) .|. gcd(x,m).
Example traces:
For modulus 12 the traces of the clusters are:
T1={all the residues mod m},
T2={2, 4, 6, 8, 10, 0},
T4={4, 8, 0},
T3={3, 6, 9, 0},
T6={6, 0}, and
T12={0}.
The shadow of
a cluster contains just "the usually more", i.e. members of the cluster's trace that are not in the cluster.
The list of shadows might clarify discussion of traces by omitting the duplication.
Example shadows:
For modulus 12 the shadows of the clusters are:
S1={all residues except those in C1},
S2={4, 6, 8, 0},
S4={0},
S3={6, 0},
S6={0}}, and
S12=Φ (the empty set).
From the perspective of modular division there are three distinct kinds of residues: units, integers, and mixes.
Residual units are the residues whose division cluster is an abelian group.
We use the adjectives "modular" or "residual" in contexts that might confuse these units with eulers or with euclidean integer units.
It follows from the definition that residual units have inverses, and each kind of unit has its own ω to fit its role in u⋅u-1≡ ω and ω/u ≡ u-1. This allows them to play roles similar to the euler units. Gauss's definition of modular Division using euler units applies with one small change to all units. We spell it out here:
* Modular Division by any unit:
We start the derivation the same as for euler units: Let the quotient n/d
(equivalently n÷d)
be some residue q, where d is any
residual unit. Following Gauss, we define the quotient q to be n⋅d -1.
This almost satisfies the fundamental division requirement that
d⋅q ≡ n. Instead, it yields
By definition, d | n (i.e.
unit denominator d
divides numerator n)
if and only if the numerator n is in the trace Td,
(Note, the divisibility condition is automatically satisfied if d is an euler unit.),
Is residue r a residual unit (mod m)? An easy test:
How calculate the inverse and the omega of a residual unit u?
1. 16⋅x≡56 (mod 72), x=?
Solution: ω16≡64 and 64⋅56≡56 so 16 | 56.
Thus x≡56/16≡56⋅40≡8.
Confirm: 16⋅8≡56? yes.
ω16⋅ 58 ≡32≠58 so 16 does not divide 58, the quotient 58/16 is undefined, and 58⋅16-1 is meaningless.
3. 5⋅x ≡549 (mod 551), x=?
Solution: 5 is an euler unit so it does divide 549,
and 5-1≡441 so x≡441⋅549≡220.
Confirm: 5⋅220≡549? yes.
This congruence had only one solution because the denominator 5 was euler (mod 551).
Comparing this with the preceding example it is clear that x=0 and x=220 should
both be solutions; not so clear is that there are other solutions as well
... and if euler units were the whole story of units, there would be just two.
In problems like this there's always the possibility of one solution in each division cluster.
This modulus is the product of two simple primes (551=19⋅29) so there
are four clusters, each consisting entirely of units: C1,
C19, C29, and C551.
Multiplying the congruence through by the not-yet-known inverse of x yields:
5⋅x ≡ 549⋅ωx
which is one equation and one obscure relation and two unknowns.
We don't know x yet, but we do know that its omega is one
or another
of ω1=1, ω19=494, ω29=58,
ω0=0. We can assume those ω-values one at a time,
solve for x, then reject x
if is in the wrong cluster i.e. has the wrong omega.
For instance, if we assume x is in C19 then the congruence
to solve is
5⋅x ≡ 549⋅494 ≡ 114, which yields
x=114/5≡133.
Assuming C29 yields x ≡ 87, C1
yields x ≡ 220, and C551 naturally yields x ≡ 0 :-)
The euclidean integer discriminant b2−4ac=49=7⋅7 so
it is a square and euclidean integer solutions exist. They are x = (−1±7) / 2 = 3 or −4. Amazingly, those two are among the solutions for all residue systems!
Translated into modulo 72, for example, the congruence to be solved is:
x2+x+60 ≡ 0 (mod 72),
and its complete list of solutions is:
x≡3 in C3, 12 in
C12, 59 in C1, and 68 in C4.
Of course x ≡ 3 and 68 (≡−4) are shared with the
euclidean case so they were expected, but...
...where did 12 and 59 come from? Example 6 answers that.
After considering a derivation
of the modular quadratic formula it's a surprise that
the quadratic formula found any solutions at all!
We discuss "Example 5" issues further after considering division by non-units.
The discriminants are disc = 744 (int) ≡ 81 (mod 663). 744 is not square,
so the euclidean integer version has no (euclidean integer) solutions but, taking the quadratic formula
x = (−b ± √(b2−4ac))/2a
literally, while calculating it as modular arithmetic, yields
x ≡ (-26 ± 9) / 2 ≡ 314 and 323
— a partial success.
The actual complete list of modular solutions is: x ≡
119 in C17, 314 in C1, 323 in C17,
and 518 in C1. We expected 314 and 323 but where did the other two
come from?
Answer: We thoughtlessly took √81 to be simply ±9, but Z663 contains those along with
±264 as the four
square roots of 81 (mod 663) — all four are in C3. They produce the unexpected extra
solutions for Example 6.
The same observation serves for Example 5 as well.
Applications of modular division by residual units leave much to be explored, but that kind of modular division itself is in pretty good shape. If the prime factorization of a modulus contains nothing but distinct primes then all the residue in the corresponding residue system are residual units. If any repeated factors occur then the residue system also contains residual integers, which are a different kind of animal.
↑ to menuResidue r is not a residual unit if r2 is not in the same residual
cluster Cr as r. The most distinctive alternative is that r might be
a residual integer. The other possibility is that r is mixed — the product of a residual integer
times a unit that is non-euler.
residual integers are quite unlike units: They have no inverses — and their
clusters don't have any omegas so there's not even anything to base a notion of inverses on.
In division they behave much more like euclidean integers: Specifically, suppose you keep dividing by the same
residue r in a division sequence like
s0,
s1 ≡ s0 / r,
s2 ≡ s1 / r,
s3 ≡ s2 / r, …
When r is a residual integer the sequence usually terminates
at some sk which r cannot divide. When r is either kind of unit, residual or euler,
the sequence never reaches such a stopping point: it eventually enters a repetitive
cycle of units.
Divisibility in general: A simple rule we are about to explore is: Unit or integer, residue r is able to divide residue s
if and only if the center cr divides the center
cs with 0 remainder (using the euclidean algorithm '.÷.' for integer division).
Finding all quotients — all solutions, that is, of the division-defining congruence d⋅ q ≡ n
(mod m) —
is the other main key to modular division
q ≡ n / d :
If d not.|. n, i.e. d does not divide n — which is to say, the center cd
does not euclidean divide the center cn — then there are no solutions of the
original congruence.
Otherwise, the trick to finding all "quotients" is to use euclidean integer division to remove the common factors
cd = gcd(d,m)
from both sides of the congruence. This reduces d⋅ q ≡ n
(mod m) to
ed ⋅ q ≡ n .÷. cd (mod μ)
where ed = d .÷. cd is an euler and
μ = m .÷. cd is a smaller modulus.
We know ed
is an euler unit since it results from removing all the prime factors that d shared with m.
Since euler units divide all residues, ed modular-divides n
as well as it modular-divides n .÷. cd and division by that euler unit provides
a first solution — a "starter quotient" — call it qo where:
qo ≡
ed-1 ⋅ (n .÷. cd)
(mod μ).
Since i⋅μ is congruent to 0 (mod μ) but not 0 (mod m) until i
reaches cd,
we see that the set
qoΔμ = { qo + i⋅μ
for i = 0,1,..., cd -1} (mod m)
provides the complete set of quotients modulo m.
Postpone the congruence solution examples,
later adapt them from c,e to i,u
Our approach to extending modular division into non-unit denominators entails factoring the operands — but not into anything like prime factors. There are many factorizations of residues into products of other residues but two in particular stand out in importance: the (c;e)-factorization and the (i;u)-factorization. All residues admit both.
One of those factorizations was the basis for the preceding introduction to modular division, and we formalize it here:
The (c;e)-factorization of residue r expresses it as the product
r ≡ cr⋅e
of the center cr of its cluster times an euler unit e.
The c and e of (c;e) are just multiplied to produce r but we use
the semicolon ';' instead of the center-dot '⋅' because (c;e) is an ordered pair: As products
(c⋅e) and (e⋅c) are the same
but as factorizations (c;e) is not the same as (e;c) — the center
is always mentioned first.
The center is of course unique, but the euler factor is not. The number of distinct alternatives for the
euler can be calculated using the Euler Phi function as
|cr;er| = |C1| .÷. |Cr|.
The list of residues to choose those eulers from is of length cr, often more than
|cr;er|.
Calculating the "c" of the (c;e) factorization of any residue r is easy: cr is simply
the greatest common divisor gcd(r,m).
The euler factor is a bit trickier.
Define eo = r .÷. cr and
δ = m .÷. cr.
Then (c;e)'s euler factors must be selected as any euler member of the
set eoΔδ which is shorthand for
{e=eo+i⋅δ ∀ integers i=0, 1, 2,..., cr-1}.
Notice, the number of quotients to choose from is cr, but the number of eulers to
choose is
|cr;er| = |C1| .÷. |Cr|,
which is often less than cr.
Example (c;e) mod 72
48 ≡ 24⋅5.
Another example (c;e) mod 72
48 ≡ 24⋅11.
OK, the whole example with c48=24, eo .=. 2,
δ .=. 3, and |c48;e48| .=. 12
2Δ3 = {2 5 8 11 14 17 20 23 26 29 32 35 38 41 44 47 50 53 56 59 62 65 68 71}
whose euler subset is {5 11 17 23 29 35 41 47 53 59 65 71}
so (c48;e48) ≡ 24⋅{5 11 17 23 29 35 41 47 53 59 65 71} —
a far cry from being unique!
The modular "(c;e)-quotient"
Early version: To divide n by d we euclidean-divide cn by cd
to get the core factor cq of the quotient; then
we unit-divide en by ed
to get the euler factor eq of the quotient — or we can do eulers first then centers,
it makes no difference. Multiplying the (c;e) factors yields
the quotient q ≡ cq⋅eq.
Unique quotients version: To divide n by d first (c;e)-factor d and multiply
n by the euler inverse ed-1 to get qo; then euclidean divide qo
by cd to get q.
The "early" version guarantees that q ≡ n / d exists, but
the "uniqueness" version guarantees the quotient is unique since
the choice of eulers no longer affects the quotient.
But wait... again...
...there is yet another way for (c,e)-division to go wrong — and this fault blows (c;e) out of the water: Sometimes the euler factor, as calculated by the euclidean division e = r .÷. cr , turns out not to be an euler! but (c;e) depends upon euler which enables it to divide any numerator.
Example 'e' not an euler — Consider two residues modulo 360:
r1 = 104 ≡ (c,e):8⋅13.
r2 = 208 ≡ (c,e):8⋅26.
The e-factor 13 of r1 is truly an euler unit, but that factor 26 of r2 is a residual integer. The prime factorizations of m and of the two residues is revealing:
m = 23⋅32⋅5
r1 = 23⋅13 and
r2 = 24⋅13.
The exponent of prime 2 in m is k = 3, in r1 it is j1 = 3, and in r2 it is j2 = 4.
The fact that j2 exceeds k is the problem: The exponent of any prime p in the center c of the cluster the
The result is that the excess exponent i = j−k will always get transferred to what was supposed to be the euler factor in a (c;e)-factorization.
We tried moving such excess unit-factors back into c where they belong, but the result is that the enlarged value of c in a denominator may no longer divide its counterpart in the numerator — even when numerator and denominator are in the same division cluster!.
Unless a solution is discovered, (c;e)-division must be (as Apple's Xcode would put it) deprecated.
Move "Intro to q<>d" somewhere below (see Example q,d-symmetry)
The deprecated (c;e)-division has another peculiarity: It makes no reference to residual units! We're not that sad to see it be forced out. Maybe this next factorization is better? Focussing directly upon the interplay between residual integers and residual units, it surely seems more fundamental.
(i;u)-factorization expresses r as
r ≡ ir⋅ur where ir
is a residual integer and ur is a unit.
The "integer factor of r" is 1 if r is just a unit; otherwise ir is
a unique residual integer; in either case, a starter value for "the unit factor of r" is extracted from r
by the euclidean integer division uro = r .÷. ir.
The number of distinct alternative units for r is simply
|ir;ur|=ir itself. The
complete list of
those alternative units is uroΔ(m .÷. ir).
Note, the reason this works is:
ir ⋅ (m .÷. ir) = m ≡ 0.
The modular "(i;u)-quotient"
Based on (i;u), another way to divide n by d is to euclidean-divide the integer factors
iq ≡ in .÷. id
of the quotient. Then
unit-divide to get the unit factor uq ≡ un ⋅ ud-1
of the quotient. Multiplying the two (i;u)-quotient factors yields the quotient
q ≡ iq⋅uq.
The (i;u)-quotient's divisibility condition d |iu n requires that
id .|. in AND
ud | un, which means
id euclidean-divides in with 0 remainder AND
ωud⋅ un ≡ un.
This shows that the (i;u)-quotient q ≡iu n / d
exists.
Uniqueness, just as with (c;e)-division, is achieved by re-arranging the calculation to preserve the overlap of the transparency-sets win and wid :
First calculate qo = n⋅ud-1 then complete the division as the euclidean quotient q = qo .÷. id.
8. x2+x−12 ≡ 0 (mod 72) (Example 5 revisited)
Modular division fails at β = b/2 because in Z72 the
center c2=2 does not euclidean-integer divide the euler center c1=1.
Looking back at Example 5 we see: This same equation with same modulus was found to have four
solutions.
Residues...surprises...you know to expect.
As modulo 63 residues, 1 and 2 are both in the same cluster so each divides the other. In particular,
β ≡ 1/2 ≡ 32 (mod 63).
Next we find γ ≡ 35 (mod 63) thence x+β ≡ √28. This doesn't look
promising to a euclidean-integer-trained eye but, in fact, 28 has two square roots: 28 and 35 (mod 63).
So both x ≡ 3 and x ≡ 59 (≡ -4) are solutions.
In fact, these are the only two solutions for this modulus. How do I know that? I wrote a small
brute-force applet called "Solve Modular f(x)≡0" that searches all residues for solutions. That's how I'm doing all the modular
square roots too, since the moduli of most residue systems I care about are not prime, they're
products of powers of primes.
Search found no solutions, but the discriminant disc=b2 − 4ac ≡ 7 (mod 63) — and 7 (mod 63) truly is square, with roots 14 and 49 (mod 63). Does x≡(-b±√disc)/(2a) ≡ (-35 ± 14)/7 ≡ 14 and 56 not yield two solutions? It does not! for instance 35⋅562+35⋅56-12≡9 not ≡0.
Integer division ambiguity ...
... has been resolved as of May, 2022.