# Weighted average of arbitrary k points from a line

Suppose a set of k arbitrary points, x_i, 1<=i<=k, x_i from R^2 are selected from a line. How can it be shown that a weighted barycenter x_o=(o_i*x_i)/(o_1+o_2+...+o_k) also belongs to that line (assume o_i are arbitrary weights)? Does the choice of weights restrict the solutions (ie, a particular choice to satisfy that x_o is within the 'convex hull' of other points)?

## Answers and Replies

chiro
Science Advisor
Hey onako.

If this is a straight line then from this you have n-independent coeffecients (since the o_i's are independent) and since you can specify those then you can choose the coeffecients such that these match the ones of the original line.

If all the x_i's line on a straight-line, then provided that you can pick the o_i's, then you can solve for the particular values of o_i to provide equal coeffecients.

The only thing though about this is that you are dividing by the sum of the all the o_i's which means you lose a degree of freedom and the only way you can get a solution is if you have an extra constraint on the o_i's and this constraint is exactly what is imposed.

If your line is a unique line then the solution in terms of your o_i's should be unique as well since you have a constraint on the sum of the weights which means the scalar multiples should disappear as well (I'm consider scalar multiples of a linear equation).

Let's simplify the question. Suppose that non-negative arbitrary weights o_i are associated with each x_i chosen from the straight line. Does x_o lie on that same line? The point is: points x_i are chosen as arbitrary points from the line, and are associated coefficients o_i which are non-negative.

chiro
Science Advisor
Are you looking at the triangle simplex in R^2?

I'm concerned with a 2D case, with a straight line.

chiro
Science Advisor
If this line is in R^2 then they need a common gradient: try setting up a simple line based on y - y0 = m(x - x0) where m = (y1 - y0)/(x1 - x0) and showing that the gradient has a common form.

For the bary-centric case the sum of all the weights should be 1 so you can cancel that out, and see if calculating this line gives a common form in terms of the coeffecients.

A line in the plane satisfies a vector equation of the form
$Nx=a$
So if each xi satisfies that equation, you just have to show that a weighted average of them also satisfies that equation. As long as the weights add up to 1 it should work.