Exercise 3.3.23. Given measurements show that the best least squares fit to the horizontal line is given by
Answer: This corresponds to the system where is an by 1 matrix with all entries equal to 1 and . To find the least squares solution we form the system . We have
The system thus reduces to so that
NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.
If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fifth Edition and the accompanying free online course, and Dr Strang’s other books.