3 ms·
Well, if you ask the mathematicians then f(x) = 1/x isn't defined on the real numbers, it's defined on the non-zero real numbers. It always returns a real numbe
by contravariant 6y ago
Well, if you ask the mathematicians then f(x) = 1/x isn't defined on the real numbers, it's defined on the non-zero real numbers. It always returns a real number but it's domain has a different type.
This places the burden on the person using the function to prove that x isn't 0, but that's the price you have to pay to have a proper multiplicative inverse.
- ragnese 6y agof(x) = 1/x is also defined over what we call the "extended reals" which is just R + inf. But, I don't think what you said is quite right, either. If you define f(x) = 1/x over the non-zero reals, then the range does have the same type as the domain- you can't get zero out of the function, so the range is also the non-zero reals.
- ogogmad 6y agoThe codomain doesn't have to equal the image. The image is the non-zero reals, but the codomain could be any superset of it (including all of R). The word "range" is ambiguous.
- ragnese 6y agoThank you. I've forgotten some of the terminology, since I haven't thought about real math in a few years. :(
- contravariant 6y agoThere's no real problem with defining the codomain to be too big. Although you can indeed also pick the non-zero reals as the co-domain.
- thaumasiotes 6y ago> f(x) = 1/x is also defined over what we call the "extended reals" which is just R + inf. Not quite. The extended reals are ℝ + {inf, -inf}. This has the problem that 1/x approaches inf from the right and -inf from the left. As ogogmad notes, in order to define a value for 1/x at 0, you need the projectively extended reals.
- jacobolus 6y agoExtending the real numbers with 1 vs. 2 points at infinity both have applications where they model real situations. For example, if we take a mercator projection of the globe onto a 2-infinite-ended cylinder, the latitude coordinate could meaningfully be either +∞ or –∞. If we take the stereographic projection of the globe onto the plane, every pair of coordinates with one infinite value corresponds to the same point on the sphere.
- enriquto 6y ago> Not quite. The extended reals are (...) You are both right. There are several, different, extensions of the reals. The "projective" extension turns the real line into a (topological) circumference by adding a single point at infinity. The "affine" extension turns it into a closed segment by adding two infinities, one at each end; this corresponds to the convention used by ieee floating point numbers. There are many more extensions, like complex numbers, dual numbers, p-adic numbers, and in many of them (except complex numbers) you have various kinds of divide-by-zero fun.
- ogogmad 6y agoMaking the domain of f(x)=1/x be the non-zero real numbers allows f to be continuous. If f(0)=0 then continuity is lost. Alternatively, defining f(0) to be infinity (a projectively extended real number) also allows f to be continuous. Another possibility is to define f(0) to be some kind of "bottom" value. See the following tweets by Andrej Bauer: https://twitter.com/andrejbauer/status/1268860981943439361 https://twitter.com/andrejbauer/status/1268860981943439361 Continuity is important because without it we lose computability. Every computable function is continuous (in an appropriate sense).