Hi, i am on lecture ’ Optimization using Gradient Descent - Least squares with multiple observations’ in lesson 2 and my question is

why are we moving both slope and y-intercept instead if we calculate mean of x datapoint and y datapoint will get one coordinate of slope and then just need to find the y-intercept only to draw linear regression line ? why is both m ,b iteration ?