Matrix transformation mapped onto itself Question:

$$A= \begin{pmatrix} k & -2 \\ 1-k & k \end{pmatrix}\text{, where k is a constant}$$
$$\text {A transformation } T : \mathbb{R}^2  \rightarrow  \mathbb{R}^2 \text{ is  represented by the matrix A.}$$
$$\text {Find the value of k for which the line } y = 2x \text{ is mapped onto itself under T.}$$

Working:
$$\begin{pmatrix} k & -2 \\ 1-k & k \end{pmatrix}\cdot\begin{pmatrix} x \\ 2x \end{pmatrix}=\begin{pmatrix} x \\ 2x \end{pmatrix}$$
$$\begin{pmatrix} x(k-4) \\ x(1+k)  \end{pmatrix}=\begin{pmatrix} x \\ 2x \end{pmatrix}$$
$$x(k-4)=x$$
$$x(1+k)=2x$$
Leaving me with $k=5$ and $k=1$, However the answer is $k = 9$ why?

On the same line (!) of thought: the line $\,l:y=2x\,$ is the same as the vector space $\,\operatorname{Span}\{(1,2)\}\leq\mathbb{R}^2$ , or if you prefer: $\,l:\{(r,2r)\,/\,r\in\mathbb{R}\}\,$ , and then what we really want to happen is $$\begin{pmatrix}k&-2\\1-k&k\end{pmatrix}\begin{pmatrix}1\\2\end{pmatrix}=\begin{pmatrix}r\\2r\end{pmatrix}\Longrightarrow \begin{array}\\k =\,\,\,r+4\\k=2r-1\end{array}$$so $\,r+4=2r-1\Longrightarrow r=5\,$ and thus $\,k=9\,$
