# Function Co-domain!

1. Apr 6, 2012

### dijkarte

Given a function f(x) f:A --> B, can the choice of codomain affect whether or not the function is surjective? For instance, f(x) = exp(x), f:R --> R is an injection but not surjection. However, assuming we can vary the co-domain, and lets make it f: R --> (0, inf), f(x) is now bijection. Is this correct?

2. Apr 6, 2012

### Number Nine

Yes. The codomain pretty much determines by itself whether or not the function is surjective.

3. Apr 6, 2012

### dijkarte

Got it. Thanks.

4. Apr 6, 2012

### Number Nine

I should probably qualify my previous post. The codomain determines surjectivity in the sense that if you define the codomain to be the same as the range of the function, then your function becomes surjective. In fact, given any function, you can restrict the codomain in such a way as to make the function surjective (you can also restrict the domain in such a way to make it injective). A different function with the same codomain obviously may not be surjective.

5. Apr 6, 2012

### dijkarte

But there's no rule which restricts the specification of the codomain based on the mapping rule itself as long as the range is a subset of the codomain. For instance, f(x) = sin(x) can be specified as:

f: R --> R
f: R --> [-2, 2)
f: R --> [-1, 1]

but not as f: R --> [0, 4]