#### [Injection & Surjection] Is my work correct on whether these functions are injective/surjective?

Peyton Tran

0

The book provides answers only to the surjective parts, not the injective parts.
I want to see if I got the injective questions correct along if I got the surjective questions for the right reason. It isn't enough (to me personally) to know I got the surjective parts right/wrong, I want to know I got them right for valid reasons.
This is not homework, just me studying ahead on my own. If I made a mistake, what do I need to fix?
Functions from Z to Z.
**Question 1:** f(n) = n - 1
Injective: yes 1-1 if f(x)=f(y) -> x=y x-1 = y-1 x=y
Surjective: yes. f(x)=x-1 y = x-1 x=y+1 f^-1 (y) = y+1 this is onto.
**Question 2:** f(n)= n^2 + 1
Injective: no x^2 + 1 = y^2 + 1 x^2 = y^2 x = +/- sqrt(y) f has to have a unique mapping from the domain to codomain.
Surjective: no f(x) =x^2 + 1 y= x^2 +1 x^2 = y-1 x = +/- sqrt(y-1) f^-1 (y) = +/- sqrt(y-1) If y=0 then +sqrt(-1) is not an element of the codomain Z.
**Question 3:** f(n)=n^3
Injective: yes x^3 = y^3 (x^3 )^1/3 = (y^3)^1/3 x = y
Surjective: no y=x^3 x^3 = y (x^3)^(1/3) = y^(1/3) x = y^1/3 f^-1 (y) = y^1/3 If y=1 then 1^(1/3) is not an element of the codomain Z.
[Edit: change y=1 to y=2 then this is now correct.]