# Why do we limit the definition of a function? [duplicate]

Why do we limit the definition of a function to only one y per x? For example, the square root function. We only allow the principal square root of a number, rather than, say, the square root of 9 being both 3 AND -3. Why is this?

Thanks!

-

## marked as duplicate by Marc van Leeuwen, John Habert, egreg, mookid, TooToneMar 28 at 15:40

You would be left with a relation. Note that in complex analysis "functions" are multivalued. –  jinawee Mar 27 at 21:08
If it wasn't just one value manipulating them would be much more difficult. You can have relations and parametric functions though that have multiple y per x. Also in your question you say one x per y, this is the definition of an injective function(and maybe a bijection). A function has one y per x. –  ruler501 Mar 27 at 21:08
@jinawee Strictly speaking, in complex analysis, the functions aren't multi-valued, but instead "live" on some riemannian manifold. $\log z$, for example, "lives" on a helical manifold that you get by rotating the complex plane around its origin. Note that on this manifold, no closed curve can encompass $0$... –  fgp Mar 27 at 21:15
Because that would mean $3=-3$ which is false. The best you can do is $\sqrt9=\{3,-3\}$ which is awkward to work with. –  user2345215 Mar 27 at 21:15
The Kakutani fixed point theorem uses set-valued functions. –  Jay Mar 27 at 21:42

There is no talk about limiting anything.

The nice thing in mathematics is that if you want to create a new object, you are free to do so. So if you want to create the concept of a, say funion (I am making this up) by saying that it is a relation that takes a multiple number of inputs and gives you a multiple number of outputs, then you are free to do so. The term function is commonly accepted as being something that only has one output and so you wouldn't get far if you redefined function. you probably agree that this would just cause confusion.

So you could define the funion that takes $9$ to $-3$ and $3$. (You would have to make this precise).

Now, the invention of a new concept in mathematics is usually motivated by some need, so you would have to convince the world that there is a need to talk about funions. Do they solve certain problems? Do they simplify notation? In short: Why do we need them? Again, we are free to do what we want in mathematics.

One way that you could meet your desires, is to define the function $f$ to be the function that for ewach $x$ gives the (one) set of solutions to the equation $y^2 = x$. Then, for example, $f(3) = \{-3,3\}$ and this is a perfectly well-defined function.

As noted above in the comments, there is also the concept of a relation that pretty much does what I think you want.

Now, you do have to be careful with terminology. If you say that something is equal to both $3$ and $-3$, then you are saying that $3= -3$ and that is not allowed in mathematics. (This was also noted in the comments above).

-
Correct me if I'm wrong, but isn't a "funion" just a relation? –  WChargin Mar 27 at 22:54
@WChargin: Sure. The points is that you can define things almost as you want. And just as a function is a relation, a "funion" would also just be a relation. –  Thomas Mar 27 at 23:15
Jim Cannon loved discussing 'continuous relations', but they didn't catch on. –  Brian Rushton Mar 28 at 1:10
Just a comment; if you want $f$ combined with $3$ to equal $\{-3,3\}$, you don't have to view $f$ as a function. You could view it as a relation, and define a variant evaluation operator $*$ such that $f * x = \{y \in Y \mid (x,y) \in f\}$. Of course, this just means that $f * x$ always equals $f_*(x),$ where $f_*$ is the direct image function. –  goblin Mar 28 at 4:05
@Thomas So when you say that 3 cannot equal -3, does that mean that I cannot graph the negative half of the square root function? –  Ethan Mar 28 at 11:08

To add just one more viewpoint: the most basic definitions in mathematics are formalizations of our intuition about some real-world entity. "Continuity" is a prime example. But we're talking about "function" here. The real-world concept that the definition is meant to capture is simply that of some kind of transformation or process that associates things of one kind to things of another. So we want to have functions that take people to themselves a year later, or take places and hours to the rainfall there during that hour, buildings to their heights, geometric figures to subsets of the real plane representing them, numbers to their squares or exponentials, and so on.

