You have a square garden with an area of 50 square metres and you want to fence it. How long is each side? You need a number that, multiplied by itself, gives 50. Seven is too small, because 72=497^2 = 49, and eight is far too big, because 82=648^2 = 64. The answer is the square root of 50, written 50\sqrt{50}, and it comes to about 7.0717.071 metres. Check: 7.0712≈49.9997.071^2 \approx 49.999.

That is the whole idea. The square root of a number aa is the non-negative value whose square is aa: 49=7\sqrt{49} = 7 because 7×7=497 \times 7 = 49, and 50≈7.0711\sqrt{50} \approx 7.0711 because that number times itself is 50. The rest of this article covers how to find a square root when the answer is not a whole number, how to simplify square roots, why the square root of 2 cannot be written as a fraction, what happens with negative numbers, and where the radical sign came from.

What does the square root symbol actually mean?

Every positive number has two square roots. Both 7×77 \times 7 and (−7)×(−7)(-7) \times (-7) equal 49, so the equation x2=49x^2 = 49 has two solutions:

x2=49⟹x=7  or  x=−7,written x=±7.x^2 = 49 \quad\Longrightarrow\quad x = 7 \ \text{ or } \ x = -7, \qquad\text{written } x = \pm 7.

The radical sign a\sqrt{\phantom{a}} picks out just one of them, the non-negative one, called the principal square root. So 49=7\sqrt{49} = 7, never −7-7. This is a convention, but an important one: it makes x\sqrt{x} a genuine function, with exactly one output for each input. When you solve an equation and need both roots, you write the ±\pm yourself, which is exactly what the quadratic formula does with its ±b2−4ac\pm\sqrt{b^2 - 4ac} (derived by completing the square).

A consequence that trips people up:

x2=∣x∣,not x.\sqrt{x^2} = \lvert x \rvert, \qquad\text{not } x.

For instance (−3)2=9=3\sqrt{(-3)^2} = \sqrt{9} = 3. Squaring destroys the sign, and the principal root cannot recover it.

The number under the sign is called the radicand, and expressions containing roots are called radicals. Zero has exactly one square root, 0=0\sqrt{0} = 0. Negative numbers have no real square roots at all, a problem we will return to.

Which numbers are perfect squares?

A perfect square is the square of a whole number. These are the numbers whose square roots come out exact, and it pays to know the first twenty by heart:

nn n2n^2 nn n2n^2 nn n2n^2 nn n2n^2
1 1 6 36 11 121 16 256
2 4 7 49 12 144 17 289
3 9 8 64 13 169 18 324
4 16 9 81 14 196 19 361
5 25 10 100 15 225 20 400

The gaps between consecutive perfect squares grow steadily: 1,3,5,7,…1, 3, 5, 7, \dots, because

(n+1)2−n2=2n+1.(n+1)^2 - n^2 = 2n + 1.

So the perfect squares are exactly the running sums of the odd numbers: 11, 1+3=41+3 = 4, 1+3+5=91+3+5 = 9, and so on.

This list is the first tool for estimating any square root. To find 30\sqrt{30}, note that 25<30<3625 < 30 < 36, so 5<30<65 < \sqrt{30} < 6. A better estimate comes from the gap: 30 is 5 above 25, and near x=25x = 25 the square root grows at a rate of about 1/(2⋅5)=0.11/(2 \cdot 5) = 0.1 per unit, so

30≈5+52⋅5=5.5.\sqrt{30} \approx 5 + \frac{5}{2 \cdot 5} = 5.5.

The true value is 5.4772…5.4772\ldots, so the estimate is off by about 0.02. That little correction formula, n2+d≈n+d2n\sqrt{n^2 + d} \approx n + \dfrac{d}{2n}, is the seed of the Babylonian method below. For the garden it gives 50≈7+114≈7.0714\sqrt{50} \approx 7 + \tfrac{1}{14} \approx 7.0714, already correct to three decimal places.

Why does the diagonal of a square have length √2?

Square roots are, at heart, a geometric idea: the side of a square with a given area. The left panel below shows the oldest and most famous example. Draw the diagonal of a unit square, then build a new square on that diagonal. The new square is made of four half-unit triangles, exactly twice the original, so its area is 2 and its side, the diagonal, has length 2\sqrt{2}. The same result follows from the Pythagorean theorem: 12+12=d21^2 + 1^2 = d^2, so d=2d = \sqrt{2}.

