In examples I have seen so far which show how to find a line which best fits a set of points, the equations are set out in a matrix form and so I am learning about matrices.
To simplify suppose we have thre points then the eqautions are
x1*m +c = y1
x2*m +c = y2
x3*m + c = y3
(m is the slope, c the offset)
in matrix form we can have (I don't know how to draw a matrix here)
so say this is
X M = Y
Then to remove the X on the left side we need to multiply X by the inverse of X, and to do that we need X to be a square matrix. If X is n x 2 then we can multiply by a matrix D say which is 2 x n to give n x n.
In the examples I have seen D is chosen to be the transpose of X.
Question 1
Why use the transpose of X? couldn't we use any matrix within reason which is 2 x n?
Question 2
How does the whole think work anyhow considering that the measured points will not be exactly on the straight line so really we should write
x1*m +c = y1 + e1
x2*m +c = y2 + e2
x3*m + c = y3 + e3
where e is the error in y.
Is the assumption that if the errors were included in the calculation then they would average out to zero?
The same questions relate to finding the best circle for a set of measured points.
To simplify suppose we have thre points then the eqautions are
x1*m +c = y1
x2*m +c = y2
x3*m + c = y3
(m is the slope, c the offset)
in matrix form we can have (I don't know how to draw a matrix here)
so say this is
X M = Y
Then to remove the X on the left side we need to multiply X by the inverse of X, and to do that we need X to be a square matrix. If X is n x 2 then we can multiply by a matrix D say which is 2 x n to give n x n.
In the examples I have seen D is chosen to be the transpose of X.
Question 1
Why use the transpose of X? couldn't we use any matrix within reason which is 2 x n?
Question 2
How does the whole think work anyhow considering that the measured points will not be exactly on the straight line so really we should write
x1*m +c = y1 + e1
x2*m +c = y2 + e2
x3*m + c = y3 + e3
where e is the error in y.
Is the assumption that if the errors were included in the calculation then they would average out to zero?
The same questions relate to finding the best circle for a set of measured points.
Last edited: