I was trying to understand how linear regression works from scratch. I found a video on linear regression explained by Luis Serrano. From his explanation, I found that a line and y-axis divide the 2D coordinate system into four sections. And there are four cases in which a line will rotate and translate to get to the near to the points.
Case 1: If the point is in the 1st quadrant above the line
Slope will increase = anti-clockwise rotation and
y-intercept will increase = translation upward
Case 2: If the point is in the 2nd quadrant above the line
Slope will decrease = clockwise rotation and
y-intercept will increase = translation upward
Case 3: If the point is in the 3rd quadrant below the line
Slope will increase = anti-clockwise rotation and
y-intercept will decrease = translation downward
Case 4: If point is in the 4th quadrant below the line
Slope will decrease = clockwise rotation and
y-intercept will decrease = translation downward
My question is how to calculate the position of the point with respect to the straight line? I know how to find whether a point is above or below the line by comparing the predicted y value and the original y value with respect to the x value. And according to that, I can do line translation or increase/decrease y-intercept.
But, how can I find where point is, left or right of the y-axis? And according to that how can I relate with line rotation to increase or decrease slope?