Absolute value
Overview

In mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

, the absolute value (or modulus) |a| of a real number
Real number
In mathematics, a real number is a value that represents a quantity along a continuum, such as -5 , 4/3 , 8.6 , √2 and π...

a is the numerical value of a without regard to its sign
Sign (mathematics)
In mathematics, the word sign refers to the property of being positive or negative. Every nonzero real number is either positive or negative, and therefore has a sign. Zero itself is signless, although in some contexts it makes sense to consider a signed zero...

. So, for example, the absolute value of 3 is 3, and the absolute value of -3 is also 3. The absolute value of a number may be thought of as its distance
Distance
Distance is a numerical description of how far apart objects are. In physics or everyday discussion, distance may refer to a physical length, or an estimation based on other criteria . In mathematics, a distance function or metric is a generalization of the concept of physical distance...

from zero.

Generalizations of the absolute value for real numbers occur in a wide variety of mathematical settings.
Encyclopedia
In mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

, the absolute value (or modulus) |a| of a real number
Real number
In mathematics, a real number is a value that represents a quantity along a continuum, such as -5 , 4/3 , 8.6 , √2 and π...

a is the numerical value of a without regard to its sign
Sign (mathematics)
In mathematics, the word sign refers to the property of being positive or negative. Every nonzero real number is either positive or negative, and therefore has a sign. Zero itself is signless, although in some contexts it makes sense to consider a signed zero...

. So, for example, the absolute value of 3 is 3, and the absolute value of -3 is also 3. The absolute value of a number may be thought of as its distance
Distance
Distance is a numerical description of how far apart objects are. In physics or everyday discussion, distance may refer to a physical length, or an estimation based on other criteria . In mathematics, a distance function or metric is a generalization of the concept of physical distance...

from zero.

Generalizations of the absolute value for real numbers occur in a wide variety of mathematical settings. For example an absolute value is also defined for the complex number
Complex number
A complex number is a number consisting of a real part and an imaginary part. Complex numbers extend the idea of the one-dimensional number line to the two-dimensional complex plane by using the number line for the real part and adding a vertical axis to plot the imaginary part...

s, the quaternion
Quaternion
In mathematics, the quaternions are a number system that extends the complex numbers. They were first described by Irish mathematician Sir William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space...

s, ordered ring
Ordered ring
In abstract algebra, an ordered ring is a commutative ring R with a total order ≤ such that for all a, b, and c in R:* if a ≤ b then a + c ≤ b + c.* if 0 ≤ a and 0 ≤ b then 0 ≤ ab....

s, fields
Field (mathematics)
In abstract algebra, a field is a commutative ring whose nonzero elements form a group under multiplication. As such it is an algebraic structure with notions of addition, subtraction, multiplication, and division, satisfying certain axioms...

and vector space
Vector space
A vector space is a mathematical structure formed by a collection of vectors: objects that may be added together and multiplied by numbers, called scalars in this context. Scalars are often taken to be real numbers, but one may also consider vector spaces with scalar multiplication by complex...

s. The absolute value is closely related to the notions of magnitude
Magnitude (mathematics)
The magnitude of an object in mathematics is its size: a property by which it can be compared as larger or smaller than other objects of the same kind; in technical terms, an ordering of the class of objects to which it belongs....

, distance
Distance
Distance is a numerical description of how far apart objects are. In physics or everyday discussion, distance may refer to a physical length, or an estimation based on other criteria . In mathematics, a distance function or metric is a generalization of the concept of physical distance...

, and norm
Norm (mathematics)
In linear algebra, functional analysis and related areas of mathematics, a norm is a function that assigns a strictly positive length or size to all vectors in a vector space, other than the zero vector...

in various mathematical and physical contexts.

Terminology and notation

Jean-Robert Argand
Jean-Robert Argand
Jean-Robert Argand was a gifted amateur mathematician. In 1806, while managing a bookstore in Paris, he published the idea of geometrical interpretation of complex numbers known as the Argand diagram.-Life:...