The square on the diagonal of a unit square has area 2, and the graph of y equals the square root of xThe square on the diagonal11√2½½½½4 halves = area 2, so side = √2y = √x04812161234(1, 1)(4, 2)(9, 3)(16, 4)Perfect squares give whole-number roots

Left: the tilted square built on the diagonal of a unit square is made of four half-squares, so its area is 2 and its side is √2. Right: the graph of y = √x rises steeply near zero and then flattens; the red points are the perfect squares 1, 4, 9 and 16.

The right panel shows the square root as a function. Its graph is half of a sideways parabola: the curve y=xy = \sqrt{x} is the mirror image of y=x2y = x^2 (for x≥0x \ge 0) in the line y=xy = x. Notice how it flattens out. Going from x=0x = 0 to x=4x = 4 raises yy by 2, but going from x=9x = 9 to x=16x = 16 raises it by only 1.

How do you simplify a square root?

Most square roots never come out whole, but many can be written in a tidier form. The key rule, valid for a,b≥0a, b \ge 0, is

ab=a b,ab=ab(b>0).\sqrt{ab} = \sqrt{a}\,\sqrt{b}, \qquad \sqrt{\frac{a}{b}} = \frac{\sqrt{a}}{\sqrt{b}} \quad (b > 0).

To simplify, find the largest perfect square that divides the radicand and take its root outside:

72=36⋅2=36 2=62≈8.485,\sqrt{72} = \sqrt{36 \cdot 2} = \sqrt{36}\,\sqrt{2} = 6\sqrt{2} \approx 8.485,

48=16⋅3=43≈6.928,200=100⋅2=102≈14.142.\sqrt{48} = \sqrt{16 \cdot 3} = 4\sqrt{3} \approx 6.928, \qquad \sqrt{200} = \sqrt{100 \cdot 2} = 10\sqrt{2} \approx 14.142.

If you cannot spot the largest square factor, break the number into primes and pair them up: 72=23⋅3272 = 2^3 \cdot 3^2, so one pair of 2s and the pair of 3s come out as 2⋅3=62 \cdot 3 = 6, leaving a single 2 inside.

The rule works for multiplication and division, and only those. The most common error in algebra is to assume it works for addition. It does not:

9+16=3+4=7,but9+16=25=5.\sqrt{9} + \sqrt{16} = 3 + 4 = 7, \qquad\text{but}\qquad \sqrt{9 + 16} = \sqrt{25} = 5.

In general a+b<a+b\sqrt{a + b} < \sqrt{a} + \sqrt{b} whenever aa and bb are both positive. Geometrically, that is the triangle inequality: a right triangle with legs 3 and 4 has hypotenuse 5, shorter than the 7 you would walk along the legs.

Rationalising the denominator. By convention, a simplified answer has no square root in the denominator. Multiply the top and bottom by the root:

12=22 2=22≈0.7071,63=633=23.\frac{1}{\sqrt{2}} = \frac{\sqrt{2}}{\sqrt{2}\,\sqrt{2}} = \frac{\sqrt{2}}{2} \approx 0.7071, \qquad \frac{6}{\sqrt{3}} = \frac{6\sqrt{3}}{3} = 2\sqrt{3}.

When the denominator is a sum or difference, multiply by its conjugate, using (a−b)(a+b)=a2−b2(a - b)(a + b) = a^2 - b^2:

13−1=3+1(3−1)(3+1)=3+13−1=3+12≈1.366.\frac{1}{\sqrt{3} - 1} = \frac{\sqrt{3} + 1}{(\sqrt{3} - 1)(\sqrt{3} + 1)} = \frac{\sqrt{3} + 1}{3 - 1} = \frac{\sqrt{3} + 1}{2} \approx 1.366.

The habit dates from hand calculation: halving 1.414211.41421 is easy; dividing 1 by it is not.

How do you calculate a square root by hand?

The fastest hand method is about 4,000 years old. It is usually called the Babylonian method or Heron’s method, after Heron of Alexandria, who used it in his Metrica in the first century CE to find 720≈2656\sqrt{720} \approx 26\tfrac{5}{6}.

The idea: if gg is a guess for a\sqrt{a} that is too large, then a/ga/g is too small, and the other way round, because their product is exactly aa. The true root lies between them, so average the two:

