Manhattan distance between point and line

24 Views Asked by At

What is the minimum manhattan distance between a point A, with coordinates (i,j) and a point B on line y=mx+B
In other words:
$$\operatorname{min}{[\operatorname{D_T}{(A,B)}]}$$ Where $B=(x,mx+b)$ and $A=(i,j)$ So far I’ve got the following: $$\operatorname{min}{[\operatorname{D_T}{(A,B)}]}=\vert(i-x)\vert+\vert((j+b)-mx)\vert$$ Is there anyway to expand the following, I don’t understand how to make sense of opening up the absolute value.