Consider one instance of this, y = 2x. (Note specifcally that the domain/co-domain is Z.)
it's injective alright.
but, this is not surjective. because y can only be even numbers as per this definition. So, the range of y doesn't cover the entire co-domain.