Recently I was solving a math problem and I came across the following ( Only part of the problem ):

$$\sqrt{3 - \sqrt{8}}$$

Here's is what I did to simplify the above:

$$(a-b)^2=a^2+b^2-2ab$$ $$\sqrt{1+2-2\sqrt{2}}$$ $$\sqrt{(1-\sqrt{2})^2}$$ $$=1-\sqrt{2}$$

When you expand $(1-\sqrt{2})^2$ you do get $3 - \sqrt{8}$. However, I found that upon the expansion of $(\sqrt{2}-1)^2$ I also arrive at the same answer as before $3 - \sqrt{8}$.

Yet the in the solution of the problem I was doing it required me to use the latter $(\sqrt{2}-1)^2$ to find the correct answer. $(1-\sqrt{2})^2$ did not help to solve the problem. Why is this the case? Why does the latter only hold true?

I suspect this might have something to do with the square root function only returning a positive value. Might this be the case? If so, could someone explain why a square root function can only return a positive value. My working above seems to give a negative answer ( As $\sqrt{2}>1 )$ in the square root function, but I can't seem to find what I'm doing wrong.

  • 4
    $\begingroup$ If $x$ is a real number, $\sqrt{x^2} = |x|$. In particular, $\sqrt{(1 - \sqrt{2})^2} = |1 - \sqrt{2}| = \sqrt{2} - 1$. $\endgroup$
    – kobe
    Feb 6, 2023 at 2:02
  • $\begingroup$ Why is it defined to be like this? Also is there some general method to find the absolute value? How do we work this out |1−√2|=√2-1 ? $\endgroup$ Feb 6, 2023 at 2:40
  • $\begingroup$ Definition of absolute value.$$1<2\implies\sqrt1=1<\sqrt2\implies|1-\sqrt2|=-(1-\sqrt2)=\sqrt2-1$$ $\endgroup$
    – user170231
    Feb 6, 2023 at 2:46
  • 4
    $\begingroup$ It can be confusing: in English, you might hear it said that $5$ is the square root of $25$, but $-5$ is a square root of $25$. To a non-native speaker, it is not immediately obvious what the difference is. But when the symbolic form $\sqrt{25}$ is used, it means, by definition, the non-negative square root of $25$. So $x^2$ is equal to the absolute value $|x|$ of $x$. Hence $\sqrt{3 - \sqrt{8}}=|1-\sqrt 2|=\sqrt 2-1$. $\endgroup$
    – TonyK
    Feb 6, 2023 at 15:44
  • 1
    $\begingroup$ @HaowenXie it's defined like this to avoid confusion, so if you want to refer to the negative root, you write $-\sqrt a$ or if you want to refer to them at once, you write $\pm \sqrt a$. Suppose you're solving an equation to find the number of students in a class, and you end up with, say $\sqrt{484}$. You're not going to say there are $-22$ students, right? The positive square root is required most of the time, like for calculating distance, the magnitude of vectors, sides of triangles, etc. so to avoid confusion, the square-root function is defined that way. $\endgroup$
    – D S
    Feb 10, 2023 at 5:26

2 Answers 2



I found that upon the expansion of $(\sqrt{2}-1)^2$ I also arrive at the same

This is not surprising, since $$(-a)^2=(-1)^2\times a^2=a^2.$$

$$\sqrt{3 - \sqrt{8}}$$ $$=\sqrt{(1-\sqrt{2})^2}\\\color{red}{=1-\sqrt2}$$ it required me to use $(\sqrt{2}-1)^2$ to find the correct answer. $(1-\sqrt{2})^2$ did not help, seems to give a negative answer

Not true: the second line that I quoted above is perfectly fine, however, you can replace that erroneous final line with $$=\sqrt{(1-\sqrt{2})^2}\\=\sqrt{(\sqrt{2}-1)^2}\\=\sqrt{2}-1.$$ Here, you were falsely believing that $\color{red}{\text{regardless of whether $a$ is negative or nonnegative, $\sqrt{a^2}=a$}}.$ But $$\sqrt{(-5)^2}=\sqrt{25}=5\ne-5.$$

If so, could someone explain why a square root function can only return a positive value.

We've established that $\sqrt{\quad}$ is never negative. It is always just a nonnegative value because it means "the nonnegative square root" instead of "the square roots". This is because the $n$th-root (surd) symbol $\sqrt[n]{\quad}$ is defined to mean "the principal $n$th root" instead of "the $n$th roots".

This is just to avoid the untidiness of dealing with multiple-valued expressions. If we really need to consider both square roots of $25,$ we can write $\pm\sqrt{25},$ like in the quadratic formula. On the other hand, if we were to let $\sqrt{25}=\pm5,$ then how do we symbolically indicate that we want to pick just the negative (or just the positive) square root?

Summary: $$\pm5\ne\sqrt{(-5)^2}\ne-5,\\\sqrt{a^2}=|a|.$$

In the complex world, principal root has no universal definition and $\sqrt[3] {-1}$ could mean either $e^{i \frac\pi3}$ (smallest nonnegative argument) or $-1$ (real), so it is common to allow surd symbols only inputs from $[0,\infty)$. If you adopt this convention (in which case principal root just means nonnegative root), then $$\sqrt[n]{a^n}\equiv|a|\quad\quad(n\in\mathbb N).$$

  • $\begingroup$ My A was to show the general method find the simplified value, if it exists, mainly for the benefit of other readers. $\endgroup$ Feb 22, 2023 at 6:28
  • $\begingroup$ Hello @DanielWainfleet. What's the context of this out-of-the-blue announcement? -) $\endgroup$
    – ryang
    Feb 22, 2023 at 6:31

We have $\sqrt {3-\sqrt 8 }=\sqrt {3-2\sqrt 2 }.$ We ask whether there exist rational $a,b$ such that that $$3-2\sqrt 2=(a+b\sqrt 2)^2=(a^2+2b^2)+2ab\sqrt 2.$$ Since $a,b\in\Bbb Q$, this requires $$ (\bullet) \quad a^2+2/a^2=3 \land -2ab=2.$$ So $b=-1/a$ from the 2nd equation of $(\bullet).$ So $3=a^2+2b^2=a^2+2/a^2.$

Let $a^2=x.$ Then $3=x+2/x.$ So $x^2-3x+2=0.$ Take the solution $x=1.$ Now if $a=-1$ then $a^2=1=x,$ and with $b=-1/a=1,$ we see that $(\bullet)$ must hold.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .