I studied this at school about a month ago. It isn't hard to understand, especially if you are not as bad as me. Let us start with a point (x,y) and a line, determined by the points (x1,y1) and (x2,y2). Now we need a determinant.
This is what we have now. To be honest, I do not know why the determinant is like that, so... I am sorry. It is not hard to remember the determinant itself, though.
Are you asking yourself what you should do with the determinant now, when you have it? Well, that is what we are supposed to do... First, we pick the first 2 columns and duplicate them onto the right side of the determinant. (figure 1)
Now it is time to do what is on figure 2. I will try to explain...
What we are doing now is finding/calculating the value of the determinant. ( I have named it "SUM" ). Let us say that the value of a diagonal is the multiplication of the x's and y's in it. (including x1, y1, etc.) And this is where we need the 1s. They do not do anything, though they are like empty space, helping us calculate the value.
So, the determinant value is simply the sum of the values of the blue diagonals minus the sum of the values of the red diagonals.
And there you have it - your very own formula. A, B and C are different parts of it. A is the coefficient of x, B is the coefficient of y and C is the rest.
What we are doing now is finding/calculating the value of the determinant. ( I have named it "SUM" ). Let us say that the value of a diagonal is the multiplication of the x's and y's in it. (including x1, y1, etc.) And this is where we need the 1s. They do not do anything, though they are like empty space, helping us calculate the value.
So, the determinant value is simply the sum of the values of the blue diagonals minus the sum of the values of the red diagonals.
And there you have it - your very own formula. A, B and C are different parts of it. A is the coefficient of x, B is the coefficient of y and C is the rest.
A = y1 - y2
B = x2 - x1
C = x1y2 - x2y1
And now here comes the "easy" part - telling whether the point is in the line, in the one half-plane determined by the line, or in the other one.
- If the value of the determinant is 0, then the point belongs to the line.
- If the value is positive, the point is in one half-plane.
- If negative, it is in the other one.