introduced the term "module" 'unit of measure' in French in 1806 specifically for the complex absolute value and it was borrowed into English in 1866 as the Latin equivalent "modulus". The term "absolute value" has been used in this sense since at least 1806 in French and 1857 in English. The notation | a | was introduced by Karl Weierstrass
Karl Weierstrass
Karl Theodor Wilhelm Weierstrass was a German mathematician who is often cited as the "father of modern analysis".- Biography :Weierstrass was born in Ostenfelde, part of Ennigerloh, Province of Westphalia....

in 1841. Other names for absolute value include "the numerical value" and "the magnitude".

The same notation is used with sets to denote cardinality; the meaning depends on context.

Real numbers

For any real number
Real number
In mathematics, a real number is a value that represents a quantity along a continuum, such as -5 , 4/3 , 8.6 , √2 and π...

a the absolute value or modulus of a is denoted by | a | (a vertical bar
Vertical bar
The vertical bar is a character with various uses in mathematics, where it can be used to represent absolute value, among others; in computing and programming and in general typography, as a divider not unlike the interpunct...

on each side of the quantity) and is defined as

As can be seen from the above definition, the absolute value of a is always either positive or zero
0 (number)
0 is both a numberand the numerical digit used to represent that number in numerals.It fulfills a central role in mathematics as the additive identity of the integers, real numbers, and many other algebraic structures. As a digit, 0 is used as a placeholder in place value systems...

, but never negative.

From an analytic geometry
Analytic geometry
Analytic geometry, or analytical geometry has two different meanings in mathematics. The modern and advanced meaning refers to the geometry of analytic varieties...

point of view, the absolute value of a real number is that number's distance
Distance
Distance is a numerical description of how far apart objects are. In physics or everyday discussion, distance may refer to a physical length, or an estimation based on other criteria . In mathematics, a distance function or metric is a generalization of the concept of physical distance...

from zero along the real number line, and more generally the absolute value of the difference of two real numbers is the distance between them. Indeed the notion of an abstract distance function in mathematics can be seen to be a generalization of the absolute value of the difference (see "Distance" below).

Since the square-root notation without sign represents the positive square root, it follows that

which is sometimes used as a definition of absolute value.

The absolute value has the following four fundamental properties:

Other important properties of the absolute value include:
 SymmetrySymmetrySymmetry generally conveys two primary meanings. The first is an imprecise sense of harmonious or aesthetically pleasing proportionality and balance; such that it reflects beauty or perfection... Identity of indiscerniblesIdentity of indiscerniblesThe identity of indiscernibles is an ontological principle which states that two or more objects or entities are identical if they have all their properties in common. That is, entities x and y are identical if any predicate possessed by x is also possessed by y and vice versa... (equivalent to positive-definiteness) Triangle inequalityTriangle inequalityIn mathematics, the triangle inequality states that for any triangle, the sum of the lengths of any two sides must be greater than or equal to the length of the remaining side .... (equivalent to subadditivity) Preservation of division (equivalent to multiplicativeness) (equivalent to subadditivity)

If b > 0, two other useful properties concerning inequalities are:

These relations may be used to solve inequalities involving absolute values. For example:

Absolute value is used to define the absolute difference
Absolute difference
The absolute difference of two real numbers x, y is given by |x − y|, the absolute value of their difference. It describes the distance on the real line between the points corresponding to x and y...

, the standard metric on the real numbers.

Complex numbers

Since the complex number
Complex number
A complex number is a number consisting of a real part and an imaginary part. Complex numbers extend the idea of the one-dimensional number line to the two-dimensional complex plane by using the number line for the real part and adding a vertical axis to plot the imaginary part...

s are not ordered, the definition given above for the real absolute value cannot be directly generalized for a complex number. However the identity given in equation (1) above:
can be seen as motivating the following definition.

