Skip to the passage panel
WikiLean Β· Articles Articles Brain Contribute About

Preliminary: these links have not yet had an independent audit.

Sign (mathematics)

83 passages47 formalized22 partial14 not formalized

Statement only

More ways to filter
Library
Passages
About this page

This page

  • Wikipedia revision 1373168233, pinned: the text here is that revision, not today's article.
  • WikiProject Mathematics: C-class, High importance
  • 83 passages checked, 124 Lean locations (and 28 related declarations).

Central statements: 49 of the 83 passages state the article's subject or a named result or definition; the other 34 are supporting (examples, setup). Of these 49: 33 formalized, 10 partial, 6 not formalized.

What the colours mean

  • Formalized a Lean declaration states it, proved, or a Lean definition defines it
  • Statement only Lean states it, but the proof is not finished
  • Partial Lean states part of it, or a more general or special form
  • Not formalized searched every library and not found

Libraries searched

Searched 48 Lean libraries, pinned 2026-10-17, 3 left out (library set u1).

How these links were made

  • Accuracy, from an audit of a sample of 224 items (blind, not independent): Strong links (exact, close or broad match) on supporting passages that have exactly the right relation: 92% (95% interval 49–99%), from 36 drawn of 1029, weighted by relation and library, an effective sample of 5.1; Links in a counting relation (exact, close, broad, narrow match or part) on supporting passages that have exactly the right relation: 73% (95% interval 40–92%), from 48 drawn of 1740, weighted by relation and library, an effective sample of 8.1; Central and subject passages whose formalization status is right: 86% (95% interval 73–94%), from 44 drawn of 1905, weighted by recorded status, an effective sample of 42; 'Not formalized' on supporting passages that is right (no declaration in the 48 libraries states it): 60% (95% interval 25–87%), from 12 drawn of 1236, weighted by article, an effective sample of 6.1.
  • Audit run tierA-batch1-audit, run by jack, 2 Nov 2026, 21:10 – 3 Nov 2026, 02:10 UTC: judged by Claude Opus 5.5 (claude-opus-5-5).
  • Record set tierA-b1a (cf-locate-recordset/2, statuses by status rule 3), exported 1 Nov 2026 by formal-companion at commit d85385a.
  • Seal sha256 f1e67e43a41f537cd8e4cdcbdbaba86bd4ed58f1277aef79f9e34fb275f3edcc.
  • Inventory run inv-tierA-b1r, run by jack, 30 Oct 2026, 07:23–20:00 UTC: worker Claude Opus 5 (claude-opus-5), reviewer Claude Opus 5 (claude-opus-5). It listed the formal passages, each with its kind and prominence, that the locate run then searched.
  • Locate run loc-tierA-b1a, run by jack, 31 Oct 2026, 02:50–04:48 UTC: worker Claude Opus 5 (claude-opus-5), reviewer Claude Opus 5 (claude-opus-5).
  • Challenge run chal-tierA-b1, run by jack, 1 Nov 2026, 03:19–14:25 UTC: worker Claude Opus 5 (claude-opus-5), reviewer Claude Opus 5 (claude-opus-5). In this article it re-checked every Lean location and absence on a central or subject passage (82 locations and 6 absences); on supporting passages, a seeded sample (seed 0; drawn at 0.5 for strong matches, 0.2 for weaker links and 0.25 for absences): 25 of 42 locations and 1 of 8 absences. In all, 107 of 124 Lean locations (86%) and 7 of 14 absences (50%) were re-checked.
  • Passage text: 83 of 83 passages shown in full, each the slice of the pinned revision's text that its record's span sha256 hashes, checked when the store was built.
  • Lean code: each declaration's type, from the declaration corpus of universe u1 (built 18 Oct 2026, sha256 a364fd6aede5), at the commit its card links.

How the text is shown

