# Which functions am I missing?

1. Feb 21, 2016

### Kingyou123

1. The problem statement, all variables and given/known data
How many functions are there from {1,2,3} to {a,b}? Which are injective? Which are surjective?

2. Relevant equations
n^m. gives the number of functions

3. The attempt at a solution
To me the number of functions that can be made are 6 because 3x2=6 but I have read online that n^m, n being the elements in the second set and m being the number of elements in the first set, gives you the number of functions. That equation gives me 8 functions but for the life of me I can't figure which functions I'm leaving out.

Also there can't be any injective functions because f(1) can take 2 values and f(2) can take one value. Leaving f(3) with none so therefore It can't be injective,correct?

2. Feb 21, 2016

### SammyS

Staff Emeritus
You are missing two functions for which 1 → b .

3. Feb 21, 2016

### Kingyou123

Thank you, was my explanation for injective correct?

4. Feb 21, 2016

### SammyS

Staff Emeritus
Yes

5. Feb 21, 2016

### Kingyou123

Awesome thank you :)