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!


Solution 1:

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).

Solution 2:

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.

Solution 3:

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.

Solution 4:

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.