If we are taking (i,j) as the top left corner then shouldn’t we take the the point R (Which we are adding at the end ) as
(0,0)-(i,j).
Also can you tell me which point are we taking as the left corner here? Mathematically speaking, (1,2) or (2,3) from top.