Yes, you can have nontrivial homomorphisms. For instance, from
$$(\mathbb Z, +)$$
to
$$
(\mathbb Z/3\mathbb Z, +)
$$
you can send $n$ to $n \bmod 3$.
Consider the matrix
$$
A = \begin{bmatrix}
0 & 1 & 0\\
0 & 0 & 1 \\
1 & 0 & 0
\end{bmatrix}
$$
Since $A^3 = I$, the map that sends $n \in (\mathbb Z, +)$ to $A^n$ in $P(3; \mathbb R)$ is essentially the same map as in the first example, except that this time, the $\mathbb Z / 3 \mathbb Z$ is a subgroup of the matrix group.
As for maps from $\mathbb R$ to $P(n; \mathbb R)$: the homomorphic image of a connected topological group will still be connected, and the only connected subgroup of $P(n; \mathbb R)$ is the trivial one. (Indeed, this remark applies to any codomain that's discrete, as @Clement notes .)
You might imagine it as the group of upper triangular matrices with the top-right entry marked as unknown or irrelevant,
$$\begin{pmatrix}x&y&?\\0&z&u\\0&0&v\end{pmatrix} $$
This is fine because when multiplying two such matrices, the top-right entries are needed only for computing the top-right entry:
$$\begin{pmatrix}x&y&?\\0&z&u\\0&0&v\end{pmatrix}\begin{pmatrix}x'&y'&?\\0&z'&u'\\0&0&v'\end{pmatrix}=\begin{pmatrix}xx'&xy'+yz'&?\\0&zz'&zu'+uv'\\0&0&vv'\end{pmatrix} $$
By removing all decoration, this becomes a group structure on the set $$G:=\{\,(x,y,z,u,v,D)\mid yzvD-1=0\,\}$$ and with multiplication rule
$$(x,y,z,u,v,D)\cdot(x',y',z',u',v',D')=(xx',xy'+yz',zz',zu'+uv',vv',DD').$$
But I suppose that this explicit rule looks a bit unintuitive, compared to the matrix with irrelevant entry.
As a sidenote: Because the set $G$ and the group operation are defined in terms of polynomials, this is an algebraic group
Best Answer
Hint: Consider the scalar multiples of matrices with a $1$ in the top lefthand corner, a $-1$ in the bottom right, and zeros everywhere else.
Hover over, click, or tap the box below for further information.