# Talk:Least squares

## minimizing error/non linear case

say x1,x2,x3...xn are values measured of a function f(x,y)=0 with corresponding y1,y2,y3..yn, A curve that passes through all these points is given by: Π((ai(x-xi))^2+(bi(y-yi))^2)=0 implying a fantastic coef of determination/zero chi-square. Can such solutions be considered valid for modelling purposes? logically no because only xi,yi satisfy the above equation, but can someone think of a way to add a variation to this? Once one plugs in known xi and know yi the function is of the form f(xn,y)=0 where we know xn but do not know y for that xn Can one solve it by equating the above to (or it's integral) to e(x,y), where e(x,y) is the error in measurement and solving for (e`(x,y))^2 being a minima etc?

In other words can one say Π(((x-xi))^2+((y-yi))^2)=e^2 where e is the error and then minimize the error? — Preceding unsigned comment added by Alokdube (talkcontribs) 13:53, 12 February 2014 (UTC)

-Alok 13:37, 12 February 2014 (UTC) — Preceding unsigned comment added by Alokdube (talkcontribs)

## Overdetermined?

Although the method of least squares can be used to solve an "overdetermined" system of equations; I do NOT believe it is the usual/elementary case. The predictor matrix is assumed to be invertible (non-singular) which usually explained as "just determined" with the same number of equations as unknowns. "Over-determined" and "under-determined matrices" (systems of equations) are treated as special cases.

See for example the Wikipedia article, System of linear equations

"In general, the behavior of a linear system is determined by the relationship between the number of equations and the number of unknowns: Usually, a system with fewer equations than unknowns has infinitely many solutions, but it may have no solution. Such a system is known as an underdetermined system. Usually, a system with the same number of equations and unknowns has a single unique solution. Usually, a system with more equations than unknowns has no solution. Such a system is also known as an overdetermined system."

The least squares "solution" is a minimum of a parabola; mathematically it has a unique "closed form" solution (one can use calculus to work out a specific algebraic formula that will yield an exact solution).

An analogy, a screwdriver CAN be used as a chisel, but it would be a mistake to begin a Wikipedia article on "screwdrivers" by stating that "a screwdriver is a tool for chiseling wood" that would ignore the primary use of screwdrivers to turn screws to attach or detach two pieces of wood, metal or plastic.

Yes, least squares can be used to solve overdetermined systems of equations, just as a screwdriver can be used to chisel wood, but that is not initial intended use of either one. Jim.Callahan,Orlando (talk) 01:19, 7 February 2016 (UTC)

## Hooke's law

The force constant ${\displaystyle k}$ in Hooke's Law is typically defined by ${\displaystyle {\vec {F}}=k{\vec {x}}}$ rather than as here, where it has been replaced by ${\displaystyle 1/k}$. Perhaps this is just to make it look simpler for the purposes of this article? — Preceding unsigned comment added by 129.78.56.191 (talk) 06:32, 17 August 2016 (UTC)