For any complex number

where x and y are real numbers, the absolute value or modulus of z is denoted |z| and is defined as

It follows that the absolute value of a real number x is equal to its absolute value considered as a complex number since:

Similar to the geometric interpretation of the absolute value for real numbers, it follows from the Pythagorean theorem
Pythagorean theorem
In mathematics, the Pythagorean theorem or Pythagoras' theorem is a relation in Euclidean geometry among the three sides of a right triangle...

that the absolute value of a complex number is the distance in the complex plane
Complex plane
In mathematics, the complex plane or z-plane is a geometric representation of the complex numbers established by the real axis and the orthogonal imaginary axis...

of that complex number from the origin
Origin (mathematics)
In mathematics, the origin of a Euclidean space is a special point, usually denoted by the letter O, used as a fixed point of reference for the geometry of the surrounding space. In a Cartesian coordinate system, the origin is the point where the axes of the system intersect...

, and more generally, that the absolute value of the difference of two complex numbers is equal to the distance between those two complex numbers.

The complex absolute value shares all the properties of the real absolute value given in (2)–(10) above. In addition, If

and

is the complex conjugate
Complex conjugate
In mathematics, complex conjugates are a pair of complex numbers, both having the same real part, but with imaginary parts of equal magnitude and opposite signs...

of z, then it is easily seen that

and

with the last formula being the complex analogue of equation (1) mentioned above in the real case.

The absolute square of z is defined as

Since the positive reals form a subgroup of the complex numbers under multiplication, we may think of absolute value as an endomorphism
Endomorphism
In mathematics, an endomorphism is a morphism from a mathematical object to itself. For example, an endomorphism of a vector space V is a linear map ƒ: V → V, and an endomorphism of a group G is a group homomorphism ƒ: G → G. In general, we can talk about...

of the multiplicative group
Multiplicative group
In mathematics and group theory the term multiplicative group refers to one of the following concepts, depending on the context*any group \scriptstyle\mathfrak \,\! whose binary operation is written in multiplicative notation ,*the underlying group under multiplication of the invertible elements of...

of the complex numbers.

Absolute value functions

The real absolute value function is continuous
Continuous function
In mathematics, a continuous function is a function for which, intuitively, "small" changes in the input result in "small" changes in the output. Otherwise, a function is said to be "discontinuous". A continuous function with a continuous inverse function is called "bicontinuous".Continuity of...

everywhere. It is differentiable
Derivative
In calculus, a branch of mathematics, the derivative is a measure of how a function changes as its input changes. Loosely speaking, a derivative can be thought of as how much one quantity is changing in response to changes in some other quantity; for example, the derivative of the position of a...

everywhere except for x = 0. It is monotonically decreasing
Monotonic function
In mathematics, a monotonic function is a function that preserves the given order. This concept first arose in calculus, and was later generalized to the more abstract setting of order theory....

on the interval (−∞, 0] and monotonically increasing on the interval [0, ∞). Since a real number and its negative have the same absolute value, it is an even function, and is hence not invertible.

Both the real and complex functions are idempotent.

It is a nonlinear function.

It is also a convex
Convex function
In mathematics, a real-valued function f defined on an interval is called convex if the graph of the function lies below the line segment joining any two points of the graph. Equivalently, a function is convex if its epigraph is a convex set...

function.

Derivatives

The derivative
Derivative
In calculus, a branch of mathematics, the derivative is a measure of how a function changes as its input changes. Loosely speaking, a derivative can be thought of as how much one quantity is changing in response to changes in some other quantity; for example, the derivative of the position of a...

of the real absolute value function is given by

for x ≠ 0 (cf. signum function). The absolute value function is not differentiable at x = 0. For applications in which a well-defined derivative may be needed, however, the subderivative
Subderivative
In mathematics, the concepts of subderivative, subgradient, and subdifferential arise in convex analysis, that is, in the study of convex functions, often in connection to convex optimization....

