Least Squares solution and residuals

AI Thread Summary
The discussion revolves around solving a set of linear equations using the Least Squares method and calculating the residuals. The equations provided include three variables and four equations, presenting a challenge for those unfamiliar with the method. Participants share resources, including a Khan Academy video and a MathWorks PDF, to aid understanding of matrix transposition and the Least Squares approach. Additionally, the use of Excel's Solver Tool is suggested as a practical way to minimize the residuals by adjusting the variables. Overall, the conversation highlights the need for guidance in applying mathematical concepts to real-world problems.
Mr_Orsum
Messages
6
Reaction score
0

Homework Statement



Solve the following linear equations simultaneously by the Least Squares solution and calculate the residuals.

Homework Equations



3x + 2y + z = 5

x + 6y - z = -7

x - y + 2z = 3

5x - 2y = 1


The Attempt at a Solution



This is a question from this guy at work who is studying to be a surveyor. He knows me as the "Maths Genius" because I recently finished high school and got Valedictorian. He is really old and doesn't really get computers/internet. However I didn't learn this sort of thing in high school, and after watching this [http://www.youtube.com/watch?v=8mAZYv5wIcE]khanacademy[/test] vid, I only understood the Matrix forms but know nothing of the A transpose. Any help is appreciated.
 
Physics news on Phys.org
The transpose of a matrix A is a matrix formed from A by interchanging the rows and columns such that row i of matrix A becomes column i of the transposed matrix. The transpose of A is denoted by AT. Multiplying a matrix A with its transposed you get a square matrix.

ehild
 
Hey ehild,

Thanks for the information. I found a bit more info on AT and I understand that part of it now. But I still don't understand the rest. A friend of mine is in his first year at uni and has dealt with some of it but doesn't know anything about the Least squares method or how to calculate residuals. Any info is appreciated, even something to point me in the right direction. I am happy to learn :smile:
 
This least squares problem is more general than the method used for curve fitting and I am familiar with. Try to read:

http://www.mathworks.com/moler/leastsquares.pdf

ehild
 
Last edited by a moderator:
If you have access to EXCEL (or similar open-source spreadsheets) you can solve this directly using the Solver Tool: you want to minimize (3x+2y+z-5)^2+ ... +(5x-2y-1)^2, by varying x, y and z. Solver can handle such problems readily, up to a few hundred variables and equations.

RGV
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...
Back
Top