In mathematics, the square root of a non-negative real number x is that non-negative real number which, when multiplied by itself, gives x. The square root of x is denoted by √x. For example, √16 = 4 since 4 × 4 = 16, and √2 = 1.41421... . Square roots are important when solving quadratic equations. Trying to extend the square root function to the negative numbers leads to imaginary numbers and eventually to the field of complex numbers.
The square root symbol was first used during the 16th Century. It has been suggested that it originated as an altered form of lowercase r, representing the Latin "radix" (meaning "root").
Properties
The square root function generally maps rational numbers to algebraic numbers; √x is rational if and only if x is a rational number which, after cancelling, is a fraction of two perfect squares. In particular, √2 is irrational.The square root function also maps the area of a square to its side length.
Suppose that x and a are reals, and that x^{2}=a, and we want to find x. A common mistake is to "take the square root" and deduce that x = √a. This is incorrect, because the square root of x^{2} is not x, but the absolute value |x|, one of our above rules. Thus, all we can conclude is that |x| = √a, or equivalently x = ±√a.
In calculus, for instance when proving that the square root function is continuous or differentiable or when computing certain limitss, the following identity often comes handy:
The function f(x) = √x has the following graph:
The function is continuous for all non-negative x, and differentiable for all positive x (it is not differentiable for x=0 since the slope of the tangent there is &infin). Its derivative is given by
Computing square roots
Calculators
Pocket calculatorss typically implement good routines to compute the exponential function and the natural logarithm, and then compute the square root of x using the identityBabylonian method
A commonly used algorithm for approximating √x is known as the "Babylonian method" and is based on Newton's method. It proceeds as follows:- start with an arbitrary positive start value r (the closer to the root the better)
- replace r by the average of r and x/r
- go to 2
This algorithm works equally well in the p-adic numbers, but cannot be used to identify real square roots with p-adic square roots; it is easy, for example, to construct a sequence of rational numbers by this method which converges to +3 in the reals, but to -3 in the 2-adics.
An exact "long-division like" algorithm
This method, while much slower than the Babylonian method, has the advantage that it is exact: if the given number has a rational square root, then the algorithm terminates and produces the correct square root after finitely many steps. It can thus be used to check whether a given integer is a square number.Write the number in decimal and divide it into pairs of digits starting from the decimal point. The numbers are laid out similar to the long division algorithm and the final square root will appear above the original number.
For each iteration:
- Bring down the most significant pair of digits not yet used and append them to any remainder. This is the current value referred to in steps 2 and 3.
- If denotes the part of the result found so far, determine the greatest digit that does not make exceed the current value. Place the new digit on the quotient line.
- Subtract from the current value to form a new remainder.
- If the remainder is zero and there are no more digits to bring down the algorithm has terminated. Otherwise continue with step 1.
____1__2._3__4_ | 01 52.27 56 1 x 01 1*1=1 1 ____ __ 00 52 22 2x 00 44 22*2=44 2 _______ ___ 08 27 243 24x 07 29 243*3=729 3 _______ ____ 98 56 2464 246x 98 56 2464*4=9856 4 _______ 00 00 Algorithm terminates: answer is 12.34Although demonstrated here for base 10 numbers, the procedure works for any base, including base 2. In the description above, 20 means double the number base used, in the case of binary this would really be 100. The algorithm is in fact much easier to perform in base 2, as in every step only the two digits 0 and 1 have to be tested. See Shifting nth-root algorithm.
Pell's equation
Pell's equation yields a method for finding rational approximations of square roots of integers.Continued fraction methods
Quadratic irrationals, that is numbers involving square roots in the form (a+√b)/c, have periodic continued fractions. This makes them easy to calculate recursively given the period. For example, to calculate √2, we make use of the fact that √2-1 = [0;2,2,2,2,2,...], and use the recurrence relation- a_{n+1}=1/(2+a_{n}) with a_{0}=0
Square roots of complex numbers
To every non-zero complex number z there exist precisely two numbers w such that w^{2} = z. The usual definition of √z is as follows: if z = r exp(iφ) is represented in polar coordinates with -π < φ ≤ π, then we set √z = √r exp(iφ/2). Thus defined, the square root function is holomorphic everywhere except on the non-positive real numbers (where it isn't even continuous). The above Taylor series for √(1+x) remains valid for complex numbers x with |x| < 1.
When the number is in rectangular form the following formula can be used:
Note that because of the discontinuous nature of the square root function in the complex plane, the law √(zw) = √(z)√(w) is in general not true. Wrongly assuming this law underlies several faulty "proofs", for instance the following one showing that -1 = 1:
However the law can only be wrong up to a factor -1, √(zw) = ±√(z)√(w), is true for either ± as + or as - (but not both at the same time). Note that √(c^{2}) = ±c, therefore √(a^{2}b^{2}) = ±ab and therefore √(zw) = ±√(z)√(w), using a = √(z) and b = √(w).
Square roots of matrices and operators
If A is a positive definite matrix or operator, then there exists precisely one positive definite matrix or operator B with B^{2} = A; we then define √A = B.
More generally, to every normal matrix or operator A there exist normal operators B such that B^{2} = A. In general, there are several such operators B for every A and the square root function cannot be defined for normal operators in a satisfactory manner. Positive definite operators are akin to positive real numbers, and normal operators are akin to complex numbers.