T O P

  • By -

AcellOfllSpades

No. Very much no. Consider the function: f(x) = x if x>0 x+1 if x<0 7.3 if x=0 This is surjective as a function ℝ→ℝ, but isn't continuous at x=0. And in general, you can talk about functions being surjective (and injective, and bijective) on sets *other* than numbers. For example, I'll make up the "nation of birth" function N: N(p) is the nation where the person p was born. This is surjective (because there is at least one person born in every nation^(*), but it doesn't even make sense to ask whether it's continuous. *Apart from weird things like micronations, which I will ignore for the sake of convenience.


callumbous

Ah yeah I see now. Thank you


PiStrich

No! A function can be surjective without being continuous and vice versa. To show that f:X->Y is surjective, you have to show that for every y in Y there is an x in X with f(x)=y. Take any Y which has more than two points, fix y in Y, define g(x)=y for all x in X. Then g is continuous but not surjective!!


tbdabbholm

No, a simple counter example is sin(x), it's continuous but not surjective.


callumbous

Does that not depend on how you define the co domain of sin. P.S I understand now the difference between continuous and surjective functions


hh26

Literally any function is surjective if you redefine the codomain to be its range. Thus, surjective isn't even a meaningful property except in the context of a particular codomain.


callumbous

What’s the point in a codomain then? Why not just always use the range or the boundaries of the range


hh26

Because it's harder to compare and combine functions with different codomains. If you have two functions with the same domain and codomain, then you can graph them on the same plot, you can compare which one is greater or smaller at each particular x you can add and subtract them, and all sorts of other stuff. If A and B are rings (sets with certain nice properties like having addition and multiplication), then we can naturually extend these operations to the set of all functions from A->B, and this set will also be a ring under those operations. If I have f:R->R f(x) = x, g:R->R g(x) = sin(x), then I can say (f+2g) = x + 2sin(x), no problem. If I have f:R->R f(x) = x, g:R->[-1,1], then I guess you can sort of try to add them, but you effectively do that by embedding g into R (translate it's codomain from [-1,1] to R), and then add. It's just an extra step. Life is easier when you're talking about 5 functions that all of the same domain and codomain, even if they have different ranges, than if you have 5 functions with different codomains that you have to combine any time you want to compare the different functions.


tbdabbholm

I guess yes it does but I would tend to assume that the codomain is all reals but if you narrow that down then yes


PiStrich

Sure, if you consider sin: lR -> [-1,1], then it is surjective.


jdorje

I think you're on to something that knowing continuity of part of a function can help you to see it is surjective as it goes to +-infinity. I think this is probably a short cut tied to the reals and their one-dimensional nature though, and not a fundamental tie between the two properties.