Rational-linear map 2026-10-31
A rational-linear map is a linear map when its domain and codomain are regarded as vector spaces over the rational numbers. An additive map on a rational vector subspace of the real numbers is automatically rational-linear: integer homogeneity follows by repeated addition, and division by a positive integer gives rational homogeneity of an additive function.
Recursion theorem on the natural numbers 2026-10-31
Given an initial value and a specified successor rule on a set, there is a unique function on the natural numbers with that initial value and successor rule. Finite compatible approximations give existence; induction gives agreement of any two approximations and uniqueness. Recursive definitions of addition and multiplication apply this theorem with the other argument fixed.
Residue class Created 2026-09-24 Updated 2026-10-14
For a positive integer modulus , the residue class of an integer is the equivalence classIt contains all integers in the same position of the repeating cycle. For example,The residue class is this whole infinite collection; its canonical representative is the least nonnegative residue. Euclidean division gives exactly one such representative in , so there are exactly residue classes. When , there is just one, .
Define addition and multiplication of residue classes byThese definitions must give the same answer whichever integers represent the classes. If and modulo , thenBoth differences are divisible by , proving that the operations are well-defined. For example, and , since . Replacing nine by gives the same answers with smaller intermediate integers.
With these operations the residue classes form the finite commutative ring , a quotient ring. It need not be a field: although neither factor is the zero class. These zero divisors explain why division requires a unit modulo n. Reducing after each multiplication is especially useful in modular exponentiation, where the unreduced powers can become enormous.
Ring Created 2026-09-24 Updated 2026-10-14
A ring is a set with two binary operations, addition and multiplication, satisfying three requirements. Under addition, is an abelian group: there is a zero, every element has an inverse element, and grouping or exchanging summands does not change the result. Multiplication is associative and has an identity element , so and . Finally, both versions of the distributive property hold:Here every ring is unital, but the zero ring, with , is allowed. Commutativity of multiplication is an additional condition defining a commutative ring. These conventions agree with [ref].
The integers form a ring with their usual operations. The polynomial ring is another: addition combines coefficients, while multiplication uses the distributive property. For example,The same rules justify symbolic calculations in both rings; this is why one definition can organize apparently different kinds of arithmetic. In every ring, , and . The first identity follows by distributing and subtracting ; the second follows by distributing . Thus familiar sign rules are consequences of the structure.
Order still matters in some rings. In the matrix ring , takeThen matrix multiplication givesNevertheless, matrix multiplication is associative, distributes over addition, and has the identity matrix as its identity element. This is a valid ring. On a column vector, applies first and second: swapping coordinates before discarding the second coordinate differs from doing those actions in reverse. The failure of commutativity records a meaningful difference in function composition.
Two orders of matrix multiplication give different outputs on the same vector
. Details. Rng (algebra) 2026-10-31
A rng has an abelian group under addition, an associative multiplication, and the distributive property; a multiplicative identity element is not required. Every ring under this wiki's unital convention is a rng. A nonunital ring may happen to have an identity: the terminology removes an axiom rather than imposing the absence of an identity. For example, the even integers with their usual operations have no multiplicative identity.
Semigroup Created 2026-09-24 Updated 2026-10-14
A semigroup is an algebraic magma whose binary operation has the associative property. Its products can be regrouped while preserving the order of their elements. An identity element and inverse elements are not required.
For example, the positive integers with addition form a semigroup, since and a sum of positive integers is positive. They have no identity element: it would have to be zero, which is outside that set. Nonempty words over an alphabet with concatenation give a noncommutative example without an identity element. Including the empty word instead gives a free monoid.
Sliding-window algorithm 2026-10-20
An algorithm that maintains information about a contiguous part of a sequence while moving its endpoints. Updating a fixed-length window sum needs subtraction of the outgoing term and addition of the incoming term. A window product can be updated by division only when the outgoing factor is nonzero; zero counts or zero-free segments handle that exception.
Spreadsheet cell reference 2026-10-14
A spreadsheet cell reference identifies the spreadsheet cell read by a spreadsheet formula. In A1 notation,
B3 combines a column letter with a row number. For copying, the column and row can each be relative or absolute, independently: a $ immediately before a coordinate fixes that coordinate during the copy. The $ is an addressing marker, not a currency symbol. [ref]Switch between relative, absolute, and mixed references, Microsoft Support. Switch between relative, absolute, and mixed references: opening paragraphs and table of reference changes when copying two cells down and two cells right
Number columns as , , and so on. If a spreadsheet formula moves by columns and rows during copying, a referenced coordinate becomeswhere each is for a relative coordinate and for an absolute coordinate. This is a translation on the unfixed coordinates. For ordinary in-sheet references whose translated addresses exist, repeated copies compose by addition of their displacements: substitute the rule twice to obtain , and likewise for the row. Copying therefore preserves either a fixed coordinate or an offset from the formula's location.
Spreadsheet formula Created 2026-10-13 Updated 2026-10-14
A mathematical expression stored in a spreadsheet cell, with references to other spreadsheet cells. In this example
=A1+A2 asks for addition, =2*A1 for multiplication, and =A2^2 for exponentiation. The evaluator in spreadsheet dependency evaluation assumes these spreadsheet formulas have already been represented by their ordered lists of referenced spreadsheet cells and operations on the resulting numbers; it does not execute arbitrary formula text.Copying a spreadsheet formula produces a new expression by adjusting its spreadsheet cell references. Copying only its displayed value produces a number instead. For example, copying the spreadsheet formula
=A2*B2 down one row gives =A3*B3; entering its former value in the next row would give neither the required relationship nor this example's correct subtotal . Square-free integer Created 2026-09-24 Updated 2026-10-20
A positive integer is square-free when no square number greater than one is a divisor of . It suffices to exclude squares of prime numbers; equivalently, every prime valuation is zero or one:Thus the prime factorization of a square-free integer is a product of distinct prime factors, with no repetitions. One is included: its prime factorization is an empty product and all its prime valuations are zero. These equivalent tests are stated in Grinberg's notes. [ref]
https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781, Floor and arithmetic functions, Definition 2.1.2 and footnote 6
For signed integers, extend the definition by requiring to be a square-free integer, where denotes absolute value. Hence and both qualify. Zero does not: every prime number has its square as a divisor of zero. The Möbius function and radical of an integer below use their existing positive integer domains, so apply them to when handling a negative integer.
For example, is a square-free integer, whereas is not, because and . Being a composite number causes no problem: are all square-free integers. A square-free integer need not be coprime to another integer: and are both square-free integers but have greatest common divisor two. In fact the only signed integers coprime to every integer are , since .
Exact square-free integer classification of the integers from one to sixty
. Green cells are square-free integers; each red cell displays a prime number square that divides its label, choosing the smallest such prime number. Only need testing in this range. There are green cells. This original finite arithmetic diagram is an exact enumeration, not a measurement or an assertion about a limiting frequency. Details.For positive integers , the useful product criterion isThe proof outline is just addition of prime valuations: can stay at most one only if neither input repeats a prime factor and no prime factor occurs in both. Thus is a square-free integer, but is not. An equivalent characterization is that every factorization into positive integers has coprime factors. If , the factorization supplies two factors sharing ; conversely, a shared prime factor forces its square to divide . For , the unordered factor pairs all have greatest common divisor one; for , the pair fails.
Two existing arithmetic functions turn the definition into practical tests:The radical of an integer keeps one copy of each prime factor, so it changes precisely the integers with a repeated prime factor. Its definition is given in Evertse's exercise sheet. [ref]
https://pub.math.leidenuniv.nl/~evertsejh/dio12-ex4.pdf. Jan-Hendrik Evertse, Diophantine approximation, Homework IV, Exercise 20
The Möbius function assigns to a square-free integer with distinct prime factors and zero otherwise; squaring forgets the sign. Consequently counts exactly the green cells. This connects a restriction on repeated prime factors with weighted counting and inclusion-exclusion. [ref]https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781, Definition 2.1.2: the Möbius function
Suppose are bounded functions on the same nonempty set, and the supremum norm of their difference is at most . Then their optimal values differ by at most the same amount:Indeed, for every , so ; exchange and for the other direction. Adding a constant shifts a supremum by that constant, a basic compatibility between upper bounds and addition.[ref]
For a chosen example on , take and . Their supremum error is , since . Completing the square givesThus has maximum zero at , while has maximum at . The change in optimal value, , is smaller than the certified bound . For the vertical translation , the bound is exact: its supremum error and optimal-value change are both .
Uniform error controls the optimal value; maximizing inputs require additional control
. Original polynomial examples on . Left: and lie within a vertical error band of , while their maxima differ by . Right: the small tilts and have maximizing inputs and for every ; solid lines use and dashed lines use . These chosen examples are not measured errors or claims about an arbitrary optimizer. Details.A stable optimal value does not guarantee a stable maximizing input. On , the two linear functions and satisfyFor every positive , their unique maximizing inputs remain two units apart, at and . Both functions approach the flat zero function, which has many maximizing inputs. Consequently an accurate objective function value is not by itself a certificate that the optimizing decision is accurate.
The estimate also gives a convenient consequence of uniform convergence. If converges uniformly to a bounded function on a nonempty , then for the bounded tail of the sequence. Uniform control handles the changing input that defines the best value. Pointwise convergence alone supplies no such control; the existing examples under uniform convergence illustrate that distinction.
Subadditivity of the base-p digit sum Created 2026-09-28 Updated 2026-10-18
For nonnegative integers and an integer base ,In column addition, every arithmetic carry replaces units in one numeral digit by one unit in the next position and therefore decreases the base-p digit sum by . Count each outgoing carry separately, including each step of a chain. There is equality precisely when there are no carries. For prime number bases, Kummer's theorem turns this digit-sum deficit into a prime exponent.
Sum Created 2026-09-24 Updated 2026-10-14
Summation 2026-10-03
Summation loop verification Created 2026-10-18 Updated 2026-10-31
Compute , the triangular number , for a nonnegative integer . The empty sum gives zero when . Use exact mathematical integers and keep the input unchanged; every comparison and variable assignment is a terminating operation. The original sequential procedure isThe order of the two variable assignments matters: the addition uses the newly incremented . For , the pairs at successive condition checks are . At the last check, is false, and the returned sum is .
require n is an integer and n >= 0
i = 0
s = 0
while i < n:
i = i + 1
s = s + i
return sThe precondition is with , under the exact-arithmetic model just stated. The postcondition for returned value is , with still equal to its starting value. At each condition check use the loop invariantand the loop variant . The equation says that the accumulator is the triangular number for precisely the processed prefix ; the inequalities connect that prefix to the loop's condition.
The summation loop restores its invariant before each condition check
. Original sequential control flow for the summation loop verification. The blue loop head carries the loop invariant; the orange body increments before adding it to . A false condition leads to the postcondition. The loop variant decreases on the return arrow. All values are mathematical integers and remains unchanged. Details.Initialization gives , so holds, including when . For preservation, let the old values satisfy and . Write and for the values after both variable assignments. Since are integers, gives , andThus the completed body restores . Between the two variable assignments, the equation can be false; the loop invariant is required at the loop head. This preservation step is mathematical induction on the number of completed iterations.
At exit, the false condition gives , while gives . Hence , so : this proves partial correctness. For algorithm termination, gives the nonnegative integer . When the condition is true, ; the terminating body gives . Therefore the loop cannot repeat forever. Together these arguments prove total correctness for every permitted input, including .
Two changes expose what the proof checks. Swapping the two body instructions computes , returning rather than for . Leaving unchanged can preserve an initial equation forever without producing any answer. The first change breaks the intended postcondition; the second breaks algorithm termination. A trace can reveal these failures, while the two proof obligations explain them.
The exact-arithmetic assumption has a concrete boundary. In a stipulated unsigned eight-bit model where each addition wraps modulo , fits in the input representation, but its intended triangular number is . The stored accumulator instead finishes at , so the mathematical postcondition fails. This is integer overflow, and the proof above does not apply to that altered model. Restricting the same implementation to prevents overflow in its stored loop values, since ; alternatively use a representation supporting the required exact integer arithmetic. The equations in the proof are mathematical statements, not instructions to evaluate products in eight bits.
Tiny-pivot roundoff in Gaussian elimination 2026-10-18
A nonzero pivot element can still be a poor numerical choice. Partial pivoting bounds the absolute values of the elimination multipliers by one in exact arithmetic, because each numerator is no larger than the selected denominator. This usually improves numerical stability, but does not prevent every possible growth of intermediate entries or guarantee accurate answers for every linear system.[ref]
2.6 Row pivoting. Fundamentals of Numerical Computation by Tobin A. Driscoll and others; §2.6.4, Example 2.6.6, equation (2.6.3) and concluding discussion: small-pivot instability and the limits of pivoting
To see the mechanism without depending on hardware, define a toy floating-point arithmetic model. The operator rounds an exact real number to the nearest value with three significant decimal digits; halfway cases choose the even final digit, and . Allow an unbounded exponent range. Round the inputs and the result of every addition, subtraction, multiplication and division separately; a product followed by a subtraction rounds twice. This is a prescribed arithmetic model, not a measurement of a physical computer. All inputs in the following original example are represented exactly:Without a row interchange, the elimination multiplier is . The last coefficient and right-hand side becomeTwo distinct exact values now have the same rounded representation. Back substitution therefore returnsThe small difference carrying information about was lost during elimination; the final subtraction only exposes that loss. Dividing by the tiny pivot element amplifies sensitivity to the lost information.
With partial pivoting, interchange the two rows, including their right-hand sides, to start from . Now , and the rounded updates areBack substitution gives and . Both paths round intermediate values, but only the first creates million-sized entries and then divides a lost difference by .
The true solution follows from the original second equation :Evaluate the linear-system residual against the original data in exact arithmetic, separately from the three-digit solve. With , the maximum norm, the results areThe respective relative linear-system residuals are and . Computing the diagnostic in higher precision matters: a check made only against the rounded reduced equations would miss the original error.
The same three-digit floating-point arithmetic model gives without a row interchange and with partial pivoting; exact linear-system residuals expose the difference
. Details. This matrix is well conditioned in the maximum norm: its induced matrix norm is , whileThe failure therefore belongs to this unpivoted algorithm, rather than a large condition number. In general, however, partial pivoting cannot remove sensitivity inherent in the data. For any approximate solution of an invertible matrix system, ; the induced matrix norm inequality and giveA small linear-system residual controls solution error only in conjunction with the condition number; numerical stability and sensitivity are different questions.[ref]
Topological group Created 2026-09-24 Updated 2026-10-13
A topological group is a group equipped with a topology for which both the group operation and taking an inverse element are continuous functions:Here has the product topology: continuity of multiplication concerns both inputs together. Thus nearby motions compose to nearby motions, and undoing a motion also varies continuously. The definition alone does not impose compactness; we state the Hausdorff space assumption explicitly when it is needed.
The additive group of real numbers, with its usual topology, is a topological group: and are continuous functions. Its identity element is . The circle group instead uses multiplication of complex numbers on the unit circle, with the subspace topology from the complex plane:Its identity element is , and its inverse element is the complex conjugate. Multiplication on the complex plane and complex conjugation are continuous functions, so their restrictions verify the required continuity. Angles add, but points multiply: a quarter-turn followed by another quarter-turn gives , and the next two quarter-turns return to . Ordinary addition would fail to stay on the unit circle, since .
For any fixed , the translations and are homeomorphisms, with inverses given by translation by . Consequently the neighbourhoods of the identity element determine the entire topology. This is why local information near one motion can control a whole family of symmetries. See Tornier, Haar Measures, section 1.1 for these basic properties of topological groups.
Tridiagonal solve costs 2026-10-14
For the displayed unpivoted Thomas algorithm with one right-hand side, count each scalar addition, subtraction, multiplication or division as one arithmetic operation. Forming takes five arithmetic operations per forward step. The last unknown takes one division; each remaining back substitution step takes three arithmetic operations. ThusThis is an operation-count model, excluding assignments, indexing, pivot checks and any special simplifications of the coefficients. It is not a timing benchmark. The original tridiagonal matrix needs scalar entries, and its right-hand side another . Overwriting with and with , then with , keeps storage ; the arrays, rather than the few loop temporaries, determine the total space complexity.
For repeated right-hand sides, retain the LU decomposition: computing once costs arithmetic operations, and each subsequent pair of forward substitution and back substitution sweeps costs . Hence right-hand sides cost arithmetic operations. This is the banded counterpart of Reusing LU factors for multiple right-hand sides.
Unit roundoff 2026-10-14
For floating-point arithmetic with precision in radix and rounding to nearest, unit roundoff is the half-gap scale . If a nonzero exact real number lies in the normal finite range, its nearest rounded value satisfiesIndeed, the absolute distance to the nearest value is at most , and gives the bound. For a correctly rounded addition, subtraction, multiplication or division, apply this estimate to the exact result of that one operation on the stored operands. The bound does not include earlier roundoff error or automatically bound a whole algorithm. Results outside the finite range and tiny subnormal numbers require separate treatment. Rounding in a directed mode also changes the bound.[ref]
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html. Goldberg, 1991, §§Relative Error and Ulps, Exactly Rounded Operations
Weakly linear partial function 2026-10-31
A weakly linear partial function on the real numbers has a domain closed under rational scalar multiplication and addition, and it preserves addition on that domain. A nonempty domain is a vector space over the rational numbers, and additivity implies rational homogeneity of an additive function by integer multiplication and division. The empty function also satisfies the defining conditions vacuously. This terminology does not assert homogeneity under arbitrary real scalars.





