I am trying to calculate the m and b values as a best fit to the equation of the line of y=mx + b - see attached notebook.
In the first section of the notebook, I performed the detail calculations manually to obtain the variables of m = 1.1 and b = 1 to create the equation of the line of y = 1.1x + 1.
Then I tried to use two Mathematica functions (QRDecomposition[] and LeastSquares[]) in an attempt to streamline the calculations and ran into problems. I tried to use examples in both Mathematica as well as examples in the WolframU course on Linear Algebra in which I managed to thoroughly confuse myself because none of the new calculations even remotely resembles the calculations or the end results that I performed manually.
If there is one, I would certainly appreciate someone showing me the recommended method of using Mathematica functions to perform the calculations that I performed manually in the first section of the attached notebook.
Thank you,
Mitch Sandlin
QR_Fact.nb (23.2 KB)