Each passage is shown in full, as revision 1373168233 states it (checked against its record's span hash when the store was built). Where a passage is only part of a sentence, it is highlighted and the rest of the sentence is shown in grey around it, from the same copy of the revision; a list item also shows the sentence that introduces it. Formulas are drawn from their TeX; hover one to see it.

Each card's Lean code is its declaration's type as Lean prints it, from the declaration corpus of library set u1 at the card's commit, laid out as a header: binders before the colon, then the hypotheses as arrows (the corpus keeps no hypothesis names) and the conclusion, in Mathlib's notation (𝓝, Ο€, R[X], Type*). It is not the source text; Source opens that.

Select a highlighted passage to see where Lean formalizes it.

The plus and minus symbols are used to show the sign of a number.

In mathematics, the sign of a real number is its property of being either positive, negative, or 0. Depending on local conventions, zero may be considered as having its own unique sign, having no sign, or having both positive and negative sign. In some contexts, it makes sense to distinguish between a positive and a negative zero.

In mathematics and physics, the phrase "change of sign" is associated with exchanging an object for its additive inverse (multiplication with βˆ’1, negation), an operation which is not restricted to real numbers. It applies among other objects to vectors, matrices, and complex numbers, which are not prescribed to be only either positive, negative, or zero.

The word "sign" is also often used to indicate binary aspects of mathematical or scientific objects, such as odd and even (sign of a permutation), sense of orientation or rotation (cw/ccw), one sided limits, and other concepts described in Β§ Other meanings below.

Sign of a number

Numbers from various number systems, like integers, rationals, complex numbers, quaternions, octonions, ... may have multiple attributes, that fix certain properties of a number. A number system that bears the structure of an ordered ring contains a unique number that when added with any number leaves the latter unchanged. This unique number is known as the system's additive identity element. For example, the integers has the structure of an ordered ring. This number is generally denoted as 0. Because of the total order in this ring, there are numbers greater than zero, called the positive numbers. Another property required for a ring to be ordered is that, for each positive number, there exists a unique corresponding number less than 0 whose sum with the original positive number is 0. These numbers less than 0 are called the negative numbers. The numbers in each such pair are their respective additive inverses. This attribute of a number, being exclusively either zero (0), positive (+), or negative (βˆ’), is called its sign, and is often encoded to the real numbers 0, 1, and βˆ’1, respectively (similar to the way the sign function is defined).[1] Since rational and real numbers are also ordered rings (in fact ordered fields), the sign attribute also applies to these number systems.

When a minus sign is used in between two numbers, it represents the binary operation of subtraction. When a minus sign is written before a single number, it represents the unary operation of yielding the additive inverse (sometimes called negation) of the operand. Abstractly then, the difference of two number is the sum of the minuend with the additive inverse of the subtrahend. While 0 is its own additive inverse (βˆ’0 = 0), the additive inverse of a positive number is negative, and the additive inverse of a negative number is positive. A double application of this operation is written as βˆ’(βˆ’3) = 3. The plus sign is predominantly used in algebra to denote the binary operation of addition, and only rarely to emphasize the positivity of an expression.

In common numeral notation (used in arithmetic and elsewhere), the sign of a number is often made explicit by placing a plus or a minus sign before the number. For example, +3 denotes "positive three", and βˆ’3 denotes "negative three" (algebraically: the additive inverse of 3). Without specific context (or when no explicit sign is given), a number is interpreted per default as positive. This notation establishes a strong association of the minus sign "βˆ’" with negative numbers, and the plus sign "+" with positive numbers.

Sign of zero

Within the convention of zero being neither positive nor negative, a specific sign-value 0 may be assigned to the number value 0. This is exploited in the sgn {\displaystyle \operatorname {sgn} } -function, as defined for real numbers.[1] In arithmetic, +0 and βˆ’0 both denote the same number 0. There is generally no danger of confusing the value with its sign, although the convention of assigning both signs to 0 does not immediately allow for this discrimination.

In certain European countries, e.g. in Belgium and France, 0 is considered to be both positive and negative following the convention set forth by Nicolas Bourbaki.[2]

In some contexts, such as floating-point representations of real numbers within computers, it is useful to consider signed versions of zero, with signed zeros referring to different, discrete number representations (see signed number representations for more).

The symbols +0 and βˆ’0 rarely appear as substitutes for 0+ and 0βˆ’, used in calculus and mathematical analysis for one-sided limits (right-sided limit and left-sided limit, respectively). This notation refers to the behaviour of a function as its real input variable approaches 0 along positive (resp., negative) values; the two limits need not exist or agree.

Terminology for signs

When 0 is said to be neither positive nor negative, the following phrases may refer to the sign of a number:

  • A number is positive if it is greater than zero.
  • A number is negative if it is less than zero.
  • A number is non-negative if it is greater than or equal to zero.
  • A number is non-positive if it is less than or equal to zero.

When 0 is said to be both positive and negative,[2][verification needed] modified phrases are used to refer to the sign of a number:

  • A number is strictly positive if it is greater than zero.
  • A number is strictly negative if it is less than zero.
  • A number is positive if it is greater than or equal to zero.
  • A number is negative if it is less than or equal to zero.

For example, the absolute value of a real number is always "non-negative", but is not necessarily "positive" in the first interpretation, whereas in the second interpretation, it is called "positive"β€”though not necessarily "strictly positive".

The same terminology is sometimes used for functions that yield real or other signed values. For example, a function would be called a positive function if its values are positive for all arguments of its domain, or a non-negative function if all of its values are non-negative.

Complex numbers

Complex numbers are impossible to order, so they cannot carry the structure of an ordered ring, and, accordingly, cannot be partitioned into positive and negative complex numbers. They do, however, share an attribute with the reals, which is called absolute value or magnitude. Magnitudes are always non-negative real numbers, and to any non-zero number there belongs a positive real number, its absolute value.

For example, the absolute value of βˆ’3 and the absolute value of 3 are both equal to 3. This is written in symbols as |βˆ’3| = 3 and |3| = 3.

In general, any arbitrary real value can be specified by its magnitude and its sign. Using the standard encoding, any real value is given by the product of the magnitude and the sign in standard encoding. This relation can be generalized to define a sign for complex numbers.

Since the real and complex numbers both form a field and contain the positive reals, they also contain the reciprocals of the magnitudes of all non-zero numbers. This means that any non-zero number may be multiplied with the reciprocal of its magnitude, that is, divided by its magnitude. It is immediate that the quotient of any non-zero real number by its magnitude yields exactly its sign. By analogy, the sign of a complex number z can be defined as the quotient of z and its magnitude |z|. The sign of a complex number is the exponential of the product of its argument with the imaginary unit. represents in some sense its complex argument. This is to be compared to the sign of real numbers, except with e i π = − 1. {\displaystyle e^{i\pi }=-1.} For the definition of a complex sign-function. see Β§ Complex sign function below.

Sign functions

Real sign function y = sgn(x)

When dealing with numbers, it is often convenient to have their sign available as a number. This is accomplished by functions that extract the sign of any number, and map it to a predefined value before making it available for further calculations. For example, it might be advantageous to formulate an intricate algorithm for positive values only, and take care of the sign only afterwards.

Real sign function

The sign function or signum function extracts the sign of a real number, by mapping the set of real numbers to the set of the three reals { − 1 , 0 , 1 } . {\displaystyle \{-1,\;0,\;1\}.} It can be defined as follows:[1] sgn : R → { − 1 , 0 , 1 } x ↦ sgn ⁡ ( x ) = { − 1 if  x < 0 ,     0 if  x = 0 ,     1 if  x > 0. {\displaystyle {\begin{aligned}\operatorname {sgn} :{}&\mathbb {R} \to \{-1,0,1\}\\&x\mapsto \operatorname {sgn}(x)={\begin{cases}-1&{\text{if }}x<0,\\~~\,0&{\text{if }}x=0,\\~~\,1&{\text{if }}x>0.\end{cases}}\end{aligned}}} Thus sgn(x) is 1 when x is positive, and sgn(x) is βˆ’1 when x is negative. For non-zero values of x, this function can also be defined by the formula sgn ⁡ ( x ) = x | x | = | x | x , {\displaystyle \operatorname {sgn}(x)={\frac {x}{|x|}}={\frac {|x|}{x}},} where |x| is the absolute value of x.

Complex sign function

While a real number has a 1-dimensional direction, a complex number has a 2-dimensional direction. The complex sign function requires the magnitude of its argument z = x + iy, which can be calculated as | z | = z z ¯ = x 2 + y 2 . {\displaystyle |z|={\sqrt {z{\bar {z}}}}={\sqrt {x^{2}+y^{2}}}.}

Analogous to above, the complex sign function extracts the complex sign of a complex number by mapping the set of non-zero complex numbers to the set of unimodular complex numbers, and 0 to 0: { z ∈ C : | z | = 1 } ∪ { 0 } . {\displaystyle \{z\in \mathbb {C} :|z|=1\}\cup \{0\}.} It may be defined as follows:

Let z be also expressed by its magnitude and one of its arguments Ο† as z = |z|β‹…eiΟ†, then[3] sgn ⁡ ( z ) = { 0 for  z = 0 z | z | = e i φ otherwise . {\displaystyle \operatorname {sgn}(z)={\begin{cases}0&{\text{for }}z=0\\{\dfrac {z}{|z|}}=e^{i\varphi }&{\text{otherwise}}.\end{cases}}}

This definition may also be recognized as a normalized vector, that is, a vector whose direction is unchanged, and whose length is fixed to unity. If the original value was R,ΞΈ in polar form, then sign(R, ΞΈ) is 1 ΞΈ. Extension of sign() or signum() to any number of dimensions is obvious, but this has already been defined as normalizing a vector.

Signs per convention

In situations where there are exactly two possibilities on equal footing for an attribute, these are often labelled by convention as plus and minus, respectively. In some contexts, the choice of this assignment (i.e., which range of values is considered positive and which negative) is natural, whereas in other contexts, the choice is arbitrary, making an explicit sign convention necessary, the only requirement being consistent use of the convention.

Sign of an angle

Measuring from the x-axis, angles on the unit circle count as positive in the counterclockwise direction, and negative in the clockwise direction.

In many contexts, it is common to associate a sign with the measure of an angle, particularly an oriented angle or an angle of rotation. In such a situation, the sign indicates whether the angle is in the clockwise or counterclockwise direction. Though different conventions can be used, it is common in mathematics to have counterclockwise angles count as positive, and clockwise angles count as negative.[4]

It is also possible to associate a sign to an angle of rotation in three dimensions, assuming that the axis of rotation has been oriented. Specifically, a right-handed rotation around an oriented axis typically counts as positive, while a left-handed rotation counts as negative.

An angle which is the negative of a given angle has an equal arc, but the opposite axis.[5]

Sign of a change

When a quantity x changes over time, the change in the value of x is typically defined by the equation Δ x = x final − x initial . {\displaystyle \Delta x=x_{\text{final}}-x_{\text{initial}}.}

Using this convention, an increase in x counts as positive change, while a decrease of x counts as negative change. In calculus, this same convention is used in the definition of the derivative. As a result, any increasing function has positive derivative, while any decreasing function has negative derivative.

Sign of a direction

When studying one-dimensional displacements and motions in analytic geometry and physics, it is common to label the two possible directions as positive and negative. Because the number line is usually drawn with positive numbers to the right, and negative numbers to the left, a common convention is for motions to the right to be given a positive sign, and for motions to the left to be given a negative sign.

On the Cartesian plane, the rightward and upward directions are usually thought of as positive, with rightward being the positive x-direction, and upward being the positive y-direction. If a displacement vector is separated into its vector components, then the horizontal part will be positive for motion to the right and negative for motion to the left, while the vertical part will be positive for motion upward and negative for motion downward.

Likewise, a negative speed (rate of change of displacement) implies a velocity in the opposite direction, i.e., receding instead of advancing; a special case is the radial speed.

In 3D space, notions related to sign can be found in the two normal orientations and orientability in general.

Signedness in computing

most-significant bit
0 1 1 1 1 1 1 1 = 127
0 1 1 1 1 1 1 0 = 126
0 0 0 0 0 0 1 0 = 2
0 0 0 0 0 0 0 1 = 1
0 0 0 0 0 0 0 0 = 0
1 1 1 1 1 1 1 1 = βˆ’1
1 1 1 1 1 1 1 0 = βˆ’2
1 0 0 0 0 0 0 1 = βˆ’127
1 0 0 0 0 0 0 0 = βˆ’128
Most computers use two's complement to represent the sign of an integer.

In computing, an integer value may be either signed or unsigned, depending on whether the computer is keeping track of a sign for the number. By restricting an integer variable to non-negative values only, one more bit can be used for storing the value of a number. Because of the way integer arithmetic is done within computers, signed number representations usually do not store the sign as a single independent bit, instead using e.g. two's complement.

In contrast, real numbers are stored and manipulated as floating point values. The floating point values are represented using three separate values, mantissa, exponent, and sign. Given this separate sign bit, it is possible to represent both positive and negative zero. Most programming languages normally treat positive zero and negative zero as equivalent values, albeit, they provide means by which the distinction can be detected.

Other meanings

Electric charge may be positive or negative.

In addition to the sign of a real number, the word sign is also used in various related ways throughout mathematics and other sciences:

  • Words up to sign mean that, for a quantity q, it is known that either q = Q or q = βˆ’Q for certain Q. It is often expressed as q = Β±Q. For real numbers, it means that only the absolute value |q| of the quantity is known. For complex numbers and vectors, a quantity known up to sign is a stronger condition than a quantity with known magnitude: aside Q and βˆ’Q, there are many other possible values of q such that |q| = |Q|.
  • The sign of a permutation is defined to be positive if the permutation is even, and negative if the permutation is odd.
  • In graph theory, a signed graph is a graph in which each edge has been marked with a positive or negative sign.
  • In mathematical analysis, a signed measure is a generalization of the concept of measure in which the measure of a set may have positive or negative values.
    • The concept of signed distance is used to convey side, inside or out.
    • The ideas of signed area and signed volume are sometimes used when it is convenient for certain areas or volumes to count as negative. This is particularly true in the theory of determinants. In an (abstract) oriented vector space, each ordered basis for the vector space can be classified as either positively or negatively oriented.
  • In a signed-digit representation, each digit of a number may have a positive or negative sign.
  • In physics, any electric charge comes with a sign, either positive or negative. By convention, a positive charge is a charge with the same sign as that of a proton, and a negative charge is a charge with the same sign as that of an electron.

See also

References

  1. ^ a b c Weisstein, Eric W. "Sign". mathworld.wolfram.com. Retrieved 2020-08-26.
  2. ^ a b Bourbaki, Nicolas. Γ‰lΓ©ments de mathΓ©matique: AlgΓ¨bre. p. A VI.4..
  3. ^ "SignumFunction". www.cs.cas.cz. Retrieved 2020-08-26.
  4. ^ "Sign of Angles | What is An Angle? | Positive Angle | Negative Angle". Math Only Math. Retrieved 2020-08-26.
  5. ^ Alexander Macfarlane (1894) "Fundamental theorems of analysis generalized for space", page 3, link via Internet Archive