xn+1=12(xn+axn).x_{n+1} = \frac{1}{2}\left(x_n + \frac{a}{x_n}\right).

The garden, 50\sqrt{50}. Start from x0=7x_0 = 7:

Step Value Error
x0x_0 77 −7.1×10−2-7.1 \times 10^{-2}
x1=12(7+507)=9914x_1 = \tfrac12\left(7 + \tfrac{50}{7}\right) = \tfrac{99}{14} 7.0714285714…7.0714285714\ldots 3.6×10−43.6 \times 10^{-4}
x2=196012772x_2 = \tfrac{19601}{2772} 7.0710678211…7.0710678211\ldots 9.2×10−99.2 \times 10^{-9}
x3x_3 7.07106781186547…7.07106781186547\ldots about 6×10−186 \times 10^{-18}

The true value is 50=52=7.0710678118654752…\sqrt{50} = 5\sqrt{2} = 7.0710678118654752\ldots Two steps give eight correct digits; a third step gives about seventeen, more than any pocket calculator displays.

The square root of 2. Start from the crude guess x0=1x_0 = 1 and watch the correct digits:

Step Value Correct digits
x1=3/2x_1 = 3/2 1.51.5 1
x2=17/12x_2 = 17/12 1.41666…1.41666\ldots 3
x3=577/408x_3 = 577/408 1.4142156862…1.4142156862\ldots 6
x4=665857/470832x_4 = 665857/470832 1.4142135623746…1.4142135623746\ldots 12
x5x_5 1.41421356237309504880…1.41421356237309504880\ldots 24

The number of correct digits roughly doubles at every step. The reason is that the Babylonian method is exactly Newton’s method applied to the equation x2−a=0x^2 - a = 0, and Newton’s method converges quadratically near a simple root: each new error is about the square of the old one. The full theory is in that article; here it is enough to notice that from step 2 onward each error is roughly the square of the previous one, divided by 222\sqrt{2}.

Two pleasant facts fall out of the arithmetic of means. First, after the first step every iterate is an overestimate, because the arithmetic mean of gg and a/ga/g is never smaller than their geometric mean, which is a\sqrt{a}. Second, the fractions 3/23/2, 17/1217/12 and 577/408577/408 are all convergents of the continued fraction for 2\sqrt{2}:

2=1+12+12+12+⋯=[1;2,2,2,…].\sqrt{2} = 1 + \cfrac{1}{2 + \cfrac{1}{2 + \cfrac{1}{2 + \cdots}}} = [1; 2, 2, 2, \ldots].

A clay tablet from Babylon. The tablet known as YBC 7289, in the Yale Babylonian Collection and dated to the Old Babylonian period (roughly 1800 to 1600 BCE), shows a square with its diagonals and the number 1;24,51,10 written in base 60. Converting:

1+2460+51602+10603=3054721600=1.41421296…1 + \frac{24}{60} + \frac{51}{60^2} + \frac{10}{60^3} = \frac{30547}{21600} = 1.41421296\ldots

The true value is 1.41421356…1.41421356\ldots, so the tablet is short by about 6.0×10−76.0 \times 10^{-7}. In fact 2×603=305470.13…\sqrt{2} \times 60^3 = 305470.13\ldots, so 1;24,51,10 is the best value possible with three sexagesimal places. How the scribe obtained it is not recorded; an averaging procedure like Heron’s is one plausible route, but it remains a reconstruction.

Is there a digit-by-digit method for square roots?

Before electronic calculators, schoolchildren learned a method laid out like long division that produces one exact digit at a time. It is slower than Heron’s method but never requires dividing by an awkward decimal, and it tells you each digit is final as soon as it appears.

Here it is for 529\sqrt{529}:

  1. Split the number into pairs of digits, working left from the decimal point: 5 and 29.
  2. The largest square not exceeding 5 is 22=42^2 = 4. Write 2 as the first digit. Subtract to get 5−4=15 - 4 = 1 and bring down the next pair: 129.
  3. Double the root so far (2×2=42 \times 2 = 4) and find the largest digit dd with (40+d)×d≤129(40 + d) \times d \le 129. Since 43×3=12943 \times 3 = 129, d=3d = 3. The remainder is 0.

