In mathematics, Pythagorean addition is a binary operation on the real numbers that computes the length of the hypotenuse of a right triangle, given its two sides. Like the more familiar addition and multiplication operations of arithmetic, it is both associative and commutative. This operation can be used in the conversion of Cartesian coordinates to polar coordinates, and in the calculation of Euclidean distance. It also provides a simple notation and terminology for the diameter of a cuboid, the energy-momentum relation in physics, and the overall noise from independent sources of noise. In its applications to signal processing and propagation of measurement uncertainty, the same operation is also called addition in quadrature. A scaled version of this operation gives the quadratic mean or root mean square. It is available in many programming libraries as the hypot function (short for hypotenuse), implemented in a way designed to avoid errors arising due to limited-precision calculations performed on computers. Donald Knuth has written that "Most of the square root operations in computer programs could probably be avoided if [Pythagorean addition] were more widely available, because people seem to want square roots primarily when they are computing distances." Although the Pythagorean theorem is ancient, its application in computing distances began in the 18th century, and the various names for this operation came into use in the 20th century.
Definition
According to the Pythagorean theorem, for a right triangle with side lengths a {\displaystyle a} and b {\displaystyle b} , the length of the hypotenuse can be calculated as a 2 + b 2 . {\textstyle {\sqrt {a^{2}+b^{2}}}.} This formula defines the Pythagorean addition operation, denoted here as ⊕ {\displaystyle \oplus } : for any two real numbers a {\displaystyle a} and b {\displaystyle b} , the result of this operation is defined to be a ⊕ b = a 2 + b 2 ) . {\displaystyle a\oplus b={\sqrt {a^{2}+b^{2}{\vphantom {)}}}}.}
For instance, the special right triangle based on the Pythagorean triple ( 3 , 4 , 5 ) {\displaystyle (3,4,5)} gives 3 ⊕ 4 = 5 {\displaystyle 3\oplus 4=5} . However, the integer result of this example is unusual: for other integer arguments, Pythagorean addition can produce a quadratic irrational number as its result.
Properties The operation ⊕ {\displaystyle \oplus } is associative and commutative. Therefore, if three or more numbers are to be combined with this operation, the order of combination makes no difference to the result, which can be expressed without need of parenthesization as
x 1 ⊕ x 2 ⊕ ⋯ ⊕ x n = x 1 2 + x 2 2 + ⋯ + x n 2 . {\displaystyle x_{1}\oplus x_{2}\oplus \cdots \oplus x_{n}={\sqrt {x_{1}^{2}+x_{2}^{2}+\cdots +x_{n}^{2}}}.}
Additionally, on the non-negative real numbers, zero is an identity element for Pythagorean addition. On numbers that can be negative, the Pythagorean sum with zero gives the absolute value: x ⊕ 0 = | x | . {\displaystyle x\oplus 0=|x|.} The three properties of associativity, commutativity, and having an identity element (on the non-negative numbers) are the defining properties of a commutative monoid.
Applications
Distance and diameter
… excerpt ends here. Continue reading the full article.




