I came across this problem in a maths exam. I solved this by taking that a light ray passes in such a way that it takes least path. But as this was a maths exam, i was wondering if it can be solved using maths?
Let $A=(0,1)$ and $B = (1,1)$ in the plane $\mathbb{R}^{2}$. Determine the length of the shortest path from A to B consisting of the line segments AP; PQ and QB, where P varies on the x-axis between the points $(0, 0)$ and $(1, 0)$ and Q varies on the line $y = 3$ between the points $(0, 3)$ and $(1, 3)$