is well defined at zero.

The complex
Complex number
A complex number is a number consisting of a real part and an imaginary part. Complex numbers extend the idea of the one-dimensional number line to the two-dimensional complex plane by using the number line for the real part and adding a vertical axis to plot the imaginary part...

absolute value function is continuous everywhere but complex differentiable nowhere; it violates the Cauchy-Riemann equations
Cauchy-Riemann equations
In mathematics, the Cauchy–Riemann differential equations in complex analysis, named after Augustin Cauchy and Bernhard Riemann, consist of a system of two partial differential equations which must be satisfied if we know that a complex function is complex differentiable...

.

The absolute value function has no concavity at any point, the sign function is constant at all points. Therefore the second derivative of |x| with respect to x is zero everywhere except zero, where it is undefined.

Antiderivative

The absolute value function is also integrable. Its antiderivative
Antiderivative
In calculus, an "anti-derivative", antiderivative, primitive integral or indefinite integralof a function f is a function F whose derivative is equal to f, i.e., F ′ = f...

is

as evidenced by the following (using integration by parts and the fact that x2 = |x|2):

Relationship to other functions

Where the absolute value function of a real number returns a value without respect to its sign, the signum function returns a number's sign without respect to its value. Therefore x = sgn(x)|x|. The real absolute value function is also related to a form of the Heaviside step function
Heaviside step function
The Heaviside step function, or the unit step function, usually denoted by H , is a discontinuous function whose value is zero for negative argument and one for positive argument....

used in signal processing, defined as:

where the value of the Heaviside function at zero is conventional. So for all nonzero points on the real number line,

Distance

The absolute value is closely related to the idea of distance. As noted above, the absolute value of a real or complex number is the distance
Distance
Distance is a numerical description of how far apart objects are. In physics or everyday discussion, distance may refer to a physical length, or an estimation based on other criteria . In mathematics, a distance function or metric is a generalization of the concept of physical distance...

from that number to the origin, along the real number line, for real numbers, or in the complex plane, for complex numbers, and more generally, the absolute value of the difference of two real or complex numbers is the distance between them.

The standard Euclidean distance
Euclidean distance
In mathematics, the Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, and is given by the Pythagorean formula. By using this formula as distance, Euclidean space becomes a metric space...

between two points

and

in Euclidean n-space
Euclidean space
In mathematics, Euclidean space is the Euclidean plane and three-dimensional space of Euclidean geometry, as well as the generalizations of these notions to higher dimensions...

is defined as:

This can be seen to be a generalization of | ab |, since if a and b are real, then by equation (1),

While if

and

are complex numbers, then

The above shows that the "absolute value" distance for the real numbers or the complex numbers, agrees with the standard Euclidean distance they inherit as a result of considering them as the one and two-dimensional Euclidean spaces respectively.

The properties of the absolute value of the difference of two real or complex numbers: non-negativity, identity of indiscernibles, symmetry and the triangle inequality given above, can be seen to motivate the more general notion of a distance function as follows:

A real valued function d on a set X × X is called a distance function (or a metric) on X, if it satisfies the following four axioms:
 Non-negativity Identity of indiscernibles Symmetry Triangle inequality

Ordered rings

The definition of absolute value given for real numbers above can easily be extended to any ordered ring
Ordered ring
In abstract algebra, an ordered ring is a commutative ring R with a total order ≤ such that for all a, b, and c in R:* if a ≤ b then a + c ≤ b + c.* if 0 ≤ a and 0 ≤ b then 0 ≤ ab....

. That is, if a is an element of an ordered ring R, then the absolute value of a, denoted by | a |, is defined to be:

where −a is the additive inverse
In mathematics, the additive inverse, or opposite, of a number a is the number that, when added to a, yields zero.The additive inverse of a is denoted −a....

of a, and 0 is the additive identity element
Identity element
In mathematics, an identity element is a special type of element of a set with respect to a binary operation on that set. It leaves other elements unchanged when combined with them...

