Convex function Created 2026-09-24 Updated 2026-10-14
A function on a convex set is a convex function if, for every and ,
Geometrically, a line segment joining two points of its graph of a function lies on or above that graph of a function. The convex set condition ensures that the intermediate input stays in the domain of a function. An affine function satisfies the defining inequality with equality.
For the quadratic function , the inputs and have equally weighted arithmetic mean . Evaluating at the arithmetic mean gives , whereas averaging the outputs gives . Averaging first saves one unit in this example. More generally, direct expansion gives
This identity proves convexity and also shows exactly when its defining inequality is strict.
Figure 1.
The graph of a convex quadratic lies below its endpoint interpolation and above its supporting tangent
. For , the line segment through and has height at , while the graph of a function has height . The tangent line is an affine minorant: everywhere. Details.
For a differentiable convex function, the tangent line in one dimension, or the corresponding supporting affine function in several dimensions, lies below the entire graph of a function. This is the subgradient inequality. The equivalent geometric statement is that the epigraph, consisting of points on or above the graph of a function, is a convex set. These characterizations are developed in Boyd and Vandenberghe's convex-function slides, sections 3.1–3.4.
Convexity does not require differentiability: the absolute value function is a convex function with a corner at . When a function is twice continuously differentiable on an open interval, it is a convex function exactly when its second derivative is nonnegative throughout that interval. In several dimensions, the corresponding criterion on an open convex set is that its Hessian matrix is positive semidefinite everywhere. The domain of a function matters: is a convex function on , but not on all of . A strictly positive second derivative is sufficient for strict convexity, but is not necessary: is a strictly convex function although its second derivative vanishes at .
The usefulness of convexity is that local information can certify a global conclusion. Every local minimum of a convex function on a convex set is a global minimum: if a lower value existed elsewhere, the defining inequality would produce lower values arbitrarily close to the proposed local minimum. For a differentiable convex function on an open convex set, a zero gradient therefore certifies a global minimum. Strict convexity gives uniqueness when a global minimum exists; it does not supply existence by itself. These facts explain the role of convex functions in convex optimization.
Diffusion on a graph 2026-10-14
The continuous-time diffusion model on a finite undirected graph uses the Graph Laplacian in the ordinary differential equation
Across each edge, the higher value sends an amount proportional to the difference to the lower value. The two contributions cancel in the sum over vertices, giving conservation of mass:
If the entries represent masses, start with nonnegative entries; signed entries can instead describe deviations from a common level. For the three-vertex path graph, the initial vector is an eigenvector with eigenvalue one, so the exact solution is
More generally, an eigenvector with eigenvalue decays by . The spectral theorem for real symmetric matrices supplies an orthonormal basis of these eigenvectors, and the kernel of a graph Laplacian identifies the surviving terms. On a nonempty connected graph,
The limiting value is the original arithmetic mean. On a disconnected graph, each connected component of a graph converges to its own original arithmetic mean. The same matrix therefore measures neighbour disagreement, detects disconnected regions and governs relaxation toward agreement.
A discrete wavelet transform computes multiscale approximation and detail coefficients from sampled data. For the Haar wavelet, replace each adjacent pair by
The approximation coefficient is times the pair's arithmetic mean; it is not the ordinary mean. The detail coefficient records their signed contrast. Repeat on the approximation coefficients until only one remains, keeping every detail coefficient.
For a worked example, start with the vector . The first pass gives approximation coefficients and detail coefficients . Transforming the remaining pair gives the coarse coefficient and the half-to-half detail . In the order coarse value, coarse detail, then fine details, the transform is
This is an orthogonal matrix transformation. Each pair preserves , so the full transform preserves the squared Euclidean norm:
The inverse function for each pair is , . Reversing the passes therefore recovers every original value. This squared-norm bookkeeping is often called signal energy; it need not represent physical energy. [ref]
Continuous and discrete normalizations differ. If data values are interpreted as the heights of a step function on equal cells of , its normalized L2 inner product coefficients are the discrete coefficients divided by . For our four values they are , as the Haar projection example shows. The same normalization is used by the wavelet regression estimator on .
Under independent Gaussian noise with a common variance, orthogonality preserves that coefficient noise variance and independence. It does not make every arbitrary correlated signal independent: this statistical conclusion uses the Gaussian model and its equal-variance independent inputs.
Effective permeability Created 2026-10-07 Updated 2026-10-14
Effective permeability is a bulk permeability of a porous medium that reproduces the total Darcy flux through a heterogeneous sample under specified boundary conditions. For a horizontal sample with length , dynamic viscosity , and positive inlet-to-outlet fluid pressure drop , define by . The description is useful when individual layers or passages are smaller than the scale of the calculation. It depends on direction, geometry and boundary conditions; it is not generally the arithmetic mean of local intrinsic permeabilities.
Layered porous permeability illustrates the mechanism: when every path must cross a resistant layer, successive hydraulic resistances add; when more permeable paths span the whole sample alongside less permeable ones, their discharges add. This is the same organizing idea as series and parallel resistors. For fixed fluid properties the corresponding hydraulic conductivities average in the same way.
Expected value Created 2026-09-24 Updated 2026-10-14
An expected value is the probability-weighted arithmetic mean of a real-valued random variable. On a probability space , its general definition is the Lebesgue integral
where is the probability distribution of . For an integrable random variable, this is a finite real number. With a probability mass function , use ; with a probability density function , use . These are two ways of computing the same weighted average, rather than different definitions for different experiments.
For example, suppose takes the values with probabilities . Then
The most likely outcome is , and is not a possible outcome at all. The expected value summarizes all outcomes and their weights; it need not predict the result of one trial. Geometrically, placing masses equal to the probability masses at the outcome positions gives a center of mass at , since . This balance-point interpretation also explains the connection to a weighted arithmetic mean. [ref].
For the dimensionless random variable with probability density function on , the expected value is . Integrating the probability density function itself gives one; to compute the expected value, multiply by the outcome first. [ref].
Figure 1. . The left panel's dashed line marks , even though the only possible outcomes are . In the right panel, the shaded area under is ; the area under the dashed probability density function is one. Both examples use dimensionless outcomes. Details.
Why is this useful? Linearity of expectation lets us compute an average total by adding average contributions, even for dependent random variables. And for independent and identically distributed integrable random variables, the strong law of large numbers says their sample mean approaches their common expected value almost surely. The theorem supplies the link to repeated observations; the weighted-average definition itself does not promise that any particular finite run will be close to the expected value.
There is a useful historical connection to valuing uncertain rewards. In his 1657 De ratiociniis in ludo aleae, Christiaan Huygens assigns the value to equally likely rewards , and when they have equally likely chances. These are the finite weighted-average formulas for expected value. His opening discussion asks how to divide the stakes when a game stops before completion, connecting probability to a concrete question about an unfinished contest. [ref].
The contrast between Pauling electronegativity and Mulliken electronegativity becomes clearer by following the measurements into the formulas. A Pauling bond-energy excess compares three compatible bond-dissociation energies; Mulliken electronegativity takes the arithmetic mean of an ionization energy and an electron affinity. The former asks how much stronger an unlike-atom chemical bond is than a stipulated baseline; the latter combines two different isolated-species energy gaps.
Actual readouts precede those model choices. In the nitrogen dissociation threshold from fragment images, fitted squared image radii versus assigned excitation energies reveal a threshold after accounting for the product quantum states. In the chlorine photodetachment threshold experiment, mass-selected anions overlap a tunable laser, and neutral-atom counts reveal the onset of Electron detachment. Opposite laser directions control the Doppler shift. That second threshold supplies an electron affinity, not an electronegativity; the Mulliken scale still needs an independent ionization energy.[ref][ref]
For an original arithmetic comparison, stipulate isolated-species and positive attachment-release for fictitious species . Their Mulliken electronegativities are . The largest ionization energy belongs to , while the largest Mulliken electronegativity belongs to : accepting an Electron matters as well as retaining one. Using signed attachment energies in gives exactly the same results.
Figure 1.
Stipulated inputs to Mulliken electronegativity and arithmetic-baseline Pauling electronegativity: different energies, units and orderings
. Details.
Independently stipulate and for , with unlike-atom values
Thus , and the Pauling scale differences from are . If all three fictitious species are placed above on that scale, their ordering is , whereas the stipulated Mulliken scale gives . The bond-dissociation energies and isolated-species energies were invented independently: this demonstrates what the formulas do, not a measured disagreement for actual chemical elements. A unit conversion cannot force these two input models to agree.
For a uniform random permutation of objects, let count its fixed points. Write . Each indicator random variable has expected value , so linearity of expectation gives for every . This average does not require independence: for , fixing two specified objects has probability , greater than the product of their individual probabilities.
For four objects, exact enumeration gives counts for fixed points among the equally likely permutations. Their weighted arithmetic mean is . Exactly three fixed points are impossible: the last object must then also be fixed.
Figure 1.
The fixed point count of a uniform random permutation averaged over all permutations of four objects
. Each card lists . Green entries equal their positions and therefore mark fixed points. The probability mass function on the right counts those cards; its expected value is one. Details.
Choose the fixed objects and derange the remaining . Their count is among equally likely permutations. The inclusion-exclusion principle for proves the displayed law, valid for and zero otherwise. With , it includes the all-fixed case and the impossibility of exactly fixed objects. For fixed , the law tends to , the Poisson distribution of mean one.
Geometric mean Created 2026-10-07 Updated 2026-10-13
The geometric mean replaces a list of nonnegative real numbers by one repeated value that preserves their product of numbers. For inputs,
For two positive inputs, is their positive square root. The geometric mean of and is three: replacing by retains the same product. In contrast, their arithmetic mean five retains the sum . The geometric mean is zero if any input is zero; the logarithm formula below requires every input to be positive. [ref].
Its usefulness becomes immediate for successive growth factors. Suppose a hypothetical positive quantity starts at , is multiplied by , then by . It goes , so the geometric mean factor is : a constant factor of one for both steps gives the same endpoint. The arithmetic mean factor is ; repeating it would give , a different endpoint. A mean of factors summarizes multiplicative change; subtracting one afterwards gives the equivalent change per step. Equal-duration steps are necessary to interpret this as change per common time interval.
For positive inputs, logarithms turn multiplication into addition, so
Thus the geometric mean is an arithmetic mean in logarithmic coordinates, followed by the exponential function. For positive measurements with a common unit, one can use dimensionless ratios to a fixed reference : . Changing the common unit rescales by the same factor as the inputs. As a check, doubling one input and halving another retains while usually changing the arithmetic mean.
Figure 1.
The geometric mean preserves multiplicative endpoints and sits between the harmonic mean and arithmetic mean
. Left: the original toy factors and return a quantity to its starting value; repeating their arithmetic mean would produce a larger endpoint. Right: the dimensionless inputs and keep product one while , , and separate as the inputs become less equal. Lines joining time steps are guides, not a continuous growth model. Details.
The arithmetic-geometric mean inequality gives . Apply that same inequality to the multiplicative inverses to obtain , where is the harmonic mean. Consequently
for positive inputs, with equality throughout exactly when all inputs agree. For and , the three values are , , and . They preserve, respectively, the sum of inverses, the product, and the sum. No one of these summaries preserves all three for unequal inputs.
Grayscale 2026-10-13
A grayscale image varies along shades from black to white rather than recording independent colour differences. A numerical grayscale image assigns one shade sample to each pixel; an encoding determines how that sample maps to a displayed shade. A colour raster image can also look grayscale, for example when its three sRGB components are equal.
Figure 1.
Toy quantization and sRGB encoding: more codes and more light are different questions
. Details.
The convention in our lossy block averaging example is black at the integer code 0 and white at 255. Its arithmetic means act on those stored codes. This is a fully specified numerical experiment, but it does not claim that code 128 means half the physical light of code 255. PNG explicitly allows samples that are not proportional to light: its grayscale interpretation depends on the indicated transfer curve, and can be device-dependent when that information is absent.[ref]
Two different questions therefore need different operations. To average stored codes, average the integers. To average relative luminance for neutral sRGB shades, decode the codes to linear light, average there, and encode the result again. Equal weights on black and white give encoded value by the first method, but approximately by the second. Rounded to eight-bit codes these are 128 and 188. This example concerns ideal neutral shades and the specified sRGB conversion; it does not assert a universal grayscale conversion for every colour encoding.
The upper panels hold the spatial grid fixed and change sample depth: four levels produce broad constant bands, while 256 levels make smaller numerical steps. The lower panels hold the colour interpretation fixed and compare encoded sRGB values with relative luminance. All panels are calculated synthetic examples, not measured display data. Grayscale is useful when shade structure is the quantity of interest: a synthetic scalar image signal can be inspected without introducing separate colour components.
Harmonic mean Created 2026-10-06 Updated 2026-10-14
The harmonic mean of a nonempty finite list of positive real numbers is the multiplicative inverse of the arithmetic mean of their inverses:
For two inputs, . Replacing each input by preserves the sum of inverses, making it useful when a fixed amount divided by a rate determines a cost or duration. This positive-input definition avoids division by zero; negative inputs need not retain the usual averaging or ordering properties. [ref].
Travel two legs of equal length at positive speeds , with no stops. Their travel times are and , so the average speed is
For two legs at and , the times are two hours and one hour. The average speed is . The same speeds maintained for one hour each instead cover in two hours, giving the arithmetic mean . A slower equal-distance leg occupies more time, so the data being averaged must include what is held equal. This is total distance traveled divided by elapsed time; a return journey can have zero average velocity while keeping a positive average speed. [ref].
Figure 1. . Two original idealized journeys use the same speeds, and . On the left each leg has length , taking a total of three hours. On the right each leg lasts one hour, taking two hours and covering . Dashed straight lines show the corresponding average speeds. The diagrams omit stops and transition duration and show cumulative distance traveled rather than signed displacement. Details.
The arithmetic-geometric mean inequality applied to the inverses gives ; together with it yields the comparison in geometric mean. For two inputs the arithmetic–harmonic gap has the exact form
For and the gap is five. With one positive input held fixed and another approaching zero, the harmonic mean approaches zero too: a very slow fixed-distance leg dominates the travel time. Unequal leg lengths instead require a weighted harmonic mean.