Modular exponentiation Created 2026-10-06 Updated 2026-10-20
Modular exponentiation computes the remainder for an integer base , a nonnegative integer exponent , and, here, an integer modulus . It applies exponentiation by squaring while reducing after each multiplication, including each squaring. The result is the unique representative in . There is no requirement that the base be coprime to the modulus when the exponent is nonnegative.[ref]
Take , , and . Initialize ; the remaining digits give
Hence . The final operation multiplies by , since the preceding square has already been reduced. The computation never needs to construct .
In general reduce the base first, . For , initialize and process the remaining binary digits with , followed, for a digit one, by . The loop invariant is
where is the processed prefix value. The congruence is preserved because modular arithmetic respects multiplication: if , then and . Thus changing representatives never changes the final congruence class.
Both factors in every product are less than , so the unreduced product is less than , and the stored result is again less than . The same bounds hold for a gigantic exponent, such as : there are squarings, each on bounded-size residues. For base two, the corresponding ordinary power would have binary digits. The benefit is avoiding the huge ordinary power altogether, rather than constructing it and taking one final remainder. Initial reduction is essential when the supplied base is much larger than the modulus.
For , return under the same empty-product convention as exponentiation by squaring. For , require , find the modular multiplicative inverse , and compute ; the extended Euclidean algorithm can find that inverse. Its cost is separate from the positive-exponent binary powering multiplication count. For example, , while is undefined because and are not coprime.
Modulus Created 2026-09-24 Updated 2026-10-14
The modulus of a complex number is
It extends absolute value to the complex plane: the modulus is the Euclidean distance from to zero, or the Euclidean norm of its coordinate vector. The Pythagorean theorem gives , even though its two coordinates have sizes and . The modulus is always nonnegative, and is zero exactly at zero.
Two essential rules are
The second is the triangle inequality. For and , the product has modulus , while the sum has modulus . The strict inequality records that the two displacement vectors point in different directions.
The Euclidean distance between two complex numbers is . Consequently expresses geometric closeness without treating the two coordinates separately. This makes the modulus a natural measure of error in complex analysis; the triangle inequality bounds accumulated error, while the product rule tracks how multiplication changes its size. Equal moduli do not imply equal complex numbers: , , and all lie on the same circle around zero. The modulus records size and deliberately forgets direction; the argument supplies the missing information.
Multiplication Created 2026-09-24 Updated 2026-10-13
Multiplication combines two factors into their product of numbers. For a natural number , is the sum of copies of ; with no copies the result is zero. This repeated-addition interpretation directly explains integer grouping, while multiplication of arbitrary real numbers also describes scaling by noninteger factors.
A rectangle of side lengths and has area . Split the second side into lengths and . The two areas are and , giving the visible identity
Rotating the same rectangle interchanges the sides without changing its area, explaining . These pictures illustrate distributivity and commutativity for ordinary positive numbers; matrix multiplication and other operations require their own rules.
Figure 1.
Partitioning a rectangle explains distributivity; partitioning a unit square gives an exact product of fractions
. Details.
For a fractional example, take of a quantity and then of that result: the combined scale is . The two fractions are multiplicative inverses. In the unit square on the right, the overlap of a strip occupying of the width with one occupying of the height contains six of twelve equal cells. Its area is . The product stays exact even though the decimal expansion of repeats. [ref]
Multiplication table Created 2026-10-14 Updated 2026-10-31
A multiplication table lists the products of the factors labeling its rows and columns. Each cell is determined by one multiplication; the same arrangement can serve as a spreadsheet tabular model.
Multiplicative group of a finite field Created 2026-10-03 Updated 2026-10-14
The multiplicative group of a finite field is the group of its nonzero elements under multiplication. Zero is excluded because it has no multiplicative inverse. In the field with four elements, these elements are , obtained by repeated multiplication by : they form a cyclic group of group order three. Its addition behaves differently: every nonzero element added to itself gives zero. Keeping the two operations distinct prevents confusing the size of the finite field with the group order of its multiplicative group of a finite field.
For a prime number and , multiplication by gives a permutation of the nonzero residue classes. For modulo seven, the representatives map to : the same collection in a different order. Repeating this permutation from one visits all six representatives before returning.
Figure 1.
Multiplication by three modulo seven permutes all six nonzero residue classes
. The upper arrows show each input and its image. The lower arrows repeatedly apply the same permutation to one, displaying the powers modulo seven. The highlighted final one is the first positive return, at exponent six. Details.
For modulo seven, the permutation cycles are instead and . The powers of two visit only the permutation cycle containing one, so their multiplicative order is three. Both permutation cycles return after three steps; applying the permutation six times still fixes every nonzero residue class. Fermat's little theorem guarantees a return at six, not that every base visits every nonzero residue class.
Figure 2.
Multiplication by two modulo seven gives two permutation cycles of length three
. Every arrow multiplies by two modulo seven. The left permutation cycle contains one and hence the powers of two. The right permutation cycle contains the other three nonzero residue classes. Their common length three divides . Details.
More generally, every permutation cycle of this map has length equal to the multiplicative order of : starting at a nonzero residue class , a return means , and its modular multiplicative inverse allows cancellation of . Thus the nonzero residue classes split into equal-length permutation cycles, which also explains the divisibility of the multiplicative order into .
The product argument gives a short proof outline. Since multiplication by is a permutation of the nonzero residue classes,
Every factor is a unit, so their product has a modular multiplicative inverse and can be cancelled. This leaves . The whole argument works for , where the product is just one.[ref]
Number line Created 2026-10-14 Updated 2026-10-20
A number line represents real numbers as points on a line, with zero as origin and a chosen positive direction and unit scale. Addition becomes a shift and multiplication becomes a rescaling about zero.
p-adic integer Created 2026-09-28 Updated 2026-10-14
The p-adic integers retain arithmetic information modulo arbitrarily high powers of one prime number . They form the subring
of the P-adic numbers. Their p-adic absolute value bounds the allowed denominators: belongs to , while does not. The name therefore describes a local arithmetic ring, not just the ordinary integers.[ref]
A concrete description gives an element by a compatible sequence of congruence classes:
The inverse limit condition says that gaining more precision must preserve the digits already determined. Each is a residue modulo ; choosing its least nonnegative integer representative gives . The ordinary integer gives residues modulo .
Figure 1.
Compatible binary residues describe successive finite precisions of a 2-adic integer
. Original full residue tree through modulus . Each edge reduces a residue to its parent modulus; the highlighted path follows the integer . Four binary digits determine the entire coset , leaving infinitely many higher-digit choices. Choosing all later digits zero selects the ordinary integer . Details.
The useful feature is that one exact object organizes an unlimited family of finite modular arithmetic calculations. Addition and multiplication are performed modulo each , and the results remain compatible. A p-adic digit expansion makes this concrete:
The expansion is unique and converges in the p-adic metric; its higher powers have smaller p-adic absolute value. The digit agreement and p-adic distance criterion tells exactly which finite digits a precision bound preserves.[ref]
P-adic number Created 2026-10-03 Updated 2026-10-14
For a prime number , a p-adic number is an element of the field obtained by completing the rational numbers for the metric . Here is the p-adic absolute value. The Cauchy-sequence construction of a metric completion supplies limits for every Cauchy sequence, and addition, multiplication, and the p-adic absolute value extend to this complete metric space. The rational numbers form a dense subset. [ref]
For a concrete example with , consider the partial sums of a geometric series:
The first values have distances from in the 2-adic absolute value. Consequently
This is a statement about convergence in a metric space with the 2-adic absolute value. In the ordinary real number absolute value, the same partial sums grow without bound. Choosing a metric changes which approximation errors shrink.
More generally every nonzero P-adic number has a unique digit expansion
Only finitely many negative powers occur, while positive powers can continue indefinitely. Written with the highest powers on the left, the digits extend infinitely to the left; for example the P-adic number at is written . The p-adic integers are exactly the elements with , whose digit expansions use only nonnegative powers. [ref]
The construction can be understood through modular arithmetic. Successively choose the low-order digits to agree modulo , , and higher powers. After fixing digits below , the remaining error has p-adic absolute value at most ; the partial sums form a Cauchy sequence, so completeness supplies a limit. If two expansions first differ at position , their difference has P-adic valuation , proving uniqueness. This turns compatible finite congruence classes into one exact number. In particular, Hensel's lemma upgrades suitable approximate roots of a polynomial modulo powers of into roots in the p-adic integers.
P-adic valuation Created 2026-09-24 Updated 2026-10-13
For a prime number and a nonzero integer , the P-adic valuation counts the exponent of in its prime factorization:
For , it gives , , and . The sign of a nonzero integer does not change these prime exponents. Relative to an ordered factor base, the valuations supply the coordinates of its exponent vector.
The P-adic valuation extends to nonzero rational numbers by . For example, records a factor in the denominator instead of the numerator. Multiplication adds valuations, ; this is the arithmetic reason why adding exponent vectors can make a product a square. In particular, a positive integer is a square of a number precisely when all its prime exponents are even integers, the criterion used by a factor base.
A ring is a set with an abelian-group addition, associative multiplication and both distributive laws; here we use rings with multiplicative identity. A field is a nonzero commutative ring in which every nonzero element has a multiplicative inverse.
The positive integers form neither a ring nor a field. They do not contain an additive identity zero, and they also lack additive inverses.
This is the Gaussian integer ring . It contains zero and one and is closed under addition, additive inverses and multiplication, since
Its operations inherit the ring axioms from . It is a ring but not a field: the nonzero element 2 has complex inverse , which is not a Gaussian integer.
First solve for . Multiplication by and use of give
Integrating from zero to , and using , yields . Reversing the order of integration gives
Thus equals for and for . It is continuous at , vanishes at , and has . Its derivative jumps from to zero across , so the jump is , matching the coefficient of . Both pieces satisfy away from the jump. These facts also verify the Green representation directly. The homogeneous solutions are , and the two boundary conditions force , proving uniqueness.
For , the formula gives
Hence . Indeed and , which verify the equation and both boundary conditions.
Use the following explicit tree notation for the intermediate representation. C(k) is a constant, R(r) a processor register, M(e) a word load from memory address e, ADD addition, and SHL(e,2) a left shift by two bits. MOVE(destination,source) assigns either a processor register or the computer memory word designated by M. Parentheses show complete tree structure, so these displays specify trees rather than already shared Directed acyclic graphs.
Let be the constant base memory address of the global array a, and the constant offset of local i from the frame pointer fp. Each integer occupies four bytes, and array indices are zero-based; a fixed nonzero lower bound can instead be absorbed into . Local t is represented by R(t). After replacing multiplication by four with a left shift, the three trees are:
MOVE(R(t),
     M(ADD(C(A),
           SHL(M(ADD(C(A),
                     SHL(M(ADD(R(fp),C(I))),2))),2))))

