Hello, SergeyOsipov, you wrote: SO> There is a cloud of points in 3D. It is necessary to find the plane equation the total distance from which to all points would be minimum. There is a pair of ideas how to make, but who offers that? Or can eat generally on computing geometry. But it is not interesting, it would be desirable variants of algorithms . Whether the least-squares method which minimizes the total of squares of orthogonal distances to a plane approaches? And if preferential orientation of a cloud it is possible also distances along any axis is known to optimize (it easier, dares system from three linear equations of a type with members of type Sum (xi^2), Sum (xi*yi) etc., and in the first case how much I remember, it is necessary to search for own numbers of a matrix)