So 529=23\sqrt{529} = 23 exactly. For a number that is not a perfect square, keep bringing down pairs of zeros. For 2\sqrt{2} the steps run: first digit 1 (remainder 1); 24×4=96≤10024 \times 4 = 96 \le 100, digit 4 (remainder 4); 281×1=281≤400281 \times 1 = 281 \le 400, digit 1 (remainder 119); 2824×4=11296≤119002824 \times 4 = 11296 \le 11900, digit 4 (remainder 604); 28282×2=56564≤6040028282 \times 2 = 56564 \le 60400, digit 2. That gives 1.41421.4142, one digit per round.

Why does it work? Each step uses the identity (10r+d)2=100r2+(20r+d) d(10r + d)^2 = 100r^2 + (20r + d)\,d: having found the root rr of the leading pairs, the next digit dd must make (20r+d) d(20r + d)\,d fit into what is left. In binary the method becomes even simpler, since each new digit is 0 or 1 and the test is a single comparison, which is why variants of it are used inside processors.

Is the square root of 2 irrational?

Yes. No fraction of whole numbers equals 2\sqrt{2} exactly, however large the numerator and denominator. The proof is one of the oldest and most elegant in mathematics, and it works by contradiction.

Suppose 2=p/q\sqrt{2} = p/q, where pp and qq are whole numbers with no common factor (any fraction can be reduced to lowest terms). Squaring gives

p2=2q2.p^2 = 2q^2.

So p2p^2 is even. An odd number squared is odd, so pp itself must be even: write p=2kp = 2k. Substituting,

4k2=2q2⟹q2=2k2,4k^2 = 2q^2 \quad\Longrightarrow\quad q^2 = 2k^2,

so q2q^2 is even and qq is even. Now pp and qq are both even, contradicting the assumption that they share no common factor. The assumption was false: 2\sqrt{2} is irrational.

The same idea proves a much broader statement: n\sqrt{n} is irrational for every whole number nn that is not a perfect square. A sketch: if n=p/q\sqrt{n} = p/q, then nq2=p2n q^2 = p^2. In the prime factorisation of a perfect square every prime appears an even number of times. Comparing the exponent of each prime on both sides, nn must also have only even exponents, which means nn is itself a perfect square. So 3\sqrt{3}, 5\sqrt{5}, 50\sqrt{50} and 1000\sqrt{1000} are all irrational, and the garden fence can never be measured exactly in any fraction of a metre.

Square roots like 2\sqrt{2} are irrational but still algebraic, roots of polynomials with integer coefficients (x2−2=0x^2 - 2 = 0). Numbers like π\pi and ee are irrational in a stronger sense; they are transcendental, roots of no such polynomial at all.

The discovery of irrational lengths is usually credited to the Pythagorean school in the fifth century BCE. A famous story says that a Pythagorean named Hippasus of Metapontum revealed the secret and was drowned at sea for it. That tale is a legend: it comes from writers many centuries later, and the ancient sources disagree with one another about what Hippasus did and how he died. What is certain is that by the time of Plato and Euclid, the irrationality of 2\sqrt{2} was standard knowledge.

What is the square root of a negative number?

No real number squared gives a negative result: positive times positive is positive, and negative times negative is positive too. So within the real numbers, −9\sqrt{-9} simply does not exist.

Mathematicians solved the problem by extending the number system. Define a new number ii with the property

i2=−1,so−1=i.i^2 = -1, \qquad\text{so}\qquad \sqrt{-1} = i.

Then every negative number has square roots: for a>0a > 0, −a=ia\sqrt{-a} = i\sqrt{a}. For example,

−9=9 i=3i,check: (3i)2=9i2=−9.\sqrt{-9} = \sqrt{9}\, i = 3i, \qquad\text{check: } (3i)^2 = 9 i^2 = -9.

Numbers of the form a+bia + bi are the complex numbers, and the story of how they went from absurdity to essential tool is told in our article on imaginary numbers.

One trap needs flagging. The tidy product rule a b=ab\sqrt{a}\,\sqrt{b} = \sqrt{ab} is only guaranteed when aa and bb are non-negative. Apply it blindly to negatives and you can “prove” that 1=−11 = -1:

−1=i⋅i=−1 −1=?(−1)(−1)=1=1.-1 = i \cdot i = \sqrt{-1}\,\sqrt{-1} \overset{?}{=} \sqrt{(-1)(-1)} = \sqrt{1} = 1.

The faulty step is the one marked with a question mark. In the complex numbers, square roots cannot be chosen consistently enough for the product rule to survive, so the rule simply stops holding. The safe practice is to rewrite every −a\sqrt{-a} as iai\sqrt{a} before multiplying anything.

