Why is $\lozenge (p\to p)$ not valid in system $K$ of modal logic? 
Why is $\lozenge (p\to p)$ not valid in system $K$ of modal logic?

How could this formula be false in any accessibility relation or setting of values in worlds? Even if it was a dead end world, wouldn't the conditional be vacuously true since the antecedent would be false? And then that would make the possibility operator true? Someone please help me see the counterexample.
 A: Consider the frame with a single world $w$ and no arrows (or if you prefer, empty accessibility relation). Then regardless of what $\varphi$ is, the sentence "$\Diamond\varphi$" will be false at $w$ since $w$ sees no worlds at all.
Your analysis of "$\Diamond(p\rightarrow p)$" I believe conflates it with "$(\Diamond p)\rightarrow (\Diamond p)$" (the latter sentence has a hypothesis, namely "$\Diamond p$," whereas the former isn't a conditional statement - it's a "modalization" of a conditional). 

More generally, the situation is:


*

*In a frame with no dead worlds (or, if we add "$\Diamond (p\vee\neg p)$" to $K$), then we do have $$[(\Diamond p)\rightarrow(\Diamond q)]\rightarrow \Diamond(p\rightarrow q)$$ true at every world. For if $\Diamond(p\rightarrow q)$ is false at $w$, then $p\wedge\neg q$ has to be false at every world $w$ sees. So $\Diamond q$ is false at $w$; but since $w$ sees some world, this means that $\Diamond p$ is true at $w$ and so $[(\Diamond p)\rightarrow (\Diamond q)]$ is false at $w$.

*The converse fails even in very nice frames: e.g. suppose $w$ sees the worlds $a$ and $b$ (and only those worlds), $p$ is true in $a$ but false in $b$, and $q$ is false in both $a$ and $b$. Then $\Diamond (p\rightarrow q)$ is true at $w$ (via $b$) and $\Diamond p$ is true at $w$ (via $a$) but $\Diamond b$ is false at $w$ and so $(\Diamond p)\rightarrow(\Diamond q)$ is false at $w$.
A: 
How could this formula be false in any accessibility relation or setting of values in worlds?

In the Kripke semantics of a set of worlds, an accessibility relation, and a valuation operation ($(W,R,\Vdash)$), $\lozenge\phi$ is interpreted as: There is some world accessible from the 'current' world where $\phi$ is valued as true.  That is: if $w$ is the 'current world', then:
$$(w\Vdash \lozenge\varphi)\iff \exists u\in W~.(w\mathop R u\wedge(u\Vdash \varphi))$$
The classical logic theorem of $p\to p$ will be true in any world, so $\lozenge(p\to p)$ will be true in a world if it has accessible worlds.   However, the statement $\lozenge(p\to p)$ will be false in a world which has no accessible worlds.   This is allowable in Frames of the $\mathbf K$ model, so $\lozenge(p\to p)$ is not a theorem in $\mathbf K$.

Even if it was a dead end world, wouldn't the conditional be vacuously true since the antecedent would be false? 

For all statements $\varphi$, it will be held that $\square\varphi$ is vacuously true in a world that has no accessible worlds.
$$\neg\exists v\in W~.w\mathop R v\implies \forall v\in W~.(w\mathop R v\to(v\Vdash \varphi))$$
However, $\lozenge\varphi$ will be vacuously false in such a world, because there will be no accessible world where $\varphi$ can be valued true when there are no accessible worlds at all.
$$\neg\exists v\in W~.w\mathop R v\implies \neg\exists v\in W~.(w\mathop R v\wedge(v\Vdash \varphi))$$
