Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
It is not always the case that a ray is projected to a ray (in the harder question): for example, the projection of the ray $\mathbb R \cdot (-1,-1)$ onto the positive quadrant $\{(x,y) \mid x,y\ge 0\}$ is just the origin.