If N is an approximation to , a better approximation can be found by using the Taylor series of the square root function:
According to historian of mathematics D.E. Smith, Aryabhata’s method for finding the square root was first introduced in Europe by Cataneo—in 1546.
In number theory, the integer square root (isqrt) of a non-negative integer n is the non-negative integer m which is the greatest integer less than or equal to the square root of n,
An unknown Babylonian mathematician somehow correctly calculated the square root of 2 to three sexagesimal «digits» after the 1, but it is not known exactly how. The Babylonians knew how to approximate a hypotenuse using
The denominator in the fraction corresponds to the nth root. In the case above the denominator is 2, hence the equation specifies that the square root is to be found. The same identity is used when computing square roots with logarithm tables or slide rules.
- Lucas sequence method
- A two-variable iterative method
- Using bitwise operations
- Algorithm using linear search
- Algorithm using binary search
- Iterative methods for reciprocal square roots
- Video on How To Divide Square Roots
- Examples of Dividing Square Roots
- Practice Dividing Square Roots
- Calculator, Practice Problems, and Answers
- Worst case for convergence
- Notes
- Dividing Square Roots
- Practice Problems
- See Related Pages\(\)
- In Summary…
- About Andymath.com
- Algorithm using Newton’s method
- Domain of computation
- Using only integer division
- Example implementation in C
- Decimal (base 10)
- Binary numeral system (base 2)
- Practice questions: How to divide by a square root
- Fractions and radicals
- Dealing with square roots in the denominator
- Square roots and addition in the denominator
- Summary
- Practice question explanations
- In rings in general
- Fractions and radicals
- About This Article
- Nth roots and polynomial roots
- Dealing with square roots in the denominator
- Reader Success Stories
- Об этой статье
- Things You’ll Need
- Square roots of negative and complex numbers
- Principal square root of a complex number
- In programming languages
- About This Article
- Square roots of matrices and operators
- Practice question explanations
- Negative or complex square
- Square roots of positive integers
- As decimal expansions
- As expansions in other numeral systems
- As periodic continued fractions
- Continued fraction expansion
- Square roots and addition in the denominator
- Properties and uses
- In integral domains, including fields
- Approximations that depend on the floating point representation
- Reciprocal of the square root
- Geometric construction of the square root
Lucas sequence method
the Lucas sequence of the first kind Un(P,Q) is defined by the recurrence relations:
and the characteristic equation of it is:
it has the discriminant and the roots:
so when we want , we can choose and , and then calculate using and for large value of .
The most effective way to calculate and is:
then when :
A two-variable iterative method
The initialization step of this method is
while the iterative steps read
Then, (while ).
The convergence of , and therefore also of , is quadratic.
The proof of the method is rather easy. First, rewrite the iterative definition of as
- .
Then it is straightforward to prove by induction that
This can be used to construct a rational approximation to the square root by beginning with an integer. If is an integer chosen so is close to , and is the difference whose absolute value is minimized, then the first iteration can be written as:
Using the same example as given with the Babylonian method, let Then, the first iteration gives
Likewise the second iteration gives
- The square roots of the perfect squares (e.g., 0, 1, 4, 9, 16) are integers. In all other cases, the square roots of positive integers are irrational numbers.
- It is no surprise that the repeated multiplication by is a feature in Jarvis (2006)
- The fractional part of square roots of perfect squares is rendered as .
- see ‘Methods of computing square roots‘.
- LispWorks Ltd 1996.
- Python Software Foundation 2001.
Notation for the (principal) square root of .
For example, = 5, since 25 = 5 ⋅ 5, or (5 squared).
Square roots of negative numbers can be discussed within the framework of complex numbers. More generally, square roots can be considered in any context in which a notion of the «square» of a mathematical object is defined. These include function spaces and square matrices, among other mathematical structures.
- Многие калькуляторы умеют работать с дробями. Введите число, стоящее в числителе, нажмите кнопку ввода дробей, а затем введите число, стоящее в знаменателе. Нажмите «=», и калькулятор автоматически упростит (сократит) дробь.
- При работе с квадратными корнями смешанное число лучше преобразовать в неправильную дробь.
- В отличие от сложения и вычитания корней при их делении подкоренные выражения можно не упрощать (за счет полных квадратов); на самом деле зачастую лучше вообще не делать этого.
- Никогда не оставляйте корень в знаменателе дроби – упростите или рационализируйте ее.
- Десятичная дробь и смешанное число перед корнем не ставятся. Преобразуйте их в обыкновенную дробь, а затем упростите полученное выражение.
- Не записывайте десятичную дробь в знаменателе или числителе обыкновенной дроби; в противном случае получится дробь в дроби.
- Если в знаменателе находится сумма или разность двух одночленов, умножьте такой бином на сопряженный ему двучлен, чтобы избавиться от корня в знаменателе.
- In addition to the principal square root, there is a negative square root equal in magnitude but opposite in sign to the principal square root, except for zero, which has double square roots of zero.
- The factors two and six are used because they approximate the geometric means of the lowest and highest possible values with the given number of digits: and .
- The unrounded estimate has maximum absolute error of 2.65 at 100 and maximum relative error of 26.5% at y=1, 10 and 100
- If the number is exactly half way between two squares, like 30.5, guess the higher number which is 6 in this case
- This is incidentally the equation of the tangent line to y=x2 at y=1.
Let and be non-negative integers.
Algorithms that compute do not run forever. They are nevertheless capable of computing up to any desired accuracy .
Choose any and compute .
For example (setting ):
Compare the results with
To compute the (entire) decimal representation of , one can execute an infinite number of times, increasing by a factor at each pass.
Assume that in the next program ( ) the procedure is already defined and — for the sake of the argument — that all variables can hold integers of unlimited magnitude.
// Print sqrt(y), without halting // theoretical example: overflow is ignored // print last digit of result
- Jarvis, Ashley Frazer (2006). «Square roots by subtraction» . Mathematical Spectrum. 37: 119–122.
- LispWorks Ltd (1996). «CLHS: Function SQRT, ISQRT». www.lispworks.com.
- Minsky, Marvin (1967). «9. The Computable Real Numbers». Computation: Finite and Infinite Machines. Prentice-Hall. ISBN 0-13-165563-9. OCLC 0131655639.
- Python Software Foundation (2001). «Mathematical functions». Python Standard Library documentation (since version 3.8)
- Woo, C (June 1985). «Square root by abacus algorithm (archived)». Archived from the original on 2012-03-06.
- «A geometric view of the square root algorithm».
- Dauben, Joseph W. (2007). «Chinese Mathematics I». In Katz, Victor J. (ed.). The Mathematics of Egypt, Mesopotamia, China, India, and Islam. Princeton: Princeton University Press. ISBN 978-0-691-11485-9.
- Gel’fand, Izrael M.; Shen, Alexander (1993). Algebra (3rd ed.). Birkhäuser. p. 120. ISBN 0-8176-3677-3.
- Joseph, George (2000). The Crest of the Peacock. Princeton: Princeton University Press. ISBN 0-691-00659-8.
- Smith, David (1958). History of Mathematics. Vol. 2. New York: Dover Publications. ISBN 978-0-486-20430-7.
- Selin, Helaine (2008), Encyclopaedia of the History of Science, Technology, and Medicine in Non-Western Cultures, Springer, Bibcode:2008ehst.book…..S, ISBN 978-1-4020-4559-2.
Деление квадратных корней приводит к упрощению дроби. Наличие квадратных корней немного усложняет процесс решения, но некоторые правила позволяют работать с дробями относительно легко. Главное помнить, что множители делятся на множители, а подкоренные выражения на подкоренные выражения. Также квадратный корень может стоять в знаменателе.
-
-
-
Разделите подкоренные выражение. Разделите одно число на другое (как обычно), а результат запишите под знаком корня.
-
-
-
- Например:
- Например:
-
-
-
Упростите полученное выражение (если нужно). Иногда в числителе и знаменателе дроби находятся числа, которые можно упростить (сократить). Упростите целые числа, стоящие в числителе и знаменателе, как упрощаете любую дробь.
-
-
- Например, 32 нацело делится на 16, поэтому:
- Например, 32 нацело делится на 16, поэтому:
-
- Например,
.
- Например,
-
The traditional pen-and-paper algorithm for computing the square root is based on working from higher digit places to lower, and as each new digit pick the largest that will still yield a square . If stopping after the one’s place, the result computed will be the integer square root.
Using bitwise operations
If working in base 2, the choice of digit is simplified to that between 0 (the «small candidate») and 1 (the «large candidate»), and digit manipulations can be expressed in terms of binary shift operations. With *
being multiplication, <<
being left shift, and >>
being logical right shift, a recursive algorithm to find the integer square root of any natural number is:
"sqrt works for only non-negative inputs" # Recursive call: "sqrt works for only non-negative inputs" # shift = ceil(log2(n) * 0.5) * 2 = ceil(ffs(n) * 0.5) * 2 # Unroll the bit-setting loop. # Same as result ^ 1 (xor), because the last bit is always 0.
The integer square root of a non-negative integer can be defined as
- y)}» data-class=»mwe-math-fallback-image-inline»>
For example, because 27{\text{ and }}5^{2}\ngtr 27}» data-class=»mwe-math-fallback-image-inline»> .
Algorithm using linear search
// Integer square root // (using linear search, ascending) // initial underestimate, L <= isqrt(y)
// Integer square root // (using linear search, descending) // initial overestimate, isqrt(y) <= R
In the program above (linear search, ascending) one can replace multiplication by addition, using the equivalence
- .
// Integer square root // (linear search, ascending) using addition // (a + 1) ^ 2
Algorithm using binary search
Linear search sequentially checks every value until it hits the smallest where y}» data-class=»mwe-math-fallback-image-inline»> .
// Integer square root (using binary search)
For example, if one computes using binary search, one obtains the sequence
This computation takes 21 iteration steps, whereas linear search (ascending, starting from ) needs steps.
Unlike adding and subtracting radicals, in division, the radicands do not need to be simplified to remove perfect squares before you begin. In fact, it is often better not to do so.
Many calculators have fraction buttons. Try entering the numerator’s coefficient, hitting the fraction button, then entering the denominator’s coefficient. When you hit the = sign, the calculator should rewrite the coefficients into lowest terms.
When working with square roots, improper fractions are better to work with than mixed numbers.
Never leave a radical in the denominator of a fraction, but instead simplify or rationalize it.
Never put or leave a decimal or a mixed number in front of a radical, but instead change either to a fraction and simplify the entire expression.
Never put a decimal into a fraction. That would be a fraction within a fraction.
If your denominator includes any kind of addition or subtraction, then use a conjugate pair method to remove radical from the denominator.
Dividing square roots is essentially simplifying a fraction. Of course, the presence of square roots makes the process a little more complicated, but certain rules allow us to work with fractions in a relatively simple way. The key thing to remember is that you must divide coefficients by coefficients, and radicands by radicands. You can also never have a square root in a denominator.
-
-
- For example:
- For example:
-
-
-
-
-
- For example, since 32 is evenly divisible by 16, you can divide the square roots:
.
- For example, since 32 is evenly divisible by 16, you can divide the square roots:
-
- For example,
.
- For example,
-
Add New Question
How can I divide root 5 by 5?
√5 / 5 cannot be rationalized, simplified, or reduced. All you could do is to divide √5 (2.236) by 5.
How can divide 1 by sqrt*2?
You need to rationalize the denominator, since a denominator cannot have a square root. To do this, multiply the numerator and the denominator by sqrt*2:
1 x sqrt*2 = sqrt*2
sqrt*2 x sqrt*2 = 2.
So it simplifies to sqrt*2/2.How do I divide root3/root3?
Anything (other than zero) divided by itself is 1.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
A lot of students prepping for GMAT Quant, especially those GMAT students away from math for a long time, get lost when trying to divide by a square root. However, dividing by square roots is not something that should intimidate you. With a short refresher course, you’ll be able to divide by square roots in no time. First, consider these three practice questions.
1. In the equation above, x =
2. Triangle ABC is an equilateral triangle with an altitude of 6. What is its area?
3. In the equation above, x =
The second one throws in a little geometry. You may want to review the properties of the 30-60-90 Triangle and the Equilateral Triangle if those are unfamiliar. The first one is just straightforward arithmetic. The third is quite hard. For any of these, it may well be that, even if you did all your multiplication and division correctly, you wound up with an answers of the form — something divided by the square root of something — and you are left wondering: why doesn’t this answer even appear among the answer choices? If this has you befuddled, you have found exactly the right post.
Iterative methods for reciprocal square roots
- Applying Newton’s method to the equation produces a method that converges quadratically using three multiplications per step:
- Another iteration is obtained by Halley’s method, which is the Householder’s method of order two. This converges cubically, but involves five multiplications per iteration:[]
- , and
- .
- If doing fixed-point arithmetic, the multiplication by 3 and division by 8 can implemented using shifts and adds. If using floating-point, Halley’s method can be reduced to four multiplications per iteration by precomputing and adjusting all the other constants to compensate:
- , and
- .
The first way of writing Goldschmidt’s algorithm begins
- (typically using a table lookup)
until is sufficiently close to 1, or a fixed number of iterations. The iterations converge to
- , and
- .
Note that it is possible to omit either and from the computation, and if both are desired then may be used at the end rather than computing it through in each iteration.
A second form, using fused multiply-add operations, begins
- (typically using a table lookup)
until is sufficiently close to 0, or a fixed number of iterations. This converges to
- , and
- .
Square roots of positive numbers are not in general rational numbers, and so cannot be written as a terminating or recurring decimal expression. Therefore in general any attempt to compute a square root expressed in decimal form can only yield an approximation, though a sequence of increasingly accurate approximations can be obtained.
where and 10 are the natural and base-10 logarithms.
as it allows one to adjust the estimate by some amount and measure the square of the adjustment in terms of the original estimate and its square. Furthermore, when is close to 0, because the tangent line to the graph of at , as a function of alone, is . Thus, small adjustments to can be planned out by setting to , or .
- Start with an arbitrary positive start value x. The closer to the square root of a, the fewer the iterations that will be needed to achieve the desired precision.
- Replace x by the average (x + a/x) / 2 between x and a/x.
- Repeat from step 2, using this average as the new value of x.
That is, if an arbitrary guess for is x0, and xn + 1 = (xn + a/xn) / 2, then each xn is an approximation of which is better for large n than for small n. If a is positive, the convergence is quadratic, which means that in approaching the limit, the number of correct digits roughly doubles in each next iteration. If , the convergence is only linear.
Using the identity
The time complexity for computing a square root with n digits of precision is equivalent to that of multiplying two n-digit numbers.
Another useful method for calculating the square root is the shifting nth root algorithm, applied for .
The radicand refers to the number under the radical sign. In the radical below, the radicand is the number ‘5’.
Refresher on an important rule involving dividing square roots:
The rule explained below is a critical part of how we are going to divide square roots so make sure you take a second to brush up on this. (Or learn it for the first time;)
When you divide two square roots you can «put» both the numerator and denominator inside the same square root. Below is an elink 1xample of this rule using numbers.
As you can see the ’23’ and the ‘2’ can be rewritten inside the same radical sign.
Video on How To Divide Square Roots
Examples of Dividing Square Roots
Example 1
Combine square roots under 1 radicand.
Divide (if possible). Since 150 is divisible by 2, we can do this.
Example 2
Combine the square roots under 1 radicand.
Divide the square roots and the rational numbers.
Practice Dividing Square Roots
Directions: Divide the square roots and express your answer insimplest radical form
Problem 1
This problem is like example 1.
Combine square roots under 1 radicand.
Divide (if possible). Since 200 is divisible by 10, we can do this.
Problem 2
This problem is like example 1.
Combine square roots under 1 radicand.
Divide (if possible). Since 140 is divisible by 5, we can do this.
Problem 3
This problem is like example 2.
Combine the square roots under 1 radicand.
Divide the square roots and the rational numbers.
Problem 4
This problem is like example 2.
Combine the square roots under 1 radicand.
Divide the square roots and the rational numbers.
You can multiply square roots, a type of radical expression, just as you might multiply whole numbers. Sometimes square roots have coefficients (an integer in front of the radical sign), but this only adds a step to the multiplication and does not change the process. The trickiest part of multiplying square roots is simplifying the expression to reach your final answer, but even this step is easy if you know your perfect squares.
-
Multiply the coefficients. A coefficient is a number in front of the radical sign. To do this, just ignore the radical sign and radicand, and multiply the two whole numbers. Place their product in front of the first radical sign.
-
-
-
Calculator, Practice Problems, and Answers
Add New Question
We are not allowed to use a calculator, so how do I multiply a whole number by a square root?
When you multiply a whole number by a square root, you just put the two together, with the whole number in front of the square root. For example, 2 * (square root of 3) = 2(square root of 3). If the square root has a whole number in front of it, multiply the whole numbers together. So 2 * 4(square root of 3) = 8(square root of 3).
What is 2 root 3 times root 3?
√3 times √3 equals 3. Two times that is 6.
What is 4 divided by square root of 5?
(4√5)/5. Since radicals are not supposed to be in the denominator, you multiply by √5/√5 to get (4√5)/5.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Always remember your perfect squares because it will make the process much easier!
All terms under the radicand are always positive, so you will not have to worry about sign rules when multiplying radicands.
«Heron’s method» redirects here. For the formula used to find the area of a triangle, see Heron’s formula.
More precisely, if is our initial guess of and is the error in our estimate such that S = (x+ ε)2, then we can expand the binomial
and solve for the error term
- since .
Therefore, we can compensate for the error and update our old estimate as
- Begin with an arbitrary positive starting value (the closer to the actual square root of , the better).
- Let xn + 1 be the average of and (using the arithmetic mean to approximate the geometric mean).
- Repeat step 2 until the desired accuracy is achieved.
It can also be represented as:
This algorithm works equally well in the -adic numbers, but cannot be used to identify real square roots with -adic square roots; one can, for example, construct a sequence of rational numbers by this method that converges to +3 in the reals, but to −3 in the 2-adics.
To calculate , where = 125348, to six significant figures, use the rough estimation method above to get
Therefore, ≈ 354.045.
Semilog graphs comparing the speed of convergence of Heron’s method to find the square root of 100 for different initial guesses. Negative guesses converge to the negative root, positive guesses to the positive root. Note that values closer to the root converge faster, and all approximations are overestimates. In the SVG file, hover over a graph to display its points.
Suppose that x0 > 0 and S > 0. Then for any natural number n, xn > 0. Let the relative error in xn be defined by
- -1}» data-class=»mwe-math-fallback-image-inline»>
Then it can be shown that
And thus that
and consequently that convergence is assured, and quadratic.
Worst case for convergence
- <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/97b965d9c243f4fa62fe825c21a5c171a8e5d8c2" data-alt="{\begin{aligned}S&=1;&x_{0}&=2;&x_{1}&=1.250;&\varepsilon _{1}&=0.250.\\S&=10;&x_{0}&=2;&x_{1}&=3.500;&\varepsilon _{1}&<0.107.\\S&=10;&x_{0}&=6;&x_{1}&=3.833;&\varepsilon _{1}&<0.213.\\S&=100;&x_{0}&=6;&x_{1}&=11.333;&\varepsilon _{1}&
Thus in any case,
- <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5421d029f479921e0c154a095df9a6314eab837a" data-alt="\varepsilon _{2}<2^{-5}
- <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/edfb1c400b6a50ee05f9788500fdb114d6201ec8" data-alt="\varepsilon _{3}<2^{-11}
- <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3bc199c55d6ae1f04351b7b7aae217d0fb9a5b21" data-alt="\varepsilon _{4}<2^{-23}
- <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b3425039f9411fb9109b4174cb04d837dc38fe81" data-alt="\varepsilon _{5}<2^{-47}
- <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d73f882414b129be7dc41538e4ce0d60c51891d7" data-alt="\varepsilon _{6}<2^{-95}
- <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bb09dcdf99c0c344075f8f6097c36fa976be0469" data-alt="\varepsilon _{7}<2^{-191}
- <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ca951a28fe668eb7abc2f3e5af2b968c1689f5c5" data-alt="\varepsilon _{8}<2^{-383}
Rounding errors will slow the convergence. It is recommended to keep at least one extra digit beyond the desired accuracy of the being calculated to minimize round off error.
Andymath.com features free videos, notes, and practice problems with answers! Printable pages make math easy. Are you ready to be a mathmagician?
Notes
Dividing Square Roots
Dividing Square Roots
Practice Problems
\(\textbf{1)}\) \(\displaystyle\frac{\sqrt{45}}{\sqrt{5}}\)
\(\textbf{2)}\) \(\displaystyle\frac{\sqrt{12}}{\sqrt{3}}\)
\(\textbf{3)}\) \(\displaystyle\frac{\sqrt{32}}{\sqrt{2}}\)

