If $$(x_1,y_1), (x_2,y_2),(x_3,y_3)$$ are points in the plane and if $a,b$ are fixed real numbers, how can I visualize $$f=(ax_1+b-y_1)^2+(ax_2+b-y_2)^2+(ax_3+b-y_3)^2$$ as a function from the plane into the reals?

I tried looking at what happens in the case that we only have one point $(x,y):$

$$f=(ax+b-y)^2=ax^2+2abx-2ayx-2by+b^2+y^2$$ which I can think of as the upper half of some ellipse in the plane. I don't see what happens as I include more points in my sum.

  • $\begingroup$ Regarding your example with one point: The curve $f=0$ isn't an ellipse, it's just two superimposed copies of the line $ax+b-y = 0$. So $f(x,y)$ is (very roughly) a measure of distance from this line. $\endgroup$ – bubba Sep 14 '14 at 8:02
  • $\begingroup$ @bubba do you mean that it is piecewise linear? $\endgroup$ – The Substitute Sep 14 '14 at 8:46

$|ax_1+b-y_1|$ is the vertical distance of the point $(x_1,y_1)$ from the line $y=ax+b$ Your expression is the sum of the squares of three of these. I would guess it comes from a least squares fit problem, where you are trying to find the $a,b$ that minimize this sum. I don't know an easy to visualize this. It lives in a seven dimensional space, the six coordinates of the points and the function value and since it is one equation it is a six dimensional manifold (except for critical points). I don't know how to visualize those.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.