Least Squares solution and residuals

In summary, the guy at work is trying to solve a linear equation and asks for help from the "Maths Genius." The "Maths Genius" has access to a computer and can solve the equation using the Solver Tool.
  • #1
Mr_Orsum
6
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
  • #2
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
 
  • #3
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:
 
  • #4
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:
  • #5
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
 

FAQ: Least Squares solution and residuals

What is the Least Squares solution method?

The Least Squares solution method is a mathematical technique used to find the best fit line for a set of data points. It calculates the line that minimizes the sum of the squared distances between the data points and the line.

How is the Least Squares solution calculated?

The Least Squares solution is calculated by finding the values of the slope and intercept that minimize the sum of the squared residuals. The residuals are the differences between the actual data points and the predicted values on the best fit line.

What is the purpose of the Least Squares solution?

The purpose of the Least Squares solution is to find the best fit line for a set of data points. This line can then be used to make predictions and analyze the relationship between the variables in the data.

What are residuals?

Residuals are the differences between the actual data points and the predicted values on the best fit line. They are used to measure the accuracy of the Least Squares solution and can be positive or negative.

How are residuals used to evaluate the Least Squares solution?

Residuals are used to evaluate the Least Squares solution by measuring the distance between the actual data points and the predicted values on the best fit line. A smaller sum of squared residuals indicates a better fit.

Similar threads

Back
Top