Math Fundamentals18 sections · 814 units
Open in Course

Square Roots

Inverse of squaring

The square root of xx, written x\sqrt{x}, is the number that gives you xx when squared. So 25=5\sqrt{25} = 5 because 52=255^2 = 25.

Square roots undo squaring. If you square a number and then take its square root, you get back where you started (ignoring sign complications).

In code, you'll use square roots for geometry (distance formulas), number theory (checking primes), and binary search problems. If your loop condition involves i×ini \times i \leq n, you're working with square roots.