Gradient Descent

Sir, we have seen that the sum of error of predicted and actual output will result a better line. But, how are we sure that this sum of error, will surely give us the line that will pass thrgh most of my points?

you are right it doesnt ensure that line will pass through most points but that the line we get will give predicted value much closer to real value that is by using gradient descent we find line that minimizes the error and most of the time in doing so we end up with a line with points close to real value it doesnt necessarily means passing through most points.

Yes Yash is right. Passing through more points means minimizing the squared error.