Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Determine if $f(n) = n^2 - 1$ is injective, surjective, and prove your answer.

The domain and codomain is the set of all integers: $\mathbb{Z}$

Let $-3 = n^2 - 1$

Then $n = \sqrt{-2} \notin \mathbb{Z}$

$\therefore f$ is not surjective.

Let $f(n) = 3$

Then $f(2) = 2^2 - 1 = 3$ and $f(-2) = (-2)^2 - 1 = 3$

$\therefore f$ is not injective. $\square$

share|cite|improve this question
Looks solid to me. Did you have any questions? – Clayton Feb 19 '13 at 7:38
Do I have to prove it is a function first? It seems like a dumb question, but thought I would ask anyways. – Leonardo Feb 19 '13 at 7:39
It doesn't seem necessary to me if the question is already asking you to prove or disprove injectivity/surjectivity. – Clayton Feb 19 '13 at 7:41
You have to see it is a function first, (if it isn't a function it can't be injective or surjective) but you don't need to write a proof for it. – Dominic Michaelis Feb 19 '13 at 7:44
Thanks, it helps to know I am not leaving anything out. – Leonardo Feb 19 '13 at 7:45
up vote 1 down vote accepted

You shouldn't write something like $\sqrt{-2}\not\in \mathbb{Z}$. Just write that $-2=n^2$ has no solution.
The let $f(n)=3$ is not good too, since you could think this is true for any $n$.

share|cite|improve this answer
So what should I say "choose" $f(n) = 3$ instead? – Leonardo Feb 19 '13 at 7:40
Na just say, $f(2)=3$ (with calculation) and $f(-2)=3$ so it can't be injective – Dominic Michaelis Feb 19 '13 at 7:42
@Leonardo: Simply show that $f(2)=f(-2)$ and point out that particularly, $2\neq-2$. – Clayton Feb 19 '13 at 7:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.