Why perfectly secrecy needs the key space to be as large as the message space? Why perfectly secrecy needs the key space to be as large as the message space?

I think the definition (1) 

$\Pr[M=m\mathrel|C=c]= Pr[M=m]$
still holds.

Let $M(c)$ be the set of messages that can be decrypted from $c$. We know that  $|M(c)| \leq |K| &lt; |M|$ where $K$ and $M$ are the key and message space, and we can infer that some message, say $m'$ can never be the plaintext of $c$, but how does that violate the definition (1) ?
how does that violate the definition (1) ?


Let's assume $|K|&lt;|M|$. Then there exist $c\in C$ and $m\in M$ such that for all $k\in K$, you cannot get $c=E_k(m)$ ($c$ encrypts $m$ under the key $k$).

Now expand the conditional probability of your definition (1):
$$\Pr[M=m|C=c]=\frac{\Pr[M=m\;\&amp;\;C=c]}{\Pr[C=c]}$$
but since $|K|&lt;|M|$, we already have a pair $(m,c)$ that you cannot get under any encryption key, therefore $\Pr[M=m\;\&amp;\;C=c]=0$. Your definition is violated.

You could get to the same conclusion by using entropy -- to get perfect secrecy (i.e. no information about the plaintext is yielded from the ciphertext), entropy of the key space must be at least as big as the message space entropy.