Algebra Created 2026-09-24 Updated 2026-10-13
Algebra studies equations, algebraic operations, and the structures that make their rules work. Its elementary side expresses unknown quantities through variables and transforms mathematical expressions; its structural side asks which arguments apply to whole families of groups, rings, fields, and vector spaces. The useful step is identifying exactly which properties a calculation needs, so that it can be reused in a new setting.
For example, the polynomial equation over the real numbers factors as , giving roots and . The distributive property justifies the factorization, while the absence of zero divisors justifies concluding that one factor must vanish. Over the finite field , the same integer coefficients reduce to , with roots and . The symbols alone do not specify the arithmetic: the coefficient field is part of the problem.
In a ring with zero divisors, a familiar step can fail. Modulo , all four residue classes satisfy . For , the factorization holds modulo , yet neither factor is zero. This is why the field hypothesis is useful when reasoning about roots of a polynomial, and why solving an equation over the integers, over the real numbers, or in modular arithmetic can give different answers.
The structure is also useful beyond scalar arithmetic. Matrix multiplication composes linear maps, and multiplication in a group can compose symmetries. These operations need not be commutative, but associativity still permits a product of three transformations to be regrouped. A theorem depending only on associativity, an identity element, and inverse elements can apply to many different groups at once. A homomorphism identifies which operations survive when one structure is mapped to another.
Historically, al-Khwārizmī's treatise organizes equations involving squares, unknown quantities, and numbers. Frederic Rosen's 1831 English translation includes the calculation now written and geometric explanations for completing the square. In modern notation, gives or ; the historical treatment seeks the positive quantity . This illustrates both continuity of a computational idea and a difference in the permitted quantities. [ref]
Let . The identity
and completing the square give, when the current boundary integral vanishes,
For flux , the lower bound is , saturated by the two first-order Bogomolny equations. Division by is interpreted in the finite-energy sense at its zeros.
Center (geometry) 2026-10-18
The center of a circle or sphere is the unique point at the fixed positive radius from every point of that circle or sphere. In Cartesian coordinates, its equation is . In the complex plane, a circle has equation ; completing the square identifies as its center. For example, has center .
Center of an ellipse 2026-10-25
The center of an ellipse is its unique center of symmetry. In the equation , with a symmetric positive-definite matrix and , reflection preserves the ellipse. For , completing the square gives .
For real and complex , if , completing the square gives . A positive right side gives a circle; zero gives a single point; a negative value gives the empty set. If and , the equation is the straight line . If , it describes the whole complex plane when , and the empty set otherwise. Thus unrestricted coefficients require both the single-point and whole-plane degeneracies.
For differentiable functions that are convex functions on an open convex set and affine functions , the KKT conditions certify a global minimum. Once Lagrange multipliers satisfy them, no extra Slater condition is needed.[ref]
The certificate is a short chain of inequalities. Nonnegative Lagrange multipliers and affine equalities make a convex function. Its zero gradient gives a global minimum at by the first-order optimality condition. For every feasible point ,
The first equality uses feasibility and complementary slackness; the last inequality uses and . Equivalently, the Lagrange dual function attains the same value as the primal objective function, proving strong duality. A strictly convex function makes the primal optimum unique, although the Lagrange multipliers need not be unique.
Affine equality optimization constraints matter: an arbitrary signed multiple of a nonlinear equality can destroy convexity of the optimization Lagrangian. For example, minimizing subject to the affine equality gives and for . This equality Lagrange multiplier is positive for , zero at , and negative for . Completing the square gives the certificate for every real number .
Outside convex optimization, KKT stationarity alone does not certify an optimum: minimizing with no optimization constraints gives the stationary candidate , which is a global maximum. The Lagrangian sufficiency theorem remains applicable whenever a global minimum of the optimization Lagrangian can be proved directly.
Let be an odd prime and let be integers with . The quadratic congruence
has a solution exactly when its discriminant is zero or a quadratic residue modulo .
Indeed, completing the square gives the equivalent equation
Multiplication by and translation by give a bijection of the residue classes, because is invertible modulo . Each square root of therefore gives exactly one solution .
Consequently the number of distinct solutions is , using the Legendre symbol: one for zero discriminant, two for a nonzero quadratic residue, and none for a quadratic nonresidue. The hypotheses matter: if the equation can become linear, while at division by is unavailable.
Keep the feasible triangle with a squared-distance objective, but add the equation . An equality requires an exact relation, whereas an inequality allows a range. Here the equality selects a line, and intersecting that line with the original feasible region leaves just the line segment from to :
The lower bound comes from ; the upper bound comes from . This is a nonempty closed set even though it has empty interior in the plane. An equality can reduce the dimension of the allowed decisions without making the feasible region empty.
The old optimum violates the added equality. On the surviving line segment, the objective function is
The derivative shows that the unique global minimum is at , giving and value . The nearest point on the entire equality line would be , at with value , but it violates . Both the equality and the original inequalities must hold simultaneously.
Figure 1.
Equality slice of a feasible triangle: the allowed line segment ends at the optimum (2,1), while the nearest point on the entire line is infeasible
. Details.
Use and to fix the multiplier sign convention in the optimization Lagrangian ; the Lagrange multipliers of and are again zero. At , Karush-Kuhn-Tucker conditions hold with and :
The Lagrange multiplier of an equality has no nonnegativity restriction. For an independent global certificate, completing the square gives . On the feasible set, and , so , with equality exactly at .
Feasible point 2026-10-13
A feasible point satisfies every optimization constraint of an optimization problem. For the budget constraint example, the feasible set is exactly
It is the line segment from to , a compact set and a convex set. The point is feasible, with product ; has a larger product but violates the budget constraint. Feasibility answers whether a decision is allowed; optimality asks whether any allowed decision is better. The extreme value theorem guarantees that this continuous objective function attains its maximum on this nonempty compact set.
Eliminating gives a one-variable objective function:
By completing the square, , with equality exactly at . Alternatively its derivative is , which vanishes at ; the endpoint values are both zero. Completing the square proves global optimality directly, whereas the first-order optimality condition only identifies a candidate. It also quantifies the cost of imbalance: moving to with loses exactly units of product. The arithmetic-geometric mean inequality gives another short certificate: , with equality exactly when .
For a transportation problem with capacity inequalities, feasibility requires nonnegative shipments, row totals no greater than factory capacities and column totals equal to shop demands. Feasibility alone does not prove minimal cost: a matching transportation dual certificate with capacity inequalities provides an optimality proof. The feasible set can be empty, and a finite infimum need not be attained even when the set is nonempty.
Gauss-Seidel iteration for a two-variable positive-definite system Created 2026-10-18 Updated 2026-10-31
Consider the original linear system
Direct substitution verifies the solution. The matrix is a symmetric positive-definite matrix: completing the square in its quadratic form gives for every nonzero vector. It is also a strictly diagonally dominant matrix.
Starting from , update the first row and then the second:
The first sweep gives and . The next gives and . The second row uses during the first sweep, even though the initial first coordinate was zero.
Figure 1.
Fresh and stale inputs in the first sweep of the original two-variable linear system
. Details.
With a stale first coordinate, the Jacobi method would instead give after the first sweep. Both methods have the same fixed point, but changing when coordinates become available changes the entire sequence of vectors.
With the convention , the Hellinger distance between two normal distributions with is
To prove it, integrate the geometric mean of their probability density functions. Completing the square makes that geometric mean the density of a normal distribution times the displayed prefactor and exponential. For example, writing , that normal distribution has mean and variance . The identity then proves the formula.
For equal unit variances, this becomes . More generally, put and . Then , , and , proving
The interval dependency problem is the loss of relationships between repeated occurrences of the same input. For , interval subtraction gives : it permits with independent choices . But the function has actual image of a function . Giving both operands the name does not tell an interval arithmetic calculation to enforce .
For the polynomial on , the natural interval extension is
This allows the impossible combination in the first factor and in the second, producing the spurious upper bound . In the actual function, both occurrences use the same . Completing the square gives , which lies between and on ; every value between these bounds occurs, by continuity and the intermediate value theorem. The maximum occurs at , while either endpoint gives the minimum .
Figure 1.
Independent interval inputs lose the diagonal constraint; subdivision tightens the enclosure of x times one minus x
. Left: the Cartesian product permits separate choices , while the actual function uses only . Right: rectangles from four pieces contain the polynomial curve. Below: one, two and four pieces give interval enclosures with upper bounds , and ; the interval square range gives the exact . Details.
Interval square range 2026-10-14
The interval square range treats squaring as one function of one input. For it is exactly
It retains the relationship that ordinary interval multiplication loses: for , the interval square range is , whereas the independent-input product is .
Consequently, completing the square for and using the interval square range gives
This is the exact image of a function on . Merely rewriting the expression and evaluating gives , so it does not achieve the same sharpening. A mathematical must be interpreted explicitly here: a square range operation and an independent-input interval product have different meanings. Choosing an operation that preserves known structure can save many steps of interval subdivision.
Lagrange multiplier Created 2026-09-24 Updated 2026-10-13
For continuously differentiable functions on an open subset of , suppose is a local extremum of subject to , with . Then a real number , the Lagrange multiplier, satisfies
The nonzero gradient assumption excludes singular points of the optimization constraint. With several equality optimization constraints, require their gradients to be linearly independent; the gradient of is then a linear combination of them. These are necessary conditions, not automatic certificates of a global maximum or global minimum.
Why can the gradient be nonzero at an optimum? In unconstrained optimization, every direction is available at an interior local extremum, so all directional derivatives vanish and . On a regular equality feasible set, only directions in its tangent space are available to first order. The gradient of must be perpendicular to those directions, so it is parallel to the gradient of . In two dimensions this explains the tangency of their level sets. See MIT, Lagrange multipliers and contour geometry.
For the product example, set and use the optimization Lagrangian
Its partial derivatives give , , and . Hence . At , : increasing both inputs would help, but is infeasible. Along the allowed direction , the directional derivative is zero. The endpoints must still be checked because of the nonnegativity optimization constraints; completing the square establishes the unique global maximum.
The sign convention matters: writing instead gives . Neither equality Lagrange multiplier has a universal nonnegativity requirement. Also, the displayed is unbounded above along , so stationarity here does not meet the global hypothesis of the Lagrangian sufficiency theorem.
The Lagrange multiplier also measures the value of extra resources. For a positive budget , the optimizer is , the optimum value is , and . At , an extra units predicts a gain of ; the exact gain is . This is the envelope theorem in a computed sensitivity analysis: the multiplier translates a binding budget constraint into a marginal benefit.
Suppose two adjustable inputs must deliver a prescribed total , and their combined cost is the quadratic form . These are chosen, dimensionless quantities; the coefficient makes concentrating an input in more expensive. Initially allow all real numbers , with the equality optimization constraint . The optimization Lagrangian with our chosen sign is
The stationary point equations give , , and . Consequently
For , the unique global minimum is at , with cost and Lagrange multiplier . Equal allocation would cost ; assigning everything to would cost . At the optimum, the two marginal costs agree: . Moving a little input from one component to the other therefore has zero first-order effect on cost. When , this solution also meets the extra nonnegativity optimization constraints , so it remains optimal with those added.
Figure 1.
The first attainable cost ellipse touches at
. Original chosen quadratic form . Left: level sets, the equality feasible set, and the parallel gradients at the optimum. The blue arrow is so both arrows fit; it is not the full gradient of . Right: substituting makes the unique global minimum visible on the entire feasible line, not just near its stationary point. Details.
Here the Lagrange multiplier equations locate a candidate, and a short independent check certifies it. On the entire feasible set, substitute and use completing the square:
The squared term is nonnegative and vanishes only at . Thus the candidate is the unique global minimum; there is no global maximum on this unbounded feasible set, a line. This separates finding a stationary point from proving optimality. The geometric beauty is that equal marginal costs, parallel gradients, tangency of level sets, and completing the square identify the same allocation.
Lagrangian duality for a quadratic threshold Created 2026-10-18 Updated 2026-10-31
Choose the one-variable quadratic program
Without the optimization constraint, the global minimum is at . On the feasible set , write with : then . Hence is the unique primal optimizer and .
For any , completing the square in the optimization Lagrangian gives
The inner minimization problem is over all real numbers, so its unique optimizer is . Therefore
The best lower bound is , attained at . At , the inner optimizer is , which is infeasible for the primal problem; nevertheless is a valid lower bound. At , the inner optimizer is , which is feasible, but is weaker than . Feasibility of an inner optimizer alone does not make the bound exact.
Figure 1.
Lagrangian duality finds the quadratic's exact lower bound at multiplier 6
. Left: the objective function, three optimization Lagrangians, and the shaded feasible set . Dots mark the global minima of the optimization Lagrangians over all real numbers; each yields a horizontal lower bound. Right: the concave Lagrange dual function reaches the primal value . All parameters are chosen for this worked example. Details.
At , the Karush-Kuhn-Tucker conditions reduce to
The last equality is complementary slackness. The strongest certificate is visible without solving another optimization problem: , so every feasible point satisfies
The same Lagrange multiplier simultaneously makes the inner optimizer feasible and removes the slack between and . This is a convex KKT optimality certificate; also verifies Slater's condition.
The domain in the inner infimum is essential. If one mistakenly keeps when computing , the restricted minimum becomes , whereas the actual Lagrange dual function has value . Constraints deliberately retained in are allowed in a Lagrangian relaxation, but that is a different choice of which restrictions to dualize.
Linear-source multivariate Gaussian integral Created 2026-10-14 Updated 2026-11-05
For a real symmetric positive-definite matrix and a real vector , completing the square with gives a real change of variables. Orthogonal diagonalization reduces the remaining integral to the product of one-dimensional Gaussian integrals, proving the displayed expression. Positivity ensures convergence and the positive determinant square root. Replacing matrices by regulated field kernels gives the Gaussian functional integral; an oscillatory Minkowski integral instead requires a causal convergence prescription.
Matrix congruence Created 2026-10-06 Updated 2026-10-14
Two square matrices are congruent when for an invertible matrix . This is the transformation of the matrix of a bilinear form under change of basis, and also transforms a quadratic form under an invertible linear map on its coordinates. The matrices need not be symmetric. It differs from matrix similarity, which uses for a linear operator. For real symmetric matrices, completing the square diagonalizes the corresponding quadratic form by matrix congruence.
Normal-normal conjugacy with unequal exposures Created 2026-10-14 Updated 2026-11-05
For and independent normal observations conditional on , with mean and variances , and normal prior mean and variance , write . Multiplying likelihood and prior adds precisions . completing the square gives the displayed posterior distribution. Its posterior mean is , where and . Thus the Bayes estimator under squared error loss is exactly the Bühlmann–Straub credibility estimate, not merely an approximation to it. Its posterior variance is .
In a normal linear model , assign the coefficient vector a proper normal distribution with fixed positive-definite covariance matrix , independently of the variance , whose prior distribution is inverse-gamma distribution. Completing the square gives
Multiplying the residual likelihood function by the inverse-gamma distribution density also gives
These full conditional distributions permit a Gibbs sampler. The marginal coefficient posterior distribution is obtained by marginalization over . Its conditional mean and covariance matrix both depend on , so it is generally not a Student's t-distribution. Even if the columns of and the prior coordinates make the conditional coefficient components independent, averaging over a shared unknown need not preserve that independence.
A normal-inverse-gamma prior instead scales the conditional coefficient prior covariance matrix by , producing a multivariate Student's t-distribution on marginalization. It is a different joint prior distribution.