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 tried to combine those 2 formulas but it didn't work. I tried using another case where there are 2 red balls and 2 blue balls only so when combining the formula I got ##\frac{(4-1)!}{2!2!}=\frac{3}{2}## which does not make sense. Is there any formula to calculate cyclic permutation of identical objects or I have to do it by listing all the possibilities? Thanks
Since ##px^9+q## is the factor, then ##x^9=\frac{-q}{p}## will be one of the roots. Let ##f(x)=27x^{18}+bx^9+70##, then: $$27\left(\frac{-q}{p}\right)^2+b\left(\frac{-q}{p}\right)+70=0$$ $$b=27 \frac{q}{p}+70 \frac{p}{q}$$ $$b=\frac{27q^2+70p^2}{pq}$$ From this expression, it looks like there is no greatest value of ##b## because increasing the value of ##p## and ##q## will also increase the value of ##b##. How to find the greatest value of ##b##? Thanks
Back
Top