Take any two points and form the equation for a straight line. If all the remaining points satisfy the equation, then they lie on astraight line. Else, they don't.
Here's an example. Consider n points as P1(x1, y1), P2(x2, y2), ...., Pn(xn, yn). In order to determine if P1, P2, ..., Pn lie on a straight line, form the straight line equation with P1 and P2 as: y-y1= m * (x - x1), where the slope m = (y2-y1)/(x2-x1). Then try to satisfy this equation by the remaining points P3, P4, ..., Pn. That is, verify the following:
Is y3-y1= m * (x3 - x1)?
Is y4-y1= m * (x4 - x1)?
...
Is yn-y1= m * (xn - x1)?
If all of the above is true, then the points lie on a straight line.
Chat with our AI personalities
Three or more points that lie on the same straight line are called Collinear.
Collinear set of points
You have to have three or more points to have non-colinear points because any two points determine a line. Noncolinear are NOT on the same line.
A straight line of infinite length!
Yes, when they are the coordinates of a straight line equation.