Number of keys for a monoalphabetic cipher My teacher stated that… 


  The number of possible keys (E) in a monoalphabetic cipher is $26$!


My thinking:


  Every letter in the alphabet can be $25$ different letters hence it the  number of possible keys should be $26^{25}$.


What is wrong with my way of thinking, and how did she come to a conclusion of “$26!$”?
Your teacher is right, and here's why:

What happens if you encrypt A with G and B with G? You can't decipher it, because you have no idea if the G in the ciphertext was an A or a B.

So…


For the plaintext letter A you can use the ciphertext letter A, B, C, … , X, Y, or Z. ($26$ possible letters.)
For B you can use A, B, C, … , X, Y, or Z, but not the letter you did use for A. ($25$ possible letters.)
For C you can use A, B, C, … , X, Y, or Z, but not the letter you did use for A or B. ($24$ possible letters.)  
...
For Z you can only use the remaining letter. ($1$ possible letter.)


The whole number of possible keys is $26\times25\times24\times [...] \times2\times1 = 26!$ (The exclamation mark denotes the factorial of a number.)