Why is a feedback loop not represented by the least order transfer function? I have a feedback loop with transfer $L(z)= \frac{H(z)C(z)}{1+H(z)C(z)}$.

$$H(z) = h\quad \text{and} \quad C(z) = \frac{K}{z-\alpha}.$$

If I manually calculate the transfer function, I get:

$$L(z) = \frac{Kh}{z-\alpha + Kh}$$

But if I let MATLAB do the calculation I get:

$$L(z) = \frac{z-\alpha}{z-\alpha}\frac{Kh}{z-\alpha + Kh}$$

$L(z)$ is unstable with $\alpha=2$ and $K=\frac{1}{h}$. The second transfer function (calculated with MATLAB) has two poles $(1,2)$ of which one is outside the unit circle. So the second one seems to be correct. What is wrong with the first one?
Not really an answer, but let's work it out with $H(z) = h$ and $C(z) = \frac{K}{z-\alpha}$.:

$$
\begin{array}
\ L(z) &amp;=&amp; \frac{H(z)C(z)}{1+H(Z)C(z)}\\
&amp;=&amp; \frac{h \frac{K}{z-\alpha}}{ 1 + h \frac{K}{z-\alpha}}\\
&amp;=&amp; \frac{h K}{ z - \alpha + h K}\\
&amp;=&amp; \frac{h K}{ z - \alpha + h K}\ \ \frac{z - \beta}{ z - \beta}
\end{array}
$$

I added the last line to show what I mean by a pole-zero cancellation.  $\beta$ can be any value; if the pole and the zero at $\beta$ cancel out, the overall value of $\frac{z - \beta}{ z - \beta}$ is 1.  

The trick will be to figure out why matlab inserts the extra $\frac{z - \alpha}{ z - \alpha}$ in there in the first plcae,