I have two questions regarding the following problem and the solution to it.
Let $k$ be a field and $0 \to M_0 \to ... \to M_n \to 0$ be an exact sequence of finite dimensional $k$-vector spaces and $k$-linear maps. Prove that $\sum_{i=0}^n (-1)^i \dim_k(M_i)=0$.
Solution: Denote $d_i$ for the map $d_i: M_i \to M_{i+1}$. The long exact sequence splits into short exact sequences $0 \to \ker(d_i) \to M_i \to \operatorname{im}(d_i) \to 0$. By using the dimension formula for linear maps of finite dimensional vector spaces and the fact $\ker(d_{i+1})= \operatorname{im} (d_i)$, we conclude that $\dim(\ker(d_{i+1}))+\dim(\ker(d_{i}))=\dim(M_i).$ Thus, $\sum_{i=0}^n (-1)^i \dim_k(M_i)=\dim(\ker(d_{0}))+\dim(\ker(d_{n+1})=0$.
1.) How do they come to the short exact sequence above in the solution? Shouldn't the short exact sequence be $0 \to \ker(d_{i-1}) \to M_i \to \operatorname{im}(d_i)$?
2.) Why is $\dim(\ker(d_{0}))+\dim(\ker(d_{n+1}))=0$
Everything else I have understood, so far, but I don't get these two points. It would be great if someone could explain this to me. Thanks!
1) No. It comes from the canonical decomposition of a homomorphism: $$\begin{matrix}\ker d_i\hookrightarrow M_i&\xrightarrow[\qquad\quad]{d_i}&M_{i+1}\\[-21ex] &\searrow\qquad\nearrow\\ &\operatorname{im}d_i \end{matrix}$$
2) Simply because $\ker d_0=\{0\}$, and $d_{n+1}$ doesn't really exist: its domain would be $\{0\}$, hence if we take it to have codomain any vector space, say $\{0\}$ to make it simple, anyway its kernel has dimension $0$.