Where are square roots used in practice?

Distance. The distance between two points comes straight from the Pythagorean theorem:

d=(x2−x1)2+(y2−y1)2.d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}.

From (1,2)(1, 2) to (4,6)(4, 6) the distance is 32+42=25=5\sqrt{3^2 + 4^2} = \sqrt{25} = 5. GPS receivers, mapping apps, physics engines and machine-learning algorithms that measure similarity all evaluate this formula, in two, three or thousands of dimensions, many millions of times a second.

Statistics. The standard deviation is the square root of the variance. Variance averages squared deviations, which leaves it in squared units; the square root brings the spread back to the units of the data. Relatedly, averaging nn measurements shrinks random error by a factor of n\sqrt{n}.

The fast inverse square root. Games need 1/x1/\sqrt{x} constantly, because normalising a vector vv to unit length means computing v/∥v∥v / \lVert v \rVert, and lighting calculations do this for every surface. In the 1990s, division and square roots were slow. The source code of Quake III Arena (1999), released in 2005, contained a now-famous shortcut. It reinterprets the 32 bits of a floating-point number as an integer ii, computes

i′=0x5F3759DF−(i≫1),i' = \texttt{0x5F3759DF} - (i \gg 1),

and reads the result back as a float. A float’s bit pattern is roughly a scaled, shifted logarithm of the number, so halving and negating it approximates x−1/2x^{-1/2}, with the constant fixing the offset. The result is within about 3.4 percent of 1/x1/\sqrt{x}. One Newton step for the equation 1/y2=x1/y^2 = x,

ynew=y(32−x2 y2),y_{\text{new}} = y\left(\frac{3}{2} - \frac{x}{2}\,y^2\right),

cuts the error to about 0.17 percent, good enough for lighting. The trick predates Quake, going back to graphics work in the late 1980s, though who chose the constant is still disputed. Modern processors have dedicated reciprocal-square-root instructions.

How calculators do it. The IEEE 754 standard for floating-point arithmetic requires square root to be correctly rounded, exactly like addition and multiplication: the answer must be the representable number closest to the true root. Hardware meets it in two broad ways: a binary digit-by-digit recurrence, or a small lookup table followed by a few Newton-style iterations, each doubling the correct bits, and a careful final rounding.

What about cube roots and other nth roots?

A cube root answers the same question for volume: the side of a cube with a given volume. Since 33=273^3 = 27, 273=3\sqrt[3]{27} = 3. Cube roots behave better than square roots with signs: every real number, positive or negative, has exactly one real cube root, so −83=−2\sqrt[3]{-8} = -2 because (−2)3=−8(-2)^3 = -8.

More generally the nnth root an\sqrt[n]{a} is the number whose nnth power is aa; for example 325=2\sqrt[5]{32} = 2. For even nn, negative numbers have no real nnth root, just as with square roots. In the complex numbers every nonzero number has exactly nn distinct nnth roots, spaced evenly around a circle, which is the subject of roots of unity.

Roots fit neatly into the laws of exponents. Since (a1/2)2=a1/2⋅2=a(a^{1/2})^2 = a^{1/2 \cdot 2} = a, the square root is the power one half:

a=a1/2,an=a1/n,amn=am/n.\sqrt{a} = a^{1/2}, \qquad \sqrt[n]{a} = a^{1/n}, \qquad \sqrt[n]{a^m} = a^{m/n}.

So 82/3=(83)2=22=48^{2/3} = (\sqrt[3]{8})^2 = 2^2 = 4. Writing roots as fractional powers turns every root rule into an exponent rule; ab=ab\sqrt{ab} = \sqrt{a}\sqrt{b} is just (ab)1/2=a1/2b1/2(ab)^{1/2} = a^{1/2} b^{1/2}. It also makes calculus easy: the derivative of x1/2x^{1/2} is 12x−1/2=12x\tfrac12 x^{-1/2} = \dfrac{1}{2\sqrt{x}}, the same 1/(2n)1/(2n) factor that powered our estimate of 30\sqrt{30}.

Who invented the square root symbol?

Square roots are much older than the sign we use for them.

Babylon, around 1800 to 1600 BCE. Old Babylonian scribes computed square roots in base 60 and used them in practical geometry. YBC 7289, with its six-digit-accurate value of 2\sqrt{2}, is the most famous witness.

