A person starts from a point P and walks 1 km along a straight line and then turns to his right and walks straight for 2 km. After that, he turns to his left and walks for 3 km to reach a point Q. What is the straight line distance of the point Q from the point P ?
Assume the first walk of 1 km is along the positive x-axis. The position is (1,0).
Turning right from the positive x-axis means moving along the negative y-axis. The walk of 2 km leads to the position (1, -2).
Turning left from the negative y-axis means moving along the positive x-axis. The walk of 3 km leads to the position (1+3, -2) = (4, -2).
Point Q is at (4, -2). The distance from P(0,0) to Q(4,-2) is $\sqrt{(4-0)^2 + (-2-0)^2} = \sqrt{4^2 + (-2)^2} = \sqrt{16 + 4} = \sqrt{20}$.
$\sqrt{20} = \sqrt{4 \times 5} = 2\sqrt{5}$.
Alternatively, assume the first walk of 1 km is along the positive y-axis. The position is (0,1).
Turning right from the positive y-axis means moving along the positive x-axis. The walk of 2 km leads to the position (2, 1).
Turning left from the positive x-axis means moving along the positive y-axis. The walk of 3 km leads to the position (2, 1+3) = (2, 4).
Point Q is at (2, 4). The distance from P(0,0) to Q(2,4) is $\sqrt{(2-0)^2 + (4-0)^2} = \sqrt{2^2 + 4^2} = \sqrt{4 + 16} = \sqrt{20} = 2\sqrt{5}$.
In both common interpretations of direction and turns, the distance is $2\sqrt{5}$ km.