Abstract syntax tree precedence example Created 2026-10-13 Updated 2026-10-31
Consider Python programs x=2+3*4 and x=(2+3)*4. Operator precedence places multiplication inside the right operand of addition in the first abstract syntax tree. The parentheses instead place addition inside the left operand of multiplication in the second. Their right-hand sides evaluate to and . No rule that simply reads all operators left to right would recover both structures. [ref]
Figure 1.
Two abstract syntax trees for variable assignment: operator precedence gives x=2+3*4 the value , while parentheses give x=(2+3)*4 the value
. Details.
These are schematic views of Python trees: Module is omitted, and the Add/Mult and Store markers are written inside their owning nodes. In the actual schema, BinOp has left, op and right fields; Assign has a list of targets and a value. Name(id='x', ctx=Store()) marks the name as a variable assignment target. Reading x in a program expression instead uses Load. A variable assignment is a statement, not an equation asserting that two values are equal. [ref]
A restricted recursive evaluator can follow those fields. It accepts only integer literal values and binary addition, subtraction and multiplication; the surrounding variable assignment remains a separate action. Using type(value) is int excludes Boolean constants, even though Python treats bool as a subclass of int.
import ast

OPS = {ast.Add: lambda a, b: a + b,
       ast.Sub: lambda a, b: a - b,
       ast.Mult: lambda a, b: a * b}

def evaluate(node):
    if isinstance(node, ast.Constant) and type(node.value) is int:
        return node.value
    if isinstance(node, ast.BinOp) and type(node.op) in OPS:
        return OPS[type(node.op)](evaluate(node.left), evaluate(node.right))
    raise ValueError("outside the integer-expression language")

for source in ("x=2+3*4", "x=(2+3)*4"):
    tree = ast.parse(source, optimize=0)
    statement = tree.body[0]
    print(statement.targets[0].id, evaluate(statement.value))
