This is exercise in Artin's book Algebra:
Find all real $2\times 2$ matrices that carry the line $y=x$ to the line $y=3x$.
I tried: Rotation matrix: $$\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\\ \end{bmatrix},$$ where $\theta=\arctan 3-\arctan 1$. But it seems like there are whole lot other matrices.
It is not so sophisticated as that: the vector $(1,1)$ is mapped to the vector $(a+b,c+d)$ and the latter must satisfy the relation $$c+d=3(a+b).$$