Square root
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.
Properties
The following important properties of the square root functions are valid for all positive real numbers x and y:
- for every real number x (see absolute value)
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.
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 ∞). Its derivative is given by f'(x) = 1/(2√x), which can be verified using the power rule and the first property listed above. Its Taylor series about x = 1 can be found using the binomial theorem:
for |x| < 1.
Square roots in algebra
Let us say that x and a are reals, and that x2=a. A common mistake is to "take the square root" and deduce that x = √a. This is incorrect, because the square root of x2 is not x, but the absolute value |x|, one of our above rules. Thus, all we can conclude is that |x| = √a, or x = ±√a.
Computing
Pell's equation yields a method for finding rational approximations of square roots of integers. Another more commonly used algorithm for approximating √x is based on Newton's method and 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 is a quadratically convergent algorithm, which means that the number of correct digits of r roughly doubles with each step.
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 algorithm
This algorithm is not an approximation. Obviously, if the square root is not rational then the algorithm never terminates.
Although demonstrated here for base 10 numbers, the procedure works for any base, including 2. In the description below, 20 means double the number base used, in the case of binary this would really be 100
Divide the number up into pairs of digits starting from the decimal point and lay the number to be square rooted out in a similar fashion to a long division.
For each iteration:
- Bring down the most significant pair of digits not yet used and append them to any remainder
- Find the greatest number y equal to some digit x times (20 + x) that does not exceed the current value. Place new digit x on the quotient line.
- Subtract this value 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.
Example: What is the sqaure root of 152.2756 (base 10).
____1__2._3__4_ | 01 52.27 56 x 01 1*1=1 ____ 00 52 2x 00 44 22*2=44 _______ 08 27 24x 07 29 243*3=729 _______ 98 56 246x 98 56 2464*4=9856 _______ 00 00 Algorithm terminates
Square roots of complex numbers
To every non-zero complex number z there exist precisely two numbers w such that w2 = 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 remains valid for complex x.
When the number is in rectangular form the following formula can be used:
where the sign of the imaginary part of the root is the same as the sign of the imaginary part of the original number.
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:
The third equality cannot be justified. (See the proof that 1 equals -1.)
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 B2 = A; we then define √A = B.
More generally, to every normal matrix or operator A there exist normal operators B such that B2 = 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.