# x 14
# x 20
The children in a rooted tree have ordered roles: left and right cannot be interchanged. For subtraction, 8-3 gives while 3-8 gives . Operator associativity also matters: 8-3-1 parses as (8-3)-1, giving , whereas 8-(3-1) gives . Here the syntax groups operators to the left; this does not assert the mathematical associativity of subtraction. Operator precedence determines grouping, rather than a general permission to reorder execution. For example, Python evaluates the calls in f()+g()*h() in the order f, g, h, although the multiplication result must be ready before the outer addition. [ref]
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]
Algebraic notation 2026-10-18
Algebraic notation represents variables, coefficients and algebraic operations by written symbols, so one expression can describe a family of equations.
Altitude of a triangle 2026-10-25
An altitude of a triangle is the whole line through one vertex that is orthogonal to the line through the opposite side. For vertex and opposite vertices , its equation in position vectors is . The three such lines meet at the orthocenter; they need not meet inside the triangle.
Bedload transport 2026-10-31
Bedload transport is motion of sediment grains along or close to the bed, represented in a depth-averaged model by a solid-volume flux per unit width. The Exner equation balances this flux divergence and changes in porous-bed solid storage against exchange with suspended sediment. Consistent mass units are necessary when adding this equation to a suspended mass-concentration balance.
Commutative ring Created 2026-09-24 Updated 2026-10-14
A commutative ring is a ring in which multiplication satisfies for every pair. The integers and the polynomial ring are examples. So is , the quotient ring whose elements are residue classes in modular arithmetic. We represent these by and reduce each sum or product to its remainder. All following calculations modulo use this convention.
In , , although neither factor is zero. Thus and are zero divisors: nonzero elements whose product with another nonzero element can vanish. Also . Removing the common factor would falsely assert . The entire row for multiplication by is
The repetitions explain the linear congruences directly. The equation has exactly the two solutions , whereas has none. A common factor can erase information, and a nonzero coefficient does not guarantee that an equation has a solution.
Figure 1.
Multiplication modulo 6 repeats outputs, while every nonzero row modulo 5 is a permutation
. Details.
A unit in a ring is an element with a multiplicative inverse, meaning for some . In , the units are exactly and , since . The other nonzero elements, , are zero divisors; for , use . In a nonzero commutative ring, a unit cannot be a zero divisor: multiplying by its multiplicative inverse forces . But a nonzero element need not be a unit or a zero divisor: the integer is neither in .
By contrast, in , every row for a nonzero multiplier is a permutation of . Each such row contains exactly once, giving a multiplicative inverse: , , , and . Hence this commutative ring is a field. For example, now has the unique solution . Reading the tables reveals which algebraic steps the arithmetic permits.
Start with a square of side length and add two rectangles, each with side lengths and . The total area is . Place the rectangles along two adjacent sides of the square: the missing corner is a by square, of area . Filling it produces a square of side length .
Figure 1.
Two rectangles and a missing corner explain
. An original area assembly, drawn at the stipulated positive side length . The corner has area ; the remaining constant gives . The diagram uses positive side lengths, while the polynomial identity holds for every in the real numbers. Details.
The area picture explains why the half-coefficient is squared. It also separates two operations that are easy to confuse: adding changes , whereas adding and subtracting preserves the expression. When solving an equation instead, adding to one side requires adding to the other side too.
Dimensional homogeneity 2026-10-18
Dimensional homogeneity requires all terms added in a physical equation, and both sides of that equation, to have the same physical dimension. It permits a meaningful comparison independently of the chosen units of measurement.
Elements of Algebra by Leonhard Euler Created 2026-10-24 Updated 2026-11-05
The publisher's historical-edition description dates the original German book to 1770. The linked reproduction is an English edition. Cited for the subject's continuing association with general numerical operations and the solution of equations.
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 .
Equation Created 2026-10-13 Updated 2026-10-20
An equation asserts that two mathematical expressions have the same value. Solving it means finding all allowed assignments to its variables that make that assertion true. It converts a relationship into a constraint: a measurement, a geometric intersection, or an equilibrium model can leave an unknown value to determine.
The allowed values matter. The equation has solution set over the rational numbers, but the empty set over the integers. Over the real numbers, has two solutions, and . A mathematical identity, such as , holds for every permitted real . The familiar equality sign therefore does not by itself say whether one is checking a particular value, solving for an unknown, or stating an identity.
For a worked linear equation over the real numbers,
The first step subtracts three from both sides; the second divides both sides by the nonzero number two. Reversing the steps recovers the original equation, so these are equivalent equations with the same solution set . Checking the value gives . The role of reversible operations and the classification by solution sets are described in College Algebra 2e, §2.2: Solving Linear Equations in One Variable.
Figure 1.
Reversible operations change the graphs of the two sides but preserve the intersection's input value
. Details.
When the two sides define real-valued functions and on a common domain of a function, solutions are exactly the input values at which their function graphs intersect. Equivalently, they are the zeros of a function . This gives a useful connection between symbolic algebra and geometry: rearranging an equation can simplify the comparison without changing the inputs where equality holds.
Not every operation is reversible on every domain of a function. Dividing by gives only after restricting to ; it loses the solution if that restriction is forgotten. Squaring both sides can instead introduce an extraneous solution, because distinct real numbers can have the same square. The source equation, its domain of a function, and the direction of each implication should travel together.
Equivalent equations Created 2026-10-14 Updated 2026-10-18
Two equations are equivalent on a specified domain of a function if they have the same solution set. Adding the same defined mathematical expression to both sides is reversible. Multiplying or dividing both sides by a mathematical expression is reversible only where that expression is nonzero and invertible in the arithmetic being used. In a field, every nonzero scalar is invertible; a general ring needs an additional check.
For example, and are equivalent equations over the real numbers, by the distributive property. Concluding or additionally uses the absence of zero divisors. The modular example in algebra shows why that extra inference can fail in a ring with zero divisors.
Expression (mathematics) Created 2026-10-13 Updated 2026-10-24
A mathematical expression combines symbols according to formation rules, such as , , or . With values for its variables and meanings for its algebraic operations, it can be evaluated. An equation relates two mathematical expressions; an expression alone need not assert anything.
For example, evaluates to seven at and nine at . Neither value solves anything until a condition is imposed: the equation selects from the real numbers. This distinction is useful when moving from a formula to a question about which inputs satisfy it. Evaluation by replacing the variables with assigned values is described in College Algebra 2e, §1.1: Evaluating Algebraic Expressions.
Different written mathematical expressions can have the same value for every input in a common domain of a function. The distributive property expands to , while factorizing reverses that change of form. The mathematical identity between them lets one choose the form suited to the next task: the factored form exposes a multiple root at , and the expanded form exposes its coefficients. Simplifying should preserve values on the stated domain, rather than silently enlarging it.
Extraneous solution 2026-10-14
An extraneous solution satisfies a transformed equation but fails the original equation or its restrictions. The term describes a candidate generated during the calculation, rather than a true solution that can be kept in the final solution set.
Consider the real equation
The square root requires . Because the square root is nonnegative, any solution must also have , so . Squaring gives
The squared equation has candidates and . At , the original equality is . At , it is , which fails: this candidate is an extraneous solution. Thus the original solution set is exactly .
Figure 1.
Squaring removes a sign distinction and creates a second intersection at , which fails the original equation
. Details.
On the restricted domain of a function , both original sides are nonnegative, so squaring is reversible there and the two equations are equivalent. Retaining the sign restriction or checking every candidate in the original equation achieves the same final solution set. The general need to check candidates after raising both sides to a power is explained in College Algebra 2e, §2.6: Solving Radical Equations.
Feasible region Created 2026-10-14 Updated 2026-10-14
The set of all feasible points of an optimization problem. It depends on the optimization constraints and the decision domain; the objective function ranks its members.
Think of three successive questions. Which decisions can be represented in the model? Which satisfy every optimization constraint? Which of those receive the best objective function value? For decisions in a domain , inequalities and equations define the feasible region
The domain must be contained in the domain of a function for every function being evaluated; choosing integers rather than real numbers as decisions can also change the feasible set. Constraint satisfaction determines membership of . Minimizing an objective function then compares its members by , with optimal value . Changing the scores while keeping and the optimization constraints fixed leaves unchanged, provided the new objective function is defined throughout . These distinctions separate an allowed decision from a best decision.[ref]
Field with four elements Created 2026-10-06 Updated 2026-10-14
Build this finite field by taking a quotient ring of a polynomial ring:
The polynomial has in the prime field . A polynomial of polynomial degree two is an irreducible polynomial exactly when it has no polynomial root in the coefficient field. Thus the quotient by an irreducible polynomial is a field construction applies. Its elements have unique representatives , with : precisely .
The defining relation is . Since this finite field has characteristic two, every element equals its additive inverse, and the relation becomes . Addition acts separately on the two coefficients:
All coefficient calculations use modular arithmetic modulo two. For example, and . Encoding as the pair of bits gives , , , and ; addition is bitwise exclusive or. These are coordinates in the basis , so the label does not make the element .
For multiplication, expand using the distributive property and replace every by :
For example, , while . The following complete tables are computed from the coefficient rules. Colors identify results, rather than their numerical sizes. Every row of the addition table lists all four elements, and every nonzero row of the multiplication table does too: adding an element, or multiplying by a nonzero element, can be undone.
Figure 1.
Computed addition and multiplication tables for the field with four elements
. Details.
The nonzero multiplicative inverses are , , and . Consequently the equation has the unique solution . Repeated multiplication gives , , , and . They cycle through every element of the multiplicative group of a finite field.
Compare the ring , also with four elements. Its addition satisfies , and its multiplication satisfies . Thus is a zero divisor, with no multiplicative inverse, and this ring is not a field. Multiplying by collapses different inputs to the same output: both and give , while both and give . In the field with four elements, multiplying by instead rotates the three nonzero elements, preserving their distinctness. The figure makes visible why counting four elements alone does not specify their arithmetic.
Figure 2.
Four elements with different arithmetic: a field and integers modulo four
. Details.
First-order unification Created 2026-10-20 Updated 2026-11-05
First-order unification solves a finite system of equations between first-order terms. A useful rule presentation deletes , orients to when is a variable, decomposes equal outer function symbols into argument equations, and rejects unequal outer function symbols. For , reject a nontrivial occurrence of in by the occurs check; otherwise propagate the substitution through the other equations. A solved system assigns distinct variables that do not occur in its right sides.[ref]
For example,
first becomes . Propagating gives , hence a most general unifier. Keeping without composing the later substitution would leave an unsolved dependency.
The rules preserve the possible unifiers, apart from explicitly rejecting impossible equations. Decomposition works because identical first-order terms have identical constructors and arguments. At a solved system, any other unifier is obtained by instantiating its remaining free variables; this proves the most general unifier property. Efficient implementations share term graphs rather than repeatedly copying growing first-order terms.
The unique equilibrium has and . Its determinant is and trace is . Thresholds are obtained from the two displayed equations, and a positive-trace interval exists only if the fast normal derivative rises above . At a nondegenerate trace crossing, the linear oscillation frequency is . The sign of a nonlinear Hopf coefficient is needed to classify the local periodic branch; in a bounded positive planar flow, a unique repelling equilibrium also allows a Poincaré-Bendixson existence argument for a periodic orbit.
Horner's method 2026-10-14
Horner's method evaluates a polynomial by nested multiplication, requiring one multiplication and one addition per degree after initialization.
For , start with and compute for . The final value is . Equivalently,
This reorganization reuses intermediate results, avoiding separate computation of every power. A dense degree- polynomial takes multiplications and coefficient additions after reading its leading coefficient; special zero coefficients may permit further simplifications.
For our cubic, the coefficient list in descending order is . The zero is important: it occupies the missing term's position. At , the accumulated values are
At , the same operations give , confirming .
Figure 1.
The same nested arithmetic evaluates a polynomial and produces the coefficients for division by a linear factor
. Details.
The intermediate values do more than evaluate. They are the coefficients of the polynomial quotient in polynomial division by , with the final value as the polynomial remainder. At , the first three values give , so
At , they give , so . This links an efficient numerical calculation with the exact factor theorem.
William George Horner's 1819 paper concerns solving numerical equations by successive approximation. The Royal Society archive records the manuscript and its reading on 1 July 1819; it provides a historical reference for the method's name. [ref]
// Target: geometry-and-topology.bigb
Identity (mathematics) 2026-10-14
A mathematical identity is an equation that holds for every assignment in a specified domain of a function. For example, the distributive property gives for every real number . An identity can replace one mathematical expression by another without imposing a new restriction on that domain.
The domain remains essential. The equality holds for every real , but its left side is undefined at . Cancelling a factor does not retrospectively define the original mathematical expression at the excluded input. An identity is different from an identity element of an algebraic operation or an identity function, which are separate concepts despite sharing a name.