.

Fields

The fundamental properties of the absolute value for real numbers given in (2)–(5) above, can be used to generalize the notion of absolute value to an arbitrary field, as follows.

A real-valued function v on a field
Field (mathematics)
In abstract algebra, a field is a commutative ring whose nonzero elements form a group under multiplication. As such it is an algebraic structure with notions of addition, subtraction, multiplication, and division, satisfying certain axioms...

F is called an absolute value
Absolute value (algebra)
In mathematics, an absolute value is a function which measures the "size" of elements in a field or integral domain. More precisely, if D is an integral domain, then an absolute value is any mapping | x | from D to the real numbers R satisfying:* | x | ≥ 0,*...

(also a modulus, magnitude, value, or valuation) if it satisfies the following four axioms:
 Non-negativity Positive-definiteness Multiplicativeness Subadditivity or the triangle inequality

Where 0 denotes the additive identity element
Identity element
In mathematics, an identity element is a special type of element of a set with respect to a binary operation on that set. It leaves other elements unchanged when combined with them...

of F. It follows from positive-definiteness and multiplicativeness that v(1) = 1, where 1 denotes the multiplicative identity element of F. The real and complex absolute values defined above are examples of absolute values for an arbitrary field.

If v is an absolute value on F, then the function d on F × F, defined by d(a, b) = v(ab), is a metric and the following are equivalent:
• d satisfies the ultrametric inequality for all x, y, z in F.

• is bounded
Bounded set
In mathematical analysis and related areas of mathematics, a set is called bounded, if it is, in a certain sense, of finite size. Conversely, a set which is not bounded is called unbounded...

in R.

An absolute value which satisfies any (hence all) of the above conditions is said to be non-Archimedean, otherwise it is said to be Archimedean.

Vector spaces

Again the fundamental properties of the absolute value for real numbers can be used, with a slight modification, to generalize the notion to an arbitrary vector space.

A real-valued function on a vector space
Vector space
A vector space is a mathematical structure formed by a collection of vectors: objects that may be added together and multiplied by numbers, called scalars in this context. Scalars are often taken to be real numbers, but one may also consider vector spaces with scalar multiplication by complex...

V over a field F, represented as ||V||, is called an absolute value (or more usually a norm) if it satisfies the following axioms:

For all a in F, and v, u in V,
 Non-negativity Positive-definiteness Positive homogeneity or positive scalability Subadditivity or the triangle inequality

The norm of a vector is also called its length or magnitude.

In the case of Euclidean space
Euclidean space
In mathematics, Euclidean space is the Euclidean plane and three-dimensional space of Euclidean geometry, as well as the generalizations of these notions to higher dimensions...

Rn, the function defined by

is a norm called the Euclidean norm. When the real numbers R are considered as the one-dimensional vector space R1, the absolute value is a norm
Norm (mathematics)
In linear algebra, functional analysis and related areas of mathematics, a norm is a function that assigns a strictly positive length or size to all vectors in a vector space, other than the zero vector...

, and is the p-norm for any p. In fact the absolute value is the "only" norm on R1, in the sense that, for every norm || · || on R1, || x || = || 1 || · | x |. The complex absolute value is a special case of the norm in an inner product space
Inner product space
In mathematics, an inner product space is a vector space with an additional structure called an inner product. This additional structure associates each pair of vectors in the space with a scalar quantity known as the inner product of the vectors...

. It is identical to the Euclidean norm, if the complex plane
Complex plane
In mathematics, the complex plane or z-plane is a geometric representation of the complex numbers established by the real axis and the orthogonal imaginary axis...

is identified with the Euclidean plane R2.

Smooth approximation

The absolute value function does not have a derivative at x=0. Sometimes, a smooth approximation is required that has to be smooth at x=0. One of such approximations is given by:
where k>0. The approximation improves as k increases. k=10 is good for many practical purposes.