Answer:
[tex]AB=\sqrt{(y_{2}-y_{1})^{2}+(x_{2}-x_{1})^{2}}[/tex]
Step-by-step explanation:
Given two points in grid which are not on the same horizontal line or vertical line. Hence, it will be like as shown in figure.
Let [tex]A(x_{1},y_{1}) and B(x_{2},y_{2})[/tex] are the points on grid.
AO=(y-coordinate of A)-(y-coordinate o B)
= [tex]y_{2}-y_{1}[/tex]
OB=(x-coordinate of A)-(x-coordinate o B)
= [tex]x_{2}-x_{1}[/tex]
Hence, By Pythagoras theorem, distance between the points A and B i. AB can be calculated as
[tex]AB^{2}=AO^{2}+OB^{2}[/tex]
[tex]AB^{2}=(y_{2}-y_{1})^{2}+(x_{2}-x_{1})^{2}[/tex]
⇒ [tex]AB=\sqrt{(y_{2}-y_{1})^{2}+(x_{2}-x_{1})^{2}}[/tex]