Linear regression using math or machine learning? Why even use machine learning for this?
Linear Regression is Linear Regression regardless of how you calculate/estimate the parameters.
The question becomes significant in case of a large multi-variate dataset where it is not easy/fast/possible to compute the parameters using algebraic equations (aka fitting simple line). In such cases Machine Learning techniques such as Stochastic Gradient Descent (SGD) can be helpful.