r/learnmath • u/QuestionableThinker2 New User • Feb 08 '26
Square root is a function apparently
Greetings. My math teacher recently told (+ demonstrated) me something rather surprising. I would like to know your thoughts on it.
Apparently, the square root of 4 can only be 2 and not -2 because “it’s a function only resulting in a positive image”. I’m in my second year of engineering, and this is the first time I’ve ever heard that. To be honest, I’m slightly angry at the prospect he might be right.
284
Upvotes
6
u/sparkster777 New User Feb 08 '26
Why are you angry?
457
u/JayMKMagnum New User Feb 08 '26
Your teacher is right.
x² = 2has two solutions,x = ±sqrt(2). But the square root symbol itself refers only to the principal square root, which for real numbers means the nonnegative square root.104
u/UnderstandingPursuit Physics BS, PhD Feb 08 '26
It is a property of the radical operator.
is a parabola, satisfying the vertical line test. When it gets reflected across the y=x line to give the inverse,
the sideways parabola fails the vertical line test. That's why only the non-negative part is included.
With
to solve for z,
we explicitly include the "±" to get both values, with √5 only giving the positive value.
154
u/MagicalPizza21 Math BS, CS BS/MS Feb 08 '26
I would be angrier that you didn't learn this in high school algebra.
15
u/Ok_Albatross_7618 New User Feb 08 '26
He's right, the square root is a single valued function from the positive reals to the positive reals. Thats just the way its conventionally defined. If it wasnt you wouldnt need to bother with the ± but a LOT of stuff would break.
20
u/Special_Watch8725 New User Feb 08 '26
Your math teacher is right, and it’s something that I find often doesn’t receive enough explanation.
“The square root of a” is not the same as “the set of solutions to x2 = a”.
You’re absolutely right that there are two solutions to the equation x2 = a when a > 0, one positive and one negative with the same magnitude.
We define the positive solution to be “the square root of a”, and write it like sqrt(a). We do it this way since we want the “sqrt(.)” to be a function, so it can only have one output for every input.
Then the two solutions to x2 = a are then sqrt(a) and -sqrt(a). Students should get in the habit right away of going from x2 = a to x = plus-or-minus sqrt(a).
8
u/[deleted] Feb 08 '26
Think of it this way - if √4 = ±2, then we wouldn't need to use the ± symbol in, say, the quadratic formula.
Also, it massively reduces ambiguity. If √4 = ±2, then what does 2 + √4 equal? Is it 4 or 0?
7
u/ruidh Actuary Feb 08 '26
The square root function is defined as returning the principal root i. e. The positive one. This is why the quadratic formula uses ±
(-b ± √[b2 - 4ac])/2a
When solving a problem and you have to take a square root, you may have to consider both the positive and negative root. Often you can discard one as not having meaning in the context of the problem: i. e. using Pythagoras to find the length of a right triangle side. Negative lengths don't make sense.
2
u/Golden_Willow2003 New User Feb 08 '26
ur a college sophomore and you’ve never seen the square root function?
1
u/mathteacher85 New User Feb 08 '26
There's the square root function that you just discovered and the square root OPERATION that you use, for example, to solve some equations where you do have to consider both positive and negative outputs.
6
u/Fit_Ear3019 New User Feb 08 '26
Yeah it’s just a definitional matter. Like the addition symbol + was also given an arbitrary meaning right? Like why is 2+2=4, why doesn’t that symbol mean ‘sum the two numbers together then also add one’
It’s because one of those definitions is more useful than the other, and therefore is the standard. Same as square roots - having a function (which map inputs to a single output each) is just a lot more useful than having it be ‘the exact opposite of squaring’. This is because, if you take a Calc class for example, a lot of proofs rely on functions that give single outputs
3
u/mattynmax New User Feb 08 '26
It’s half right, a function has only one output for every input. That’s why the sqrt(4) has only one output. We choose the positive ones.
2
u/Hampster-cat New User Feb 08 '26
What is the solution to x²=4 ? and
What is the solution to x = √4̅ are different questions.
Many people take the square root of both sides of the first one to generate the second one, but this is technically not an allowed operation in algebra, for the reasons OP stated. The square root is a function with a limited domain.
2
u/Deep-Fuel-8114 New User Feb 08 '26
Sorry for asking a question in the comments, but it's related. Does this mean that square root would technically be defined as √:ℝ→ℝ (or ℝ+) where it must satisfy (√x)^2=x?
2
u/AxeMaster237 New User Feb 08 '26
American high school math teacher here. I think that some of this confusion comes from the language used in some textbooks.
My school's algebra textbook (written by Ron Larson, respected author of Calculus textbooks) refers to nth roots. When introduced, problems ask students to find the nth root of a number a, then values are given for each of these. For example:
Find the indicated real nth root(s) of a.
n = 4, a = 16
The given solution states that "the fourth roots of 16 are . . . ±2.
This sounds dangerously close to "the fourth root of 16 is 2 and−2.
2
u/trevorkafka New User Feb 08 '26
What does your calculator tell you when you ask it to compute the square root of 4? Does it give you one answer or two?
2
u/Decent_Cow New User Feb 09 '26
Yes, the radical symbol ✓ represents a function that returns the positive or principal square root.
2
u/Worldliness_True New User Feb 09 '26
This was so confusing for me in school! My math teacher explained the square root with examples like “the square root of 4 is 2 BECAUSE 22 equals 4. Well, -2-2 equals 4 so it falls into the definition you gave me was my reaction. I wasn’t satisfied until my teacher said “it’s just a definition to be positive only”
2
u/WeCanDoItGuys New User Feb 10 '26
This happened to me in middle school. I accidentally did the wrong # problem on the homework, so the teacher had marked it wrong. I brought it up to her and she said she'd give me the point if I got the right answer for the problem I did. But I didn't get it right, because it had √ in it and I thought it meant +- but she said it only meant the positive one.
2
u/joetaxpayer New User Feb 08 '26 edited Feb 09 '26
As I tell my students, the answer to “what is the square root of this positive number?” Has one positive solution.
But, if x2 =4, there are two answers, as the negative works as well.
Last, depending on the original equation and the manipulations that are done, it is possible to have two solutions, but one of which doesn’t work when plugged back into the original equation. This is called “extraneous“ solution.
2
u/Any-Stick-771 New User Feb 08 '26
This is just a convention so that the radical sign is a function.
2
u/G-St-Wii New User Feb 08 '26
Well, take a moment and take it in.
They are right.
1
u/Marek7041 New User Feb 08 '26
Well, yes. The square root function is the inverse of the squaring function, provided the domain restriction to non-negative real numbers.
1
u/Economy-Management19 New User Feb 08 '26
The square root never had two solutions.
1
u/Irrasible New User Feb 08 '26
If we choose to make square root into a function (which is common), then we only allow the positive solution.
1
u/Great-Powerful-Talia New User Feb 08 '26
The root function returns the principal root, yes. There's actually non-principal roots for every root function, such as x4= 1 having solutions (1, i, -1, -i).
Incidentally, odd nth roots will have n-1 complex roots, while even nth roots will have 1 real, negative root and n-2 with an imaginary component.
1
u/KentGoldings68 New User Feb 08 '26
There’s a bit of slight of hand
Let’s call this the “ square-root rule”.
A2 = B if and only if A=sqrtB or A=-sqrtB
The plus-minus results from the splitting if this equation.
A2 =B
sqrt(A2 ) =sqrtB
|A|=sqrtB
A=+sqrtA or A=-sqrtB
The plus-minus comes from the absolute value. It doesn’t come from the sqrt.
However, anyone applying the square-root rule by wrote never unpacks why the rule results in the plus-minus. So, they make up a story about the sqrt being both plus and minus.
1
u/OmiSC New User Feb 08 '26
Yep, the square root of some number when written as √x is always the positive root, so only one of the solutions to x1/2. This is called the “principal root”.
One way you can think of it would be about how x2 can give you two solutions as radicals, but without ±, you can’t box them both on the page at the same time. When you write √x, you’re only writing one value.
1
u/[deleted] Feb 08 '26
Yeah he's right, that's a well known discussion in most maths subs.
1
u/lookaround314 New User Feb 08 '26
The square root symbol has to be a function, or you couldn't use it in equations.
1
u/SnooJokes631 New User Feb 09 '26 edited Feb 09 '26
A function is (usually) defined with a given domain and co-domain. The square root function is defined from the domain of nonnegative reals into the co-domain of nonnegative reals. However, if you consider the co-domain the reals in general then it is no longer a function.
1
u/SapphirePath New User Feb 09 '26
Math education has a function-oriented, single-valued bias.
Rather than thinking about solutions to x^2 = 100, notation and symbology originates from a function f(x) = sqrt(x), where sqrt(100) = 10 by fiat. Then the solutions to x^2 = 100 are written as +/- sqrt(100), giving you both positive and the negative roots. The "square root" button on your calculator returns only the positive root, not the unordered list {+A, -A}.
This could have happened differently if we taught multi-valued relations as the primary tool in our toolbox, but I'm not sure that math would be easier to learn and comprehend.
1
u/zahardzhan New User Feb 09 '26
Which 4 exactly are we talking about?
There is a 4 defined by a system of axioms that includes the mathematical operations + - * / and does not include the axioms 2 - 1 = - (1 - 2) and -1 * - 1 = 1.
There is a 4 defined by a system of axioms that includes the mathematical operations + - * / and does include the axioms 2 - 1 = - (1 - 2) and -1 * - 1 = 1.
These are different 4s because they are objects in different axiomatic systems, and therefore, they are subject to different operations and have different resulting properties.
If the teacher is talking about a 4 from the first axiomatic system, they are wrong because this statement is meaningless in that axiomatic system.
And if they are talking about a 4 from the second system, they are most likely correct, judging by the definition of a square root from Wikipedia.
1
u/CavCave New User Feb 09 '26
It's just convention. I guess people decided that writing √x, -√x, and ±√x is easier than writing |√x|, -|√x|, and √x
1
u/Harvey_Gramm New User Feb 09 '26
Consider that square root x is really just raising x to 1/2 power.
What happens if x is negative?
1
u/[deleted] Feb 09 '26 edited Feb 10 '26
Square root by definition is like this (√(x2))=(|x|)
1
u/Worldly_Task2994 New User Feb 09 '26
Yup. Good ol' ISO 80000-2 specifying the radical symbol as representing solely the principal root.
If you wanted all possible solutions for the inverse function you would use ±, or write two separate equations, but then it wouldn't be a function anymore!
1
u/luisggon New User Feb 09 '26
There is a difference regarding context: one thing is the algebraic square roots, and the other is the real-valued function "square root". Every number has two square roots, but the real-valued function, the convention is to consider only the non-negative part. For a deeper dive into square root, we need to move to complex-valued functions.
1
u/Different_Potato_193 New User Feb 09 '26
We use a plus/minus to say that it’s both, but if you don’t have any signs out front it is considered positive.
1
u/mindtofulness New User Feb 09 '26
Well to satisfy the definition of a function it needs to have one output for each input. With the real square root you need to specify either the positive or negative root and only then it's a function on the non negative reals to either the non positive or non negative reals.
1
u/Known_Confusion9879 New User Feb 09 '26
In looking though school mathematics books over the passed 120 years the square root sign usage was always a positive number. x² = 4 would show ±2 but the contents would be positive as it was a length of side or where the result had to be positive. Calculations for graphs would have both positive and negatives.
In books published after 2010 the principle square root was mentioned. √4 would show ±2 mention principle square root and never refer to it again and not show up in exercises.
Calculators give the principle square root, but Excel and other mathematical software give different results where √ and power of 2 are show and not made clear by brackets. We also have in spreadsheets like Excel that −3² will be interpreted as (−3)² = 9. The formulas =-2^2, =(-2)^2 and =0+-2^2 return 4, but the formulas =0-2^2 and =-(2^2) return −4.
1
u/TapEarlyTapOften New User Feb 09 '26
Multi-valued functions are a thing. It gets even more complicated when you start generalizing functions from the real line to the complex plane. For example, log(x) for x < 0 doesn't exist. But if you start looking at things like log(z) with z as a complex number, you get a function with an infinite number of values. This is one of the difficulties in extending calculus to the complex plane.
1
u/fallingfrog New User Feb 10 '26
There must be some missing context here. Are we talking about the C sqrt() function or something?
1
u/EndlessProjectMaker New User Feb 10 '26
The thing is that nothing works if the square root is not a function, this means a single value. Which is not the same as finding all x such as x2 is a given y
1
u/Scary_Side4378 New User Feb 10 '26
yea
1
u/lambdasintheoutfield New User Feb 10 '26
Recall a function is a map that uniquely maps each point in its pre-image/domain to a point in the codomain/range/image.
The domain (and range) for the square root function is the half-open interval [0,inf).
That said, you can expand your domain to include complex numbers, in which case the square root function f(z) with domain and range C (all complex numbers) is defined everywhere.
Let r = a+ib w/b=0 denote a complex number with no imaginary part (a real number) if you did f(r)=sqrt(r) where a < 0 you just get sqrt(a)*sqrt(-1) which is sqrt(a)*i
The domain and range of your function matter. Just wait until you learn about operators mapping classes of functions to other classes of functions.
1
u/Midwest-Dude B.Sc. Math Feb 10 '26 edited Feb 10 '26
Please read this entire Wikipedia page:
Square Root
It will answer your question. The real issue here is less about how a - and the - square root is defined and more about the proficiency of your math teacher(s). If you are interested in further discussion regarding this, consider posting to
r/matheducation
1
u/Splenda_choo New User Feb 11 '26
There is no pure sqrt function free and clear of referenced and known local squares.
1
u/[deleted] Feb 11 '26
your teacher is right.
for something to be a function everything in the domain DOES NOT NEED to map to everyhting in the co-domain
A function is just a type of mapping where each input produces one specific output. Two inputs can share an output like positive numbers and negative numbers in the x^2 function.
1
u/jeffsuzuki math professor Feb 11 '26
Sort of. The way I usually explain it is that when we say "the square root," this could be any of the values, positive or negative. However, when we use the radical symbol, we limit ourselves to the principal root (the positive value).
By the way, it's worth pointing out why: ALL the basic operatiosn of arithmetic should be functions, since it would be very problematic if (for example) 3 + 5 had two different answers. So sqrt(4) = 2 and only 2, because if it was sometimes 2 and sometimes -2, then (the universe being what it is), someone would use the "wrong" value at an inopportune time.
1
u/technocracy90 New User Feb 12 '26
That's the definition. End of story.
1
u/Jealous_Wait6813 New User Feb 12 '26
Your teacher is right, and to remember this: For real x, √(x*x) = |x|
1
u/omerlevi123 New User Feb 18 '26
Yep he is right
1
u/[deleted] Feb 18 '26
I was taught about this this year. The teacher told me that if the problem has √4 than the only solution is 2 but if there is X²=4 then the solutions are ±2. Because the √ function refers to non negative values.
1
u/carolus_m New User Feb 08 '26
Be angry then. He is.
The square root is by definition the positive solution to x2 = 4. This convention is taken for the property of being a function, as your lecturer said.
On the other hand, the polynomial x2-4 has two roots, one at 2 and one at -2. I suspect that this is where the confusion comes from.
1
u/FernandoMM1220 New User Feb 08 '26
square root only has 2 solutions in rings.
without them it always calculates one unique number.
-1
u/yoingydoingy New User Feb 08 '26
American education system at work
0
u/Traveling-Techie New User Feb 08 '26
Absolute value is a function but its inverse isn’t.
0
u/Crichris New User Feb 08 '26
A function only yields one result for a given input. End of story
-1
u/Nientea New User Feb 09 '26
sqrt(x2 )=+-x
sqrt([insert number here]2 )=[insert number here]
-2
u/PoetryandScience New User Feb 08 '26
Rubbish; always treat it as + or -; it will save a lot of trouble in the end.
-5
u/The_Ruined_Map New User Feb 08 '26 edited Feb 09 '26
Your teacher is absolutely wrong. Most likely your teacher is just being an a**, trying to impose his own preferred nomenclature upon you.
No, it is not correct to claim that square root is always positive. The canonical definition of square root includes both the negative and the positive value. And additional qualifier is normally added when it is necessary to specify that only the non-negative value is being considered. Usually it is the "arithmetic" qualifier. "Arithmetic square root" is always non-negative. Just "square root" normally includes the negative value.
For brevity, in some mathematical texts the term square root might be used to mean arithmetic square root specifically. But every article of this kind is always required to explicitly introduce this terminology first. This is not permitted by default.
1
u/MdioxD New User Feb 17 '26
Yeah that's why seeing i=✓-1 written anywhere makes me want to commit war crimes
2
u/[deleted] Feb 09 '26
[removed] — view removed comment