Hi. I only just recently found out about an algorithm for calculating the square roots of a number.(adsbygoogle = window.adsbygoogle || []).push({});

Lets say i want to evaluate [tex]\sqrt {n}[/tex]. I can make an approximation by inspection, and say [tex]\sqrt n \approx \frac{a}{b}[/tex]. Now, using this approximation, i can write:

[tex]

\left[ {\begin{array}{*{20}c}

1 & n \\

1 & 1 \\

\end{array}} \right]\left[ {\begin{array}{*{20}c}

a \\

b \\

\end{array}} \right] = \left[ {\begin{array}{*{20}c}

{a + bn} \\

{a + b} \\

\end{array}} \right]

[/tex]

Treating the resultant matrix as a fraction ([tex]

\frac{{a + bn}}{{a + b}}

[/tex]

), i have a better approximation of [tex]\sqrt {n}[/tex]. If i keep repeating this method with the new approximation, over and over again, i get a more accurate answer. So the next step would be:

[tex]

\left[ {\begin{array}{*{20}c}

1 & n \\

1 & 1 \\

\end{array}} \right]\left[ {\begin{array}{*{20}c}

{a + bn} \\

{a + b} \\

\end{array}} \right] = \left[ {\begin{array}{*{20}c}

{a + an + 2bn} \\

{2a + b + bn} \\

\end{array}} \right]

[/tex]

And [tex]

\frac{{a + an + 2bn}}{{2a + b + bn}}[/tex] would be an even better approximation to [tex]\sqrt {n}[/tex].

Even if the starting approximation is way off, if alot of iterations are complete, the answer will still be accurate.

Im just wondering, why does this method work? Is there a name for this method, or anywhere i can look to find more information?

Thanks,

Dan.

**Physics Forums - The Fusion of Science and Community**

# Calculating Square Roots - Matrix Algorithm

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

- Similar discussions for: Calculating Square Roots - Matrix Algorithm

Loading...

**Physics Forums - The Fusion of Science and Community**