Question: Find equation of line which has minimum distance from these points

I've got some points:

I have to find the (equation of) line which has minimum distance from these points but the distance formula that I have to use is:
 (-m*x[i]-q+y[i])^2

I think we should settle with a for loop.

Thanks in advance

 

 

Please Wait...