My book claims that the following is a homomorphism:
$$\phi:\Bbb R\to GL_2(\Bbb R),\phi(a)=\begin{bmatrix}1&0\\a&1\end{bmatrix}$$
But it doesn't seem to be:
$$\phi(ab)=\begin{bmatrix}1&0\\ab&1\end{bmatrix}$$ $$\phi(a)\phi(b)=\begin{bmatrix}1&0\\a&1\end{bmatrix}\begin{bmatrix}1&0\\b&1\end{bmatrix}=\begin{bmatrix}1&0\\a+b&1\end{bmatrix}$$
Right? What am I missing?
Your computation is correct, $\mathbb{R}$ is to be taken as the additive group (it is implied since $\mathbb{R}$ is not a group for multiplication because of $0$). So $\phi$ is indeed an homomorphism from $(\mathbb{R}, +)$ to $(\operatorname{GL}_2(\mathbb{R}), \times)$ in the sense that you have
$$\phi(a+b) = \phi(a) \phi(b)$$