With this long list of examples, I'm trying to indicate that the notion of function is a natural one, and implicitly assuming that it's natural notions that are interesting to study mathematically. Notice that all of my examples are functions: strange quantum physics aside, nobody becomes two people a year from now, every location gets a precise amount of rainfall, and so on (of course there are lots of choices to be made in the geometric example: suppose we've drawn some coordinate axes.)

Your complaint is that this isn't true in the case of taking square roots: that each number has two square roots. But the notion of function can deal with this: it's the same to say $x$ has two square roots $y_1,y_2$ as to say there are two numbers $y_1,y_2$ such that $y_1^2=y_2^2=x$. That is, in finding square roots of $x$ you're "really" just undoing the function of squaring. Of course, you might disagree and take the attitude that the square root operation taking $x$ to both $y_1$ and $y_2$ is more important to you. As other answers have discussed, that's not an invalid point of view and mathematics could have been done that way in a different world. It wasn't though, because we live in a world where functions are everywhere and situations like the square root are exceptional, so we set up mathematics to privilege functions and permit our treatment of square roots to be a shade more awkward than it could be.

-

Functions are a notational convenience that can be used to form expressions in a way that more general relations can't.

For example, consider the expression $\sqrt{2} + \sqrt{3}$. You can just type it into your calculator and get something close to $3.14626436994197$. What makes this even possible is the unambiguity provided by defining the square root operator as a function: You're adding the square root of 2 to the square root of 3.

If the square root were a two-valued “funion”, then what would $\sqrt{2} + \sqrt{3}$ mean? It could be one of four values, depending on your choice of positive and negative square roots.

• $+\sqrt{2} + \sqrt{3} \approx +3.14626436994197$
• $-\sqrt{2} + \sqrt{3} \approx +0.317837245195782$
• $+\sqrt{2} - \sqrt{3} \approx -0.317837245195782$
• $-\sqrt{2} - \sqrt{3} \approx -3.14626436994197$

Note that I had to rely on √-as-function to even write the exact values in the above list.

-

Why we do it? Because it's convenient. This is just the way we defined functions. We could've said that a function is a blue elephant. But we didn't say that. Instead, we said that (informally) a function is a thing that takes elements from one set, the input, to another set, the output. And we put a restriction in place: each input can map to only one output.

Why did we put this restriction in place? Well, otherwise the concept of a function wouldn't be very useful. For example, suppose you have a function so $f(x) = x$ and $f(x) = 2x$. Suppose you put $5$ into the function. Then what do you get? Either $f(5) = 5$ or $f(5) = 10$. You have no idea which value it maps to. If you're trying to arrive at some sort of conclusion, then an or term will narrow down your options, but ultimately won't leave you able to make a conclusion. So that is not very useful.

One of the great things about functions is the fact that we can invert them. Just as we can define a function $f$ mapping elements from set $A$ to set $B$ (written $f:A \to B$), we can define an inverse function $f^{-1}: B \to A$ to map the elements back to $A$. Let's take our example from above. Suppose you have the number $10$ and the function $f$, and so you defined $f^{-1}(x) =x$ or $f^{-1}(x) =\frac x 2$. Then you know that the $x$ such that $f(x) = 10$ was either $10$ or $5$. But you don't know which of the two it was. So then that's not very good either.

To finish up our example, suppose we have $f(5) = 5$ or $f(5) = 10$. But we also know that for $f(x) = 10$, we have $x = 10$ or $x = 5$. So then it is conceivable that $f(5) = f(10)$, and $f^{-1}(10) = f^{-1}(5)$, and we end up with $5=10$. This explains why we write that $\sqrt{4} = 2$, and not that $\sqrt{4} = \pm 2$. We would have $\sqrt{4} = 2$ and $\sqrt{4} = -2$, so we would get $\sqrt{4} = 2 = -2$, i.e. that $2 = -2$, and that's just nonsense.

We like functions because they allow us to map precisely from one set to another. This lets us draw all sorts of interesting conclusions and establish relationships between sets. If you really wanted to, you could define a function that takes an input to multiple outputs, but it would make those relationships 'fuzzy', when we're really interested in precise relationships. That's why we prefer functions the way we have defined them.

Finally, I think that you've thought that these multi-output functions, for lack of a better term, can be meaningful or somehow useful as mathematical objects. I suggest you look into relations and probability distributions. They are related, and may embody what you think may be missing in functions.

-
Your third paragraph reads as if all functions have inverses. I don't think this argues strongly in favor of functions anyway, since if we don't care about functions in the first place there's always an "inverse" relation. –  Kevin Carlson Mar 27 at 22:09

Thomas and Dan already written an excellent answer, but I'd like to answer from a different point of view: Conceptual identity and usage.

If you have an apple, and an orange, that's two things. You know which is which because you know their names and you 'feel it'. It's the same as with symbols in mathematics: if you define X to be f(foo) and Y to be g(bar), then you can distiguish between them.

On the other hand, if you do not assign any "identity" to them and tread them all as a group (i.e. set), then you've got a group-of-fruits (apple,orange) and a group-of-functions (f,g). However, note that despite the items losing their identity, now the group has identity. You have named it to be able to pinpoint it and operate on it.

I'm pretty sure that functions were defined to return a single result, because this is the most minimal way to provide their function without placing requirements on how to define the identities of the "resulting things".

If your function would return one thing (sqrt(9): 3) - well, obvious.

If your function would return many things not identifiable on their own (so sqrt_1(9) results in -3 and 3 in random order) - let's assume it can! Your function now returns a bag of items, in random order. How would you later operate/process/analyze them? Surely, they are not identifiable, you'll find a hard time referring to one or the other. But hey, there's the bag. You can get the resulting bag and analyze its contents. But now notice the change: you are identifying, referring and analyzing the bag. Your function returned X things and you are still referring to one: the bag.

But that was under assumption that the returned results are unnamed, not identifiable on their own. Now let's assume that function produces named, identifiable results (so sqrt_2(9) returns "negative-root: -3" and "positive-root: 3" (let's ignore the zero or imaginary..)). Now you can refer to them separately and easily. Really? Not. You still need the bag, becuase sqrt2(25) and sqrt(9) results in different positive-roots and different negative-roots. So to be able to really refer to them, you must first say that you are considering sqrt(25) and only then you can refer to positive-root and find it equal 5.

This means:

sqrt(9) -> 3
sqrt(9) -> {3, -3}
sqrt(9) -> {positive: 3, negative: -3}


But all of these are in fact are singular things:

one thing: a number
one thing: a set of numbers
one thing: a set of name-number pairs (mappings, relations, whatever you call it)


not mentioning that function can result in a function too (see higher-order functions).

My point is, that even if you find some way to ake it smart and try to redefine a "function" or "funion" to have it return multiple values, or whatever, you still end up having really one result at time.

This is because the assumption/notion of "having a result" implies it. For given parameters, you've got a value. Or set of them. But either way it's still one result. The notion of "having a result" is so basic and so abstract, that it's simply hard to generalize and expand it more.

-