To prove that a function is one to one, you show that or . Then to prove surjectivity, you want to show that every element in the codomain has a pre-image. For example, suppose and we define it from to . 1 has preimage 1, 4 has preimage 2, and 9 has preimage of 3. So it is surjective.