MOVE(M(ADD(C(A),
           SHL(M(ADD(C(A),
                     SHL(M(ADD(R(fp),C(I))),2))),2))),
     M(ADD(C(A),SHL(M(ADD(R(fp),C(I))),2))))

MOVE(M(ADD(C(A),SHL(M(ADD(R(fp),C(I))),2))),
     R(t))
Every M(ADD(R(fp),C(I))) loads i; the next enclosing M loads a[i]; the outermost M in the first tree loads a[a[i]]. Each array index is converted to a byte offset by a left shift of two bits. The address rule used in all three trees is
The source language's array bounds checks are omitted as requested.
Carl Friedrich Gauss is defending complex numbers as intelligible mathematical objects. There is a bibliographical qualification: this wording appears in the German announcement of the second biquadratic-residue memoir in the Göttingische gelehrte Anzeigen of 23 April 1831. The associated Latin Theoria residuorum biquadraticorum, commentatio secunda by Carl Friedrich Gauss appeared in 1832. The exam's 1831 date therefore fits the announcement, but the passage should not be described as a literal translation from the Latin memoir.[ref][ref]
The proposed directional vocabulary is mathematically specific. Represent by the point in the complex plane. The addition of complex numbers adds components. Multiplication of complex numbers is
Multiplication by reverses direction through a half-turn, while multiplication by sends to , a quarter-turn. Consequently says that two quarter-turns make a half-turn. More generally the moduli multiply and the complex arguments add. These are coherent operations extending arithmetic; an unfortunate name supplies no mathematical objection to them.
The memoir's setting is number theory, specifically the question of whether a integer congruence is soluble, and the reciprocal relations between such questions. Passing to the Gaussian integers provides arithmetic that is closed under addition and multiplication. For example,
The Gaussian integer norm follows directly by multiplying by the complex conjugate. Here it gives and , consistent with the factorization. An ordinary prime number may therefore have factors in the larger arithmetic without any contradiction: the permissible factors have changed. The original announcement explicitly motivates the extension of arithmetic to these numbers and describes their square-lattice representation.[ref]
It is helpful to separate two domains. Arbitrary complex numbers form a field, since the inverse of nonzero is . The Gaussian integers form a ring, but not a field: is not a Gaussian integer. Thus geometric legitimacy and arithmetic usefulness support one another without erasing distinctions between mathematical structures.
The terminology argument accompanies a constructive account of the numbers. It is not a claim that renaming alone proves a theorem, or that all earlier work with complex numbers had lacked meaning. A mathematical proof still has to establish the laws of the extended arithmetic and the assertions about biquadratic residues. Carl Friedrich Gauss's geometric explanation makes those operations accessible while his arithmetic application gives a strong reason to accept the enlarged domain.
Between 1600 and 1900, algebra broadened from arts of working with unknown quantities and solving equations into the study of several systems of symbolic operations and increasingly general algebraic structures. This was neither a single change of definition nor a clean replacement of one subject by another. Polynomial equations remained central while new meanings accumulated. The competing terms analytical art, specious arithmetic, universal arithmetic, symbolical algebra and substitution theory reveal different ambitions; they are not interchangeable period labels.
Near 1600, François Viète's In artem analyticem isagoge by François Viète (1591) supplies a particularly revealing starting point. His analytical art uses letters for known quantities as well as unknown ones. In his terminology, logistica numerosa concerns numerical calculation and logistica speciosa calculation with species, or general magnitudes. Vowels represent unknowns and consonants known magnitudes. This allows a single relation to represent many particular problems, but it is still tied to geometrical homogeneity: a square and a length do not simply become quantities of the same kind because they are written with letters.[ref][ref]
For example, a relation we write as has quantities of compatible dimensions if and are lengths and is an area. Letters do more than abbreviate a numerical question: they express relations between whole families of magnitudes. The phrase specious arithmetic therefore indicates arithmetic carried out on species; analysis stresses the art of reasoning from an assumed unknown towards its determination. Neither term should be reduced to the modern subject real analysis.
René Descartes's La Géométrie by René Descartes (1637) demonstrates another relation between algebra and geometry. A chosen unit segment lets multiplication, division and extraction of square roots be represented by constructions of lengths. The product of two measured lengths can itself be represented by a length relative to that unit. In modern dimensional notation the construction gives for unit length , removing the obstacle that a product must always be treated as an area. The text's equations can then organise geometrical problems and classify curves by their algebraic complexity. Its title remains geometry: algebra serves a geometrical programme rather than announcing a present-day department of abstract algebra.[ref]
A further term, universal arithmetic, stresses the extension of calculation from particular numbers to general quantities. Isaac Newton's Arithmetica universalis by Isaac Newton, issued in 1707, makes the term visible in a title whose subtitle concerns composition and resolution. A title is evidence for the vocabulary, not a sufficient definition of all contemporary usage.[ref] In Leonhard Euler's Elements of Algebra by Leonhard Euler, published in German in 1770, general numerical calculation and the solution of equations remain a substantial conception of the subject. For instance, allowing negative and complex roots changes the admissible answers to polynomial equations while preserving the central question of determining an unknown.[ref]
The eighteenth-century elimination theory exemplified by Alexandre-Théophile Vandermonde's memoir broadens the scale of the task. Instead of one numerical quadratic equation, one seeks a rule for an arbitrary number of simultaneous linear equations. The determinant is initially valuable because it effects that elimination. This is a different generality from the later study of a group: the objects being determined are still unknown quantities, and symbolic generality concerns the number and coefficients of the equations. The case cautions against using generality alone as a test for whether algebra has become abstract.[ref]
In nineteenth-century British discussion, George Peacock's A Treatise on Algebra by George Peacock (1830) distinguishes arithmetical algebra from symbolical algebra. If the symbols mean positive numbers, has no positive-number result. Yet algebraists manipulate this expression without restriction. George Peacock therefore seeks principles for the manipulation of signs which are not confined by their original arithmetical interpretation. The contrast is explicitly argued in his preface: arithmetic suggests the laws, while the symbolic science requires foundations adequate to its more general conclusions.[ref]
The familiar extension illustrates the stakes. From distributivity, , so the rule is forced if these operations obey the assumed laws. This explains how a law can survive a change in interpretation. It does not establish that every familiar law must survive every extension: once the allowable systems themselves change, an argument must state which laws it assumes. The name symbolical algebra consequently carries a stronger methodological claim than simply writing an unknown as .
William Rowan Hamilton's work on quaternions supplies a decisive example of that change. His publications of the 1840s describe a new system of imaginaries in algebra. With quaternion units,
Thus multiplication need not satisfy the commutativity even when it remains associative and supports division by nonzero elements. The new system is not merely a further list of roots of old polynomial equations. It has its own operations, interpretation and laws. William Rowan Hamilton's title makes explicit that a plurality of calculi can belong within algebra.[ref]
George Boole's An Investigation of the Laws of Thought by George Boole (1854) offers a different interpretation of symbols. If represents selection of a class, repeating that selection gives ; multiplication can represent intersection and a complementary class. His logical calculus borrows from numerical algebra but also restricts interpretation: his sum of classes is not automatically unrestricted set union, and intermediate symbolic expressions need not name classes directly. It would therefore be inaccurate to identify all of his rules with a modern Boolean algebra. The example nevertheless shows why algebraic reasoning could extend beyond magnitudes.[ref]
The shift can also take a concrete linear form. Arthur Cayley's A Memoir on the Theory of Matrices by Arthur Cayley (1858) treats matrices with operations of their own. The identity matrix is no longer the scalar , though it plays an analogous role; matrix multiplication is generally noncommutative. For example,
produce and . This is a checkable reason why universal arithmetic can no longer mean that every rule of ordinary numbers applies unchanged.[ref]
Meanwhile, substitution theory studies permutations and their compositions, originally in close relation to polynomial equations. Évariste Galois's work connects the solvability by radicals of an equation with its associated group. Augustin-Louis Cauchy's work on substitutions and Heinrich Weber's 1882 definition illustrate successive forms of generalisation: from particular permutations towards arbitrary elements satisfying operational conditions. This is not a claim that one man supplied the complete modern hierarchy of groups, rings and fields at once. It identifies the change in the question: one can now investigate what follows from the laws of an operation, independently of whether the elements are numbers, substitutions or classes.[ref]
By 1900, algebra could concern the laws and structures of several calculi. Earlier meanings persisted in teaching and in the theory of equations. The strongest account of the change therefore combines continuity with enlargement: letters for general quantities, symbolic operations with explicit laws, nonnumerical interpretations, and structural questions about those laws. Analytical art foregrounded a method of discovery, universal arithmetic foregrounded general calculation, symbolical algebra foregrounded formal operations, and substitution theory foregrounded a particular class of transformations. Their differing uses help explain the expansion more precisely than a single date for the birth of abstraction.
Fix and induct on . For ,
For the induction step, use the multiplication recursion, the induction hypothesis, and addition associativity from (i):
Thus
This establishes the indicated distributive law without assuming multiplication is commutative.
Irrationality of makes the expression unique for rational : equality of two such expressions with different would express as a rational number. Therefore the rule selecting the coefficient defines a function on . Its domain is a vector subspace over , and direct coefficient addition and rational scaling show it is -linear, hence weakly linear. In particular
Use Zorn's lemma on the nonempty family of weakly linear extensions of this particular function. Chain unions remain extensions by (a); hence there is a maximal extension . Any further extension in would also contain the original function, so this is maximal in . Part (b) therefore gives .
A real-linear map is multiplication by its value at . Were real-linear, it would satisfy
contradicting the inherited value . Thus a weakly linear function on all of need not be real-linear. Its rational homogeneity of an additive function is insufficient for real homogeneity. This particular extension is also discontinuous: rational numbers approaching have value zero, while the value at their limit is one.
No finite axiomatization exists. Write for the axioms just constructed and suppose a finite set of first-order sentences had exactly the same first-order models. Its logical conjunction is a single first-order sentence, and . By the compactness theorem there is a finite subset with : otherwise would be finitely satisfiable and hence satisfiable, a contradiction.
Only finitely many of the integers in the torsion-free scheme occur in . Choose a prime number larger than all of them. The cyclic group satisfies all the group axioms and each of these finitely many conditions from the torsion-free abelian group axiom scheme: multiplication by an integer is invertible modulo , so implies . It consequently satisfies , then , and therefore .
But its nonzero elements have finite order , so it is not a torsion-free group, contradicting the assumed description of the first-order models of . This establishes the nonfinite axiomatizability of torsion-free abelian groups, ruling out every finite set of defining first-order sentences, not just finite subsets of the particular scheme in part (c).
Hartogs theorem says that for every set there is a least ordinal for which no injection exists. This does not require the axiom of choice. Form the set of well-orderings of subsets of . It can be defined by the axiom schema of specification inside
recording a subset and its well-order. Each member of has a unique ordinal order type. Axiom schema of replacement is used to collect those order types into a set
Every member of an ordinal in is the order type of an initial segment of the corresponding well-ordering, so also belongs to . Thus is a transitive set of ordinals and is itself an ordinal. An ordinal belongs to exactly when it injects into : use a bijection to a well-ordered subset in one direction, and transport the ordinal order along the injection in the other. If injected into , this characterization would give , impossible for an ordinal. All smaller ordinals lie in and do inject into . Therefore . Apart from the standard order-type theorem, the explicit collection of all order types is the Axiom schema of replacement step; no axiom of choice of a representative ordering for each type is needed.
Zorn's lemma states that a nonempty partially ordered set in which every chain has an upper bound has a maximal element. Use the Hartogs bound on partial ordinal injections to obtain a set-sized partially ordered set. Consider the partial injections into whose domains are ordinals. Hartogs theorem bounds every such domain strictly below . Their graphs of a function therefore form a set
obtained by the axiom schema of specification from . Order by extension. It is nonempty because it contains the empty function. A chain has as an upper bound the union of its graphs of a function: extension makes this a function, injectivity is preserved, and its domain is an union of ordinals and hence an ordinal. Its range is contained in , so Hartogs theorem forces its domain to be strictly below ; thus it belongs to . The empty chain also has the empty function as an upper bound.
By Zorn's lemma choose a maximal . If an element lay outside its range, appending would give a larger injection on . Such an injection itself guarantees by Hartogs theorem, so it is a legitimate member of , contradicting maximality in a partially ordered set. Therefore is surjective, and
For this single extension one only selects an element of one specified nonempty set; no additional simultaneous choices are hidden in the argument. Zorn's lemma is the form of the axiom of choice used to obtain maximality in a partially ordered set.
Finally work with cardinals, represented by initial ordinals, and put . It is infinite by hypothesis. Nonzeroness of each factor gives an injection of the larger cardinal into the Cartesian product by holding a coordinate of the other fixed. The supplied infinite-ordinal square result gives . Hence
For the sum, use disjoint union:
The last injection exists because is infinite and contains two distinct elements. Cantor-Schröder-Bernstein theorem turns both pairs of bounds into equalities, proving
These final operations are cardinal sum and multiplication, measuring disjoint unions and Cartesian products. They are not the noncommutative ordinal arithmetic considered in question 5.