# What is the exact difference between linearly separable and non-linearly separable data points?

Does the separating boundary of a given set of points have to be a straight line (or a flat hyperplane)?

The image below seems to be clearly linearly separable.

The other one here (the classic XOR) is certainly non-linearly separable.

Both of them seems to be separable by a single line, though not straight. Are they linearly separable?

No. In the coordinate systems you've chosen, they are not linearly separable. The classes of data must be separable by a hyperplane, that is, a boundary that takes the form of $w_1x_1 + w_2x_2 + ... + w_px_p = C$. If you can find a coordinate system where this is true, then it will be linearly separable in the new coordinate system but not necessarily in the old.

• In your example with blue and green points, you can introduce a center and then shift to polar coordinates. It will be linearly separable in the polar coordinates! Mar 3, 2016 at 12:33
• The definitions of "linearly separable" with which I am familiar--see, for instance, the Wikipedia article on the subject--do not admit the possibility of a change of coordinates. You have to use the coordinates you are given. According to your definition, all the examples in the question are "linearly separable." In fact, it's not difficult to show that according to your definition all finite groups of non-overlapping points are "linearly separable."
– whuber
Mar 3, 2016 at 16:09
• I agree. That's why I answered "No". I then reasoned if you can find a basis such that a hyperplane works, then it will be linearly separable in that new basis. I should have wrote: "If you can find a coordinate system where this is true, then it will be linearly separable in the new coordinate system but not the old.
– matt
Mar 3, 2016 at 16:46
• @whuber: So the separability should only be accounted without any coordinate transformation, right? Thanks for the added clarity. Mar 3, 2016 at 17:43
• @Matt We welcome edits to answers to improve them. To illustrate, I have inserted the sentence from your comment into the answer. Feel free to keep adding to or improving on your answer (+1).
– whuber
Mar 3, 2016 at 17:49