\(\textbf{4)}\) \(\displaystyle\frac{\sqrt{8}}{\sqrt{2}}\)
\(\textbf{5)}\) \(\displaystyle\frac{\sqrt{27}}{\sqrt{3}}\)
\(\textbf{6)}\) \(\displaystyle\frac{\sqrt{75}}{\sqrt{3}}\)
\(\textbf{7)}\) \(\displaystyle\frac{\sqrt{72}}{\sqrt{2}}\)
\(\textbf{8)}\) \(\displaystyle\frac{\sqrt{5}}{\sqrt{5}}\)
\(\textbf{9)}\) \(\displaystyle\frac{\sqrt{18}}{\sqrt{2}}\)
\(\textbf{10)}\) \(\displaystyle\frac{\sqrt{300}}{\sqrt{3}}\)
See Related Pages\(\)
\(\bullet\text{ Simplifying Square Roots}\)
\(\,\,\,\,\,\,\,\,\sqrt{32}=4\sqrt{2}…\)
\(\bullet\text{ Multiplying Square Roots}\)
\(\,\,\,\,\,\,\,\, \sqrt{5} \cdot \sqrt{125} …\)
\(\bullet\text{ Adding and Subtracting Square Roots}\)
\(\,\,\,\,\,\,\,\,3\sqrt{2}-7\sqrt{2}…\)
In Summary…
Dividing square roots is a mathematical operation that involves dividing one square root by another. To divide square roots, we first need to write the division as a fraction with a square root in the numerator and denominator, and then we can simplify the fraction by multiplying the numerator and denominator by the square root of the denominator. After this, simplify further, if possible.
About Andymath.com
Topics cover Elementary Math, Middle School, Algebra, Geometry, Algebra 2/Pre-calculus/Trig, Calculus and Probability/Statistics. In the future, I hope to add Physics and Linear Algebra content.
Thank you for visiting. How exciting!
Methods of computing square roots are numerical analysis algorithms for approximating the principal, or non-negative, square root (usually denoted
,
, or
) of a real number. Arithmetically, it means given
, a procedure for finding a number which when multiplied by itself, yields
; algebraically, it means a procedure for finding the non-negative root of the equation
; geometrically, it means given two line segments, a procedure for constructing their geometric mean.
The continued fraction representation of a real number can be used instead of its decimal or binary expansion and this representation has the property that the square root of any rational number (which is not already a perfect square) has a periodic, repeating expansion, similar to how rational numbers have repeating expansions in the decimal notation system.
The method employed depends on what the result is to be used for (i.e. how accurate it has to be), how much effort one is willing to put into the procedure, and what tools are at hand. The methods may be roughly classified as those suitable for mental calculation, those usually requiring at least paper and pencil, and those which are implemented as programs to be executed on a digital electronic computer or other computing device. Algorithms may take into account convergence (how many iterations are required to achieve a specified precision), computational complexity of individual operations (i.e. division) or iterations, and error propagation (the accuracy of the final result).
Procedures for finding square roots (particularly the square root of 2) have been known since at least the period of ancient Babylon in the 17th century BCE. Heron’s method from first century Egypt was the first ascertainable algorithm for computing square root. Modern analytic methods began to be developed after introduction of the Arabic numeral system to western Europe in the early Renaissance. Today, nearly all computing devices have a fast and accurate square root function, either as a programming language construct, a compiler intrinsic or library function, or as a hardware operator, based on one of the described procedures.
Abramowitz, Miltonn; Stegun, Irene A. (1964). Handbook of mathematical functions with formulas, graphs, and mathematical tables. Courier Dover Publications. p. 17. ISBN 978-0-486-61272-0.
Bailey, David; Borwein, Jonathan (2012). «Ancient Indian Square Roots: An Exercise in Forensic Paleo-Mathematics» . American Mathematical Monthly. Vol. 119, no. 8. pp. 646–657. Retrieved .
Campbell-Kelly, Martin (September 2009). «Origin of Computing». Scientific American. 301 (3): 62–69. Bibcode:2009SciAm.301c..62C. doi:10.1038/scientificamerican0909-62. JSTOR 26001527. PMID 19708529.
Cooke, Roger (2008). Classical algebra: its nature, origins, and uses. John Wiley and Sons. p. 59. ISBN 978-0-470-25952-8.
Fowler, David; Robson, Eleanor (1998). «Square Root Approximations in Old Babylonian Mathematics: YBC 7289 in Context» . Historia Mathematica. 25 (4): 376. doi:.
Gower, John C. (1958). «A Note on an Iterative Method for Root Extraction». The Computer Journal. 1 (3): 142–143. doi:.
Guy, Martin; UKC (1985). «Fast integer square root by Mr. Woo’s abacus algorithm (archived)». Archived from the original on 2012-03-06.
Heath, Thomas (1921). A History of Greek Mathematics, Vol. 2. Oxford: Clarendon Press. pp. 323–324.
Lomont, Chris (2003). «Fast Inverse Square Root» .
Markstein, Peter (November 2004). Software Division and Square Root Using Goldschmidt’s Algorithms . 6th Conference on Real Numbers and Computers. Dagstuhl, Germany. CiteSeerX .
Piñeiro, José-Alejandro; Díaz Bruguera, Javier (December 2002). «High-Speed Double-Precision Computationof Reciprocal, Division, Square Root, and Inverse Square Root». IEEE Transactions on Computers. 51 (12): 1377–1388. doi:10.1109/TC.2002.1146704.
Sardina, Manny (2007). «General Method for Extracting Roots using (Folded) Continued Fractions». Surrey (UK).
Simply Curious (5 June 2018). «Bucking down to the Bakhshali manuscript». Simply Curious blog. Retrieved .
Steinarson, Arne; Corbit, Dann; Hendry, Mathew (2003). «Integer Square Root function».
Wilkes, M.V.; Wheeler, D.J.; Gill, S. (1951). The Preparation of Programs for an Electronic Digital Computer. Oxford: Addison-Wesley. pp. 323–324. OCLC 475783493.
Algorithm using Newton’s method
One way of calculating and is to use Heron’s method, which is a special case of Newton’s method, to find a solution for the equation , giving the iterative formula
- 0.}» data-class=»mwe-math-fallback-image-inline»>
The sequence converges quadratically to as .
- <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a73e93eb2b2c425485e6acf476c9f6796e23bb4f" data-alt="{\displaystyle |x_{k+1}-x_{k}|
ensures
in the algorithm above.
In implementations which use number formats that cannot represent all rational numbers exactly (for example, floating point), a stopping constant less than one should be used to protect against roundoff errors.
Domain of computation
Although is irrational for many , the sequence contains only rational terms when is rational. Thus, with this method it is unnecessary to exit the field of rational numbers in order to calculate , a fact which has some theoretical advantages.
Using only integer division
For computing for very large integers n, one can use the quotient of Euclidean division for both of the division operations. This has the advantage of only using integers for each intermediate value, thus making the use of floating point representations of large numbers unnecessary. It is equivalent to using the iterative formula
- 0,\quad x_{0}\in \mathbb {Z} .}» data-class=»mwe-math-fallback-image-inline»>
By using the fact that
one can show that this will reach within a finite number of iterations.
In the original version, one has for , and x_{k+1}}» data-class=»mwe-math-fallback-image-inline»> for {\sqrt {n}}}» data-class=»mwe-math-fallback-image-inline»> .
So in the integer version, one has and x_{k+1}\geq \lfloor x_{k+1}\rfloor }» data-class=»mwe-math-fallback-image-inline»>
until the final solution is reached.
For the final solution , one has and ,
so the stopping criterion is .
However, is not necessarily a fixed point of the above iterative formula. Indeed, it can be shown that is a fixed point if and only if is not a perfect square. If is a perfect square, the sequence ends up in a period-two cycle between and instead of converging.
Example implementation in C
// Square root of integer // Zero yields zero // One yields one // Initial estimate (must be too high) // Bound check
For example, if one computes the integer square root of using the algorithm above, one obtains the sequence
In total 13 iteration steps are needed. Although Heron’s method converges quadratically close to the solution, less than one bit precision per iteration is gained at the beginning. This means that the choice of the initial estimate is critical for the performance of the algorithm.
When a fast computation for the integer part of the binary logarithm or for the bit-length is available (like e.g. std::bit_width
in C++20), one should better start at
- ,
which is the least power of two bigger than . In the example of the integer square root of , , , and the resulting sequence is
- .
In this case only 4 iteration steps are needed.
This is a method to find each digit of the square root in a sequence. This method is based on the binomial theorem and basically an inverse algorithm solving . It is slower than the Babylonian method, but it has several advantages:
- It can be easier for manual calculations.
- Every digit of the root found is known to be correct, i.e., it does not have to be changed later.
- If the square root has an expansion that terminates, the algorithm terminates after the last digit is found. Thus, it can be used to check whether a given integer is a square number.
- The algorithm works for any base, and naturally, the way it proceeds depends on the base chosen.
- Inconveniences are that the algorithm becomes quite unhandleable for higher roots and that it is not allowing inaccurate guesses or inaccurate sub-calculations as they, unlike the self correcting approximations like with Newton’s method, lead to every following digit of the result being wrong. Furthermore this algorithm, even though being efficient enough on paper, is way too expensive for software implementations as the many calculations become larger and larger and load the memory while still only allowing digit by digit progressions leading the algorithm to become slower and slower with every following digit.
Napier’s bones include an aid for the execution of this algorithm. The shifting th root algorithm is a generalization of this method.
First, consider the case of finding the square root of a number , that is the square of a two-digit number , where is the tens digit and is the units digit. Specifically:
Now using the digit-by-digit algorithm, we first determine the value of . is the largest digit such that is less than or equal to from which we removed the two rightmost digits.
In the next iteration, we pair the digits, multiply by 2, and place it in the tenth’s place while we try to figure out what the value of is.
Since this is a simple case where the answer is a perfect square root , the algorithm stops here.
The same idea can be extended to any arbitrary square root computation next. Suppose we are able to find the square root of by expressing it as a sum of n positive numbers such that
- .
By repeatedly applying the basic identity
the right-hand-side term can be expanded as
This expression allows us to find the square root by sequentially guessing the values of s. Suppose that the numbers have already been guessed, then the m-th term of the right-hand-side of above summation is given by where is the approximate square root found so far. Now each new guess should satisfy the recursion
such that for all with initialization When the exact square root has been found; if not, then the sum of s gives a suitable approximation of the square root, with being the approximation error.
For example, in the decimal number system we have
where are place holders and the coefficients . At any m-th stage of the square root calculation, the approximate root found so far, and the summation term are given by
Here since the place value of is an even power of 10, we only need to work with the pair of most significant digits of the remaining term at any m-th stage. The section below codifies this procedure.
Decimal (base 10)
Write the original number in decimal form. The numbers are written similar to the long division algorithm, and, as in long division, the root will be written on the line above. Now separate the digits into pairs, starting from the decimal point and going both left and right. The decimal point of the root will be above the decimal point of the square. One digit of the root will appear above each pair of digits of the square.
- Starting on the left, bring down the most significant (leftmost) pair of digits not yet used (if all the digits have been used, write «00») and write them to the right of the remainder from the previous step (on the first step, there will be no remainder). In other words, multiply the remainder by 100 and add the two digits. This will be the current value c.
- Find p, y and x, as follows:
- Let p be the part of the root found so far, ignoring any decimal point. (For the first step, p = 0.)
- Determine the greatest digit x such that . We will use a new variable y = x(20p + x).
- Note: 20p + x is simply twice p, with the digit x appended to the right.
- Note: x can be found by guessing what c/(20·p) is and doing a trial calculation of y, then adjusting x upward or downward as necessary.
- Place the digit as the next digit of the root, i.e., above the two digits of the square you just brought down. Thus the next p will be the old p times 10 plus x.
- Subtract y from c to form a new remainder.
- If the remainder is zero and there are no more digits to bring down, then the algorithm has terminated. Otherwise go back to step 1 for another iteration.
Find the square root of 152.2756.
1 2. 3 4 / \/ 01 52.27 56 01 1*1 <= 1 < 2*2 x=1 01 y = x*x = 1*1 = 1 00 52 22*2 <= 52 < 23*3 x=2 00 44 y = (20+x)*x = 22*2 = 44 08 27 243*3 <= 827 < 244*4 x=3 07 29 y = (240+x)*x = 243*3 = 729 98 56 2464*4 <= 9856 < 2465*5 x=4 98 56 y = (2460+x)*x = 2464*4 = 9856 00 00 Algorithm terminates: Answer=12.34
Binary numeral system (base 2)
This section uses the formalism from the digit-by-digit calculation section above, with the slight variation that we let , with each or .
We iterate all , from down to , and build up an approximate solution , the sum of all for which we have determined the value.
To determine if equals or , we let . If (i.e. the square of our approximate solution including does not exceed the target square) then , otherwise and .
To avoid squaring in each step, we store the difference and incrementally update it by setting with .
Initially, we set for the largest with .
As an extra optimization, we store and , the two terms of in case that is nonzero, in separate variables , :
and can be efficiently updated in each step:
- , which is the final result returned in the function below.
"sqrt input should be non-negative" // dₙ which starts at the highest power of four <= n // The second-to-top bit is set. // Same as ((unsigned) INT32_MAX + 1) / 2. // if Xₘ₊₁ ≥ Yₘ then aₘ = 2ᵐ // Xₘ = Xₘ₊₁ - Yₘ // cₘ₋₁ = cₘ/2 + dₘ (aₘ is 2ᵐ) // cₘ₋₁ = cₘ/2 (aₘ is 0) // dₘ₋₁ = dₘ/4
A lot of students prepping for GMAT Quant, especially those GMAT students away from math for a long time, get lost when trying to divide by a square root. However, dividing by square roots is not something that should intimidate you. With a short refresher course, you’ll be able to divide by square roots in no time.
Practice questions: How to divide by a square root
First, consider these three practice questions.
1. In the equation above, x =
2. Triangle ABC is an equilateral triangle with an altitude of 6. What is its area?
3. In the equation above, x =
The second one throws in a little geometry. You may want to review the properties of the 30-60-90 Triangle and the Equilateral Triangle if those are unfamiliar. The first one is just straightforward arithmetic. The third is quite hard. For any of these, it may well be that, even if you did all your multiplication and division correctly, you wound up with an answers of the form —something divided by the square root of something—and you are left wondering: why doesn’t this answer even appear among the answer choices? If this has you befuddled, you have found exactly the right post.
Fractions and radicals
When we first met fractions, in our tender prepubescence, both the numerators and denominators were nice easy positive integers. As we now understand, any kind of real number, any number on the entire number line, can appear in the numerator or denominator of a fraction. Among other things, radicals—that is, square-root expressions—can appear in either the numerator or denominator. There’s no particular issue if we have the square-root in a numerator. For example,
is a perfectly good fraction. In fact, those of you who ever took trigonometry might even recognize this special fraction. Suppose, though, we have a square root in the denominator: what then? Let’s take the reciprocal of this fraction.
This is no longer a perfectly good fraction. Mathematically, this is a fraction “in poor taste”, because we are dividing by a square root. This fraction is crying out for some kind of simplification. How do we simplify this?
Dealing with square roots in the denominator
We know that any square root times itself equals a positive integer. Thus, if we multiplied a denominator of the square root of 3 by itself, it would be 3, no longer a radical. The trouble is—we can’t go around multiplying the denominator of fractions by something, leaving the numerator alone, and expect the fraction to maintain its value. BUT, remember the time-honored fraction trick—we can always multiply a fraction by A/A, by something over itself, because the new fraction would equal 1, and multiplying by 1 does not change the value of anything.
Thus, to simplify a fraction with the square root of 3 in the denominator, we multiply by the square root of 3 over the square root of 3!
That last expression is numerically equal to the first expression, but unlike the first, it is now in mathematical “good taste”, because there’s no square root in the denominator. The denominator has been rationalized (that is to say, the fraction is now a rational number).
That pattern of canceling in the simplification process may give you some insight into practice problem #1 above.
Square roots and addition in the denominator
This is the next level of complexity when it comes to dividing by square roots. Suppose we are dividing a number by an expression that involves adding or subtracting a square root. For example, consider this fraction:
This is a fraction in need of rationalization. BUT, if we just multiply the denominator by itself, that WILL NOT eliminate the square root — rather, it will simply create a more complicated expression involving a square root. Instead, we use the difference of two squares formula, = (a + b)(a – b). Factors of the form (a + b) and (a – b) are called conjugates of one another. When we have (number + square root) in the denominator, we create the conjugate of the denominator by changing the addition sign to a subtraction sign, and then multiply both the numerator and the denominator by the conjugate of the denominator. In the example above, the denominator is three minus the square root of two. The conjugate of the denominator would be three plus the square root of two. In order to rationalize the denominator, we multiply both the numerator and denominator by this conjugate.
Notice that the multiplication in the denominator resulted in a “differences of two squares” simplification that cleared the square roots from the denominator. That final term is a fully rationalized and fully simplified version of the original.
Summary
Practice question explanations
1) To solve for x, we will begin by cross-multiplying. Notice that
because, in general, we can multiply and divide through radicals.
Cross-multiplying, we get
You may well have found this and wondered why it’s not listed as an answer. This is numerically equal to the correct answer, but of course, as this post explains, this form is not rationalized. We need to rationalize the denominator.
Answer = (D)
2) We know the height of ABC and we need to find the base. Well, altitude BD divides triangle ABC into two 30-60-90 triangles. From the proportions in a 30-60-90 triangle, we know:
Now, my predilection would be to rationalize the denominator right away.
Now, AB is simplified. We know AB = AC, because the ABC is equilateral, so we have our base.
Answer = (C)
3) We start by dividing by the expression in parentheses to isolate x.
Of course, this form does not appear among the answer choices. Again, we need to rationalize the denominator, and this case is a little trickier because we have addition in the denominator along with the square root. Here we need to find the conjugate of the denominator—changing the plus sign to a minus sign—and then multiply the numerator and denominator by this conjugate. This will result in:
Answer = (A)
In rings in general
Unlike in an integral domain, a square root in an arbitrary (unital) ring need not be unique up to sign. For example, in the ring of integers modulo 8 (which is commutative, but has zero divisors), the element 1 has four distinct square roots: ±1 and ±3.
Another example is provided by the ring of quaternions which has no zero divisors, but is not commutative. Here, the element −1 has infinitely many square roots, including , , and . In fact, the set of square roots of −1 is exactly
A square root of 0 is either 0 or a zero divisor. Thus in rings where zero divisors do not exist, it is uniquely 0. However, rings with zero divisors may have multiple square roots of 0. For example, in any multiple of is a square root of 0.
Fractions and radicals
When we first met fractions, in our tender prepubescence, both the numerators and denominators were nice easy positive integers. As we now understand, any kind of real number, any number on the entire number line, can appear in the numerator or denominator of a fraction. Among other things, radicals —- that is, square-root expressions —- can appear in either the numerator or denominator. There’s no particular issue if we have the square-root in a numerator. For example,
is a perfectly good fraction. In fact, those of you who ever took trigonometry might even recognize this special fraction. Suppose, though, we have a square root in the denominator: what then? Let’s take the reciprocal of this fraction.
This is no longer a perfectly good fraction. Mathematically, this is a fraction “in poor taste”, because we are dividing by a square-root. This fraction is crying out for some kind of simplification. How do we simplify this?
About This Article
To multiply square roots, first multiply the radicands, or the numbers underneath the radical sign. If there are any coefficients in front of the radical sign, multiply them together as well. Finally, if the new radicand can be divided out by a perfect square, factor out this perfect square and simplify it. If you want to learn how to check your answers when you’re finished solving, keep reading the article!
Did this summary help you?
Thanks to all authors for creating a page that has been read 1,431,880 times.
Nth roots and polynomial roots
A cube root of is a number such that ; it is denoted
If is an integer greater than two, a th root of is a number such that ; it is denoted
Given any polynomial , a root of is a number such that p(y) = 0. For example, the th roots of are the roots of the polynomial (in )
Abel–Ruffini theorem states that, in general, the roots of a polynomial of degree five or higher cannot be expressed in terms of th roots.
Dealing with square roots in the denominator
We know that any square root times itself equals a positive integer. Thus, if we multiplied a denominator of the square root of 3 by itself, it would be 3, no longer a radical. The trouble is —- we can’t go around multiplying the denominator of fractions by something, leaving the numerator alone, and expect the fraction to maintain its value. BUT, remember the time-honored fraction trick — we can always multiply a fraction by A/A, by something over itself, because the new fraction would equal 1, and multiplying by 1 does not change the value of anything.
Thus, to simplify a fraction with the square root of 3 in the denominator, we multiply by the square root of 3 over the square root of 3!
That last expression is numerically equal to the first expression, but unlike the first, it is now in mathematical “good taste”, because there’s no square root in the denominator. The denominator has been rationalized (that is to say, the fraction is now a rational number).
That pattern of canceling in the simplification process may give you some insight into practice problem #1 above.
Reader Success Stories
«Very specific examples. Overall taught me more than my math teacher haha!»
Об этой статье
Things You’ll Need
- Pencil
- Paper
- Calculator
Square roots of negative and complex numbers
First leaf of the complex square root
Second leaf of the complex square root
Using the Riemann surface of the square root, it is shown how the two leaves fit together
The square of any positive or negative number is positive, and the square of 0 is 0. Therefore, no negative number can have a real square root. However, it is possible to work with a more inclusive set of numbers, called the complex numbers, that does contain solutions to the square root of a negative number. This is done by introducing a new number, denoted by i (sometimes by j, especially in the context of electricity where «i» traditionally represents electric current) and called the imaginary unit, which is defined such that i2 = −1. Using this notation, we can think of i as the square root of −1, but we also have (−i)2 = i2 = −1 and so −i is also a square root of −1. By convention, the principal square root of −1 is i, or more generally, if x is any nonnegative number, then the principal square root of −x is
The right side (as well as its negative) is indeed a square root of −x, since
For every non-zero complex number z there exist precisely two numbers w such that w2 = z: the principal square root of z (defined below), and its negative.
Principal square root of a complex number
To find a definition for the square root that allows us to consistently choose a single value, called the principal value, we start by observing that any complex number can be viewed as a point in the plane, expressed using Cartesian coordinates. The same point may be reinterpreted using polar coordinates as the pair where is the distance of the point from the origin, and is the angle that the line from the origin to the point makes with the positive real ( ) axis. In complex analysis, the location of this point is conventionally written If
then the principal square root of is defined to be the following:
The principal square root function is thus defined using the nonpositive real axis as a branch cut.
If is a non-negative real number (which happens if and only if ) then the principal square root of is in other words, the principal square root of a non-negative real number is just the usual non-negative square root.
It is important that <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b27eb4930922e649015e37b8d782b6b1ad7d55b9" data-alt="{\displaystyle -\pi because if, for example, (so ) then the principal square root is but using would instead produce the other square root
The principal square root function is holomorphic everywhere except on the set of non-positive real numbers (on strictly negative reals it is not even continuous). The above Taylor series for remains valid for complex numbers with <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c4e657241d23e0514c31745c2d302fffa61a77ed" data-alt="{\displaystyle |x|
The above can also be expressed in terms of trigonometric functions:
where is the sign of (except that, here, sgn(0) = 1). In particular, the imaginary parts of the original number and the principal value of its square root have the same sign. The real part of the principal value of the square root is always nonnegative.
For example, the principal square roots of are given by:
where <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3aeabfa69185eedc1363619bb534927d46eb8aff" data-alt="{\displaystyle -\pi and <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/679df4a1684cbd40b9ff7ac9bbed56bffe6a2903" data-alt="{\displaystyle -\pi .
-
Counterexample for the principal square root: z = −1 and w = −1
This equality is valid only when <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/616dd651f429490e09f3398a52a279be4c00a279" data-alt="{\displaystyle -\pi -
Counterexample for the principal square root: and z = −1
This equality is valid only when <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9fd8739a5027cfcf839f6d2f8105a1e94a115622" data-alt="{\displaystyle -\pi -
Counterexample for the principal square root: z = −1)
This equality is valid only when
A similar problem appears with other complex functions with branch cuts, e.g., the complex logarithm and the relations logz + logw = log(zw) or log(z*) = log(z)* which are not true in general.
if the branch includes +i or
if the branch includes −i, while the right-hand side becomes
where the last equality, is a consequence of the choice of branch in the redefinition of √.
In programming languages
Some programming languages dedicate an explicit operation to the integer square root calculation in addition to the general case or can be extended by libraries to this end.
(isqrt x)
: Common Lisp.[6]math.isqrt(x)
: Python.[7]
About This Article
To divide square roots using radicands, set up the expression as a fraction using one radical sign. If your problem has a square root in the numerator and denominator, you can place both radicands under one radical sign. Then, divide the radicands just as you would whole numbers, making sure to place the radicand quotient under a new radical sign. If the radicand is a perfect square, or if one of its factors is a perfect square, simplify the expression to finalize your answer! To learn how to divide square roots by using coefficients, read on!
Did this summary help you?
Thanks to all authors for creating a page that has been read 639,010 times.
Square roots of matrices and operators
Practice question explanations
1) To solve for x, we will begin by cross-multiplying. Notice that
because, in general, we can multiply and divide through radicals.
Cross-multiplying, we get
You may well have found this and wondered why it’s not listed as an answer. This is numerically equal to the correct answer, but of course, as this post explains, this form is not rationalized. We need to rationalize the denominator.
Answer = (D)
2) We know the height of ABC and we need to find the base. Well, altitude BD divides triangle ABC into two 30-60-90 triangles. From the proportions in a 30-60-90 triangle, we know:
Now, my predilection would be to rationalize the denominator right away.
Now, AB is simplified. We know AB = AC, because the ABC is equilateral, so we have our base.
Answer = (C)
3) We start by dividing by the expression in parentheses to isolate x.
Of course, this form does not appear among the answer choices. Again, we need to rationalize the denominator, and this case is a little trickier because we have addition in the denominator along with the square root. Here we need to find the conjugate of the denominator —- changing the plus sign to a minus sign — and then multiply the numerator and denominator by this conjugate. This will result in —-
Answer = (A)
The post GMAT Math: How to Divide by a Square Root appeared first on Magoosh GMAT Blog.
Negative or complex square
If S < 0, then its principal square root is
If S = a+bi where a and b are real and b ≠ 0, then its principal square root is
is the modulus of S. The principal square root of a complex number is defined to be the root with the non-negative real part.
Square roots of positive integers
A positive number has two square roots, one positive, and one negative, which are opposite to each other. When talking of the square root of a positive integer, it is usually the positive square root that is meant.
The square roots of an integer are algebraic integers—more specifically quadratic integers.
The square root of a positive integer is the product of the roots of its prime factors, because the square root of a product is the product of the square roots of the factors. Since only roots of those primes having an odd power in the factorization are necessary. More precisely, the square root of a prime factorization is
As decimal expansions
As expansions in other numeral systems
As with before, the square roots of the perfect squares (e.g., 0, 1, 4, 9, 16) are integers. In all other cases, the square roots of positive integers are irrational numbers, and therefore have non-repeating digits in any standard positional notation system.
The square roots of small integers are used in both the SHA-1 and SHA-2 hash function designs to provide nothing up my sleeve numbers.
As periodic continued fractions
One of the most intriguing results from the study of irrational numbers as continued fractions was obtained by Joseph Louis Lagrange c.. Lagrange found that the representation of the square root of any non-square positive integer as a continued fraction is periodic. That is, a certain pattern of partial denominators repeats indefinitely in the continued fraction. In a sense these square roots are the very simplest irrational numbers, because they can be represented with a simple repeating pattern of integers.
Continued fraction expansion
Quadratic irrationals (numbers of the form , where a, b and c are integers), and in particular, square roots of integers, have periodic continued fractions. Sometimes what is desired is finding not the numerical value of a square root, but rather its continued fraction expansion, and hence its rational approximation. Let S be the positive number for which we are required to find the square root. Then assuming a to be a number that serves as an initial guess and r to be the remainder term, we can write Since we have , we can express the square root of S as
By applying this expression for to the denominator term of the fraction, we have
For , the value of is 1, so its representation is:
Proceeding this way, we get a generalized continued fraction for the square root as
Step 2 is to reduce the continued fraction from the bottom up, one denominator at a time, to yield a rational fraction whose numerator and denominator are integers. The reduction proceeds thus (taking the first three denominators):
Finally (step 3), divide the numerator by the denominator of the rational fraction to obtain the approximate value of the root:
- rounded to three digits of precision.
The actual value of is 1.41 to three significant digits. The relative error is 0.17%, so the rational fraction is good to almost three digits of precision. Taking more denominators gives successively better approximations: four denominators yields the fraction , good to almost 4 digits of precision, etc.
In general, the larger the denominator of a rational fraction, the better the approximation. It can also be shown that truncating a continued fraction yields a rational fraction that is the best approximation to the root of any fraction with denominator less than or equal to the denominator of that fraction — e.g., no fraction with a denominator less than or equal to 70 is as good an approximation to as 99/70.
Square roots and addition in the denominator
This is the next level of complexity when it comes to dividing by square roots. Suppose we are dividing a number by an expression that involves adding or subtracting a square root. For example, consider this fraction:
This is a fraction in need of rationalization. BUT, if we just multiply the denominator by itself, that WILL NOT eliminate the square root — rather, it will simply create a more complicated expression involving a square root. Instead, we use the difference of two squares formula, = (a + b)(a – b). Factors of the form (a + b) and (a – b) are called conjugates of one another. When we have (number + square root) in the denominator, we create the conjugate of the denominator by changing the addition sign to a subtraction sign, and then multiply both the numerator and the denominator by the conjugate of the denominator. In the example above, the denominator is three minus the square root of two. The conjugate of the denominator would be three plus the square root of two. In order to rationalize the denominator, we multiply both the numerator and denominator by this conjugate.
Notice that the multiplication in the denominator resulted in a “differences of two squares” simplification that cleared the square roots from the denominator. That final term is a fully rationalized and fully simplified version of the original.
Properties and uses
The graph of the function f(x) = √x, made up of half a parabola with a vertical directrix
The principal square root function (usually just referred to as the «square root function») is a function that maps the set of nonnegative real numbers onto itself. In geometrical terms, the square root function maps the area of a square to its side length.
The square root of x is rational if and only if x is a rational number that can be represented as a ratio of two perfect squares. (See square root of 2 for proofs that this is an irrational number, and quadratic irrational for a proof for all non-square natural numbers.) The square root function maps rational numbers into algebraic numbers, the latter being a superset of the rational numbers).
For all real numbers x,
- <span data-src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0640b9c1359d9e56c1047817a6abaeb9d12f0eb9" data-alt="
\sqrt{x^2} = \left|x\right| =
\begin{cases}
x, & \mbox{if }x \ge 0 \\
-x, & \mbox{if }x (see absolute value)
For all nonnegative real numbers x and y,
The square root function is continuous for all nonnegative x, and differentiable for all positive x. If f denotes the square root function, whose derivative is given by:
The square root of a nonnegative number is used in the definition of Euclidean norm (and distance), as well as in generalizations such as Hilbert spaces. It defines an important concept of standard deviation used in probability theory and statistics. It has a major use in the formula for roots of a quadratic equation; quadratic fields and rings of quadratic integers, which are based on square roots, are important in algebra and have uses in geometry. Square roots frequently appear in mathematical formulas elsewhere, as well as in many physical laws.
In integral domains, including fields
Each element of an integral domain has no more than 2 square roots. The difference of two squares identity u2 − v2 = (u − v)(u + v) is proved using the commutativity of multiplication. If and are square roots of the same element, then u2 − v2 = 0. Because there are no zero divisors this implies or u + v = 0, where the latter means that two roots are additive inverses of each other. In other words if an element a square root of an element exists, then the only square roots of are and . The only square root of 0 in an integral domain is 0 itself.
In a field of characteristic 2, an element either has one square root or does not have any at all, because each element is its own additive inverse, so that −u = u. If the field is finite of characteristic 2 then every element has a unique square root. In a field of any other characteristic, any non-zero element either has two square roots, as explained above, or does not have any.
Given an odd prime number , let q = pe for some positive integer . A non-zero element of the field with elements is a quadratic residue if it has a square root in . Otherwise, it is a quadratic non-residue. There are (q − 1)/2 quadratic residues and (q − 1)/2 quadratic non-residues; zero is not counted in either class. The quadratic residues form a group under multiplication. The properties of quadratic residues are widely used in number theory.
Approximations that depend on the floating point representation
A number is represented in a floating point format as which is also called scientific notation. Its square root is and similar formulae would apply for cube roots and logarithms. On the face of it, this is no improvement in simplicity, but suppose that only an approximation is required: then just is good to an order of magnitude. Next, recognise that some powers, , will be odd, thus for 3141.59 = 3.1415910 rather than deal with fractional powers of the base, multiply the mantissa by the base and subtract one from the power to make it even. The adjusted representation will become the equivalent of 31.415910 so that the square root will be 10.
A table with only three entries could be enlarged by incorporating additional bits of the mantissa. However, with computers, rather than calculate an interpolation into a table, it is often better to find some simpler calculation giving equivalent results. Everything now depends on the exact details of the format of the representation, plus what operations are available to access and manipulate the parts of the number. For example, Fortran offers an EXPONENT(x)
function to obtain the power. Effort expended in devising a good initial approximation is to be recouped by thereby avoiding the additional iterations of the refinement process that would have been needed for a poor approximation. Since these are few (one iteration requires a divide, an add, and a halving) the constraint is severe.
So for a 32-bit single precision floating point number in IEEE format (where notably, the power has a bias of 127 added for the represented form) you can get the approximate logarithm by interpreting its binary representation as a 32-bit integer, scaling it by , and removing a bias of 127, i.e.
For example, 1.0 is represented by a hexadecimal number 0x3F800000, which would represent if taken as an integer. Using the formula above you get , as expected from . In a similar fashion you get 0.5 from 1.5 (0x3FC00000).
/* Assumes that float is in the IEEE 754 single precision floating point format */ /* Convert type, preserving bit pattern */ * ((((val.i / 2^m) - b) / 2) + b) * 2^m = ((val.i - 2^m) / 2) + ((b + 1) / 2) * 2^m) * b = exponent bias * m = number of mantissa bits /* Subtract 2^m. */ /* Divide by 2. */ /* Add ((b + 1) / 2) * 2^m. */ /* Interpret again as float */
The three mathematical operations forming the core of the above function can be expressed in a single line. An additional adjustment can be added to reduce the maximum relative error. So, the three operations, not including the cast, can be rewritten as
Reciprocal of the square root
/* The next line can be repeated any number of times to increase accuracy */
Geometric construction of the square root
The square root of a positive number is usually defined as the side length of a square with the area equal to the given number. But the square shape is not necessary for it: if one of two similar planar Euclidean objects has the area a times greater than another, then the ratio of their linear sizes is .
A square root can be constructed with a compass and straightedge. In his Elements, Euclid (fl. 300 BC) gave the construction of the geometric mean of two quantities in two different places: Proposition II.14 and Proposition VI.13. Since the geometric mean of a and b is , one can construct simply by taking .
The construction is also given by Descartes in his La Géométrie, see figure 2 on page 2. However, Descartes made no claim to originality and his audience would have been quite familiar with Euclid.
Euclid’s second proof in Book VI depends on the theory of similar triangles. Let AHB be a line segment of length with AH = a and HB = b. Construct the circle with AB as diameter and let C be one of the two intersections of the perpendicular chord at H with the circle and denote the length CH as h. Then, using Thales’ theorem and, as in the proof of Pythagoras’ theorem by similar triangles, triangle AHC is similar to triangle CHB (as indeed both are to triangle ACB, though we don’t need that, but it is the essence of the proof of Pythagoras’ theorem) so that AH:CH is as HC:HB, i.e. a/h = h/b, from which we conclude by cross-multiplication that h2 = ab, and finally that . When marking the midpoint O of the line segment AB and drawing the radius OC of length (a + b)/2, then clearly OC > CH, i.e. (with equality if and only if ), which is the arithmetic–geometric mean inequality for two variables and, as noted above, is the basis of the Ancient Greek understanding of «Heron’s method».
Another method of geometric construction uses right triangles and induction: can be constructed, and once has been constructed, the right triangle with legs 1 and has a hypotenuse of . Constructing successive square roots in this manner yields the Spiral of Theodorus depicted above.