India, first millennium BCE. The Sulba Sutras, manuals for constructing fire altars with precise areas, include a rule for the diagonal of a square. The version in the Baudhayana Sulba Sutra, usually dated somewhere in the range 800 to 500 BCE, amounts to

2≈1+13+13⋅4−13⋅4⋅34=408+136+34−1408=577408=1.4142156…\sqrt{2} \approx 1 + \frac{1}{3} + \frac{1}{3 \cdot 4} - \frac{1}{3 \cdot 4 \cdot 34} = \frac{408 + 136 + 34 - 1}{408} = \frac{577}{408} = 1.4142156\ldots

That is too large by only 2.1×10−62.1 \times 10^{-6}, correct to five decimal places, and it is the very same fraction that the Babylonian method reached in three steps from x0=1x_0 = 1. Without the last term the rule gives 17/12≈1.416717/12 \approx 1.4167; why the authors added the final correction is still debated.

Greece and Alexandria. Greek geometers treated 2\sqrt{2} as a length rather than a number. Heron’s Metrica later wrote out the averaging method explicitly.

The radical sign. For centuries roots were written in words, abbreviations such as R for the Latin radix (“root”), or various local signs. The symbol a\sqrt{\phantom{a}} first appears in print in Die Coss (1525) by the German algebraist Christoff Rudolff, without the horizontal bar. Its origin is uncertain; a popular explanation is that it grew out of a lowercase r for radix, but there is no direct evidence. The overbar, called a vinculum, was attached to the sign by René Descartes in La Géométrie (1637), giving the form we use today.

From a Babylonian tablet to a 32-bit hack, the question has never changed: given an area, find the side. The answer is easy to state, usually impossible to write down exactly, and so central that every calculator and processor has a dedicated way to compute it. And the garden? Its fence needs four sides of 50≈7.071\sqrt{50} \approx 7.071 metres each, about 28.28 metres in all, which is 20220\sqrt{2}.


Related topics: Newton’s Method: How Computers Find Roots, Imaginary Numbers: Why the Square Root of -1 Turned Out to Matter, The Pythagorean Theorem Explained, Continued Fractions: The Hidden Numerical Landscape, Transcendental Numbers: e, π, and What They Aren’t, Why Is It Called Completing the Square?, Binary Numbers: How Binary Works, from Bits to Two’s Complement, Floating-Point Arithmetic Explained, What Is Standard Deviation?

Frequently asked

What is a square root?

The square root of a number a is the value that gives a when multiplied by itself. Since 7 × 7 = 49, the square root of 49 is 7. Every positive number has two square roots, one positive and one negative (7 and −7 for 49), and the radical sign √ always means the positive one, called the principal square root.

How do you find a square root without a calculator?

Use the Babylonian (Heron) method. Guess a value g, divide the number by g, and average the result with g. Repeat. For √50, start at 7: the average of 7 and 50/7 is about 7.0714, already correct to three decimal places, and one more round gives 7.07106782. The digit-by-digit method, set out like long division, is a slower alternative that produces one exact digit at a time.

What are perfect squares?

Perfect squares are the squares of whole numbers: 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225 and so on. Their square roots are whole numbers. Every other positive whole number has an irrational square root, so knowing the perfect squares lets you bracket any root quickly: √50 lies between 7 and 8 because 50 lies between 49 and 64.

How do you simplify a square root?

Find the largest perfect square that divides the number under the radical and pull its root outside, using √(ab) = √a × √b. For example √72 = √(36 × 2) = 6√2, and √48 = √(16 × 3) = 4√3. A square root in a denominator is usually removed by rationalising: 1/√2 = √2/2.

Why is the square root of 2 irrational?

Suppose √2 = p/q as a fraction in lowest terms. Then p² = 2q², so p² is even, which forces p to be even. Writing p = 2k gives 4k² = 2q², so q² = 2k² and q is even too. Both p and q are then even, contradicting lowest terms, so no such fraction exists. The same argument shows √n is irrational whenever n is not a perfect square.

Can you take the square root of a negative number?

Not within the real numbers, because any real number squared is zero or positive. In the complex numbers it is possible: mathematicians define i as a number with i² = −1, so √−9 = 3i. One warning: the rule √a × √b = √(ab) fails for negative numbers, since √−1 × √−1 = i² = −1, not √1 = 1.