00:01
Okay, so what is the least squares? so we're trying to fit a line.
00:05
So the equation of line is y equals c1x plus c2.
00:11
So we want to find c1 and c2.
00:14
So we can write this in matrix form since we have the points.
00:21
So x is the four points, four x points we have.
00:26
So that would be 0, 2, 3, 3 ,000.
00:35
So i'm going to write this as c1, c2.
00:40
So the coefficients of c1 are going to be the x points we have.
00:45
And then c2 is always just one.
00:50
And we know this has to equal 0 2 to 3.
00:55
So this has to equal 1 012.
00:57
1 .2.
01:04
Ok.
01:05
And we want to solve this.
01:06
So this is some a and this is c is equal to b.
01:12
And the way to solve this is to take the a, multiply both sides by a transpose.
01:17
So we want a transpose a is equal to a transpose b.
01:21
So let's solve what this should be.
01:25
So let's do a transpose a.
01:28
So this will be 0, 2, 3, 3, 1 ,111, 1.
01:35
Times 0 2, 3, 3, 1, 1, 1, 1.
01:44
Let's compute what this is.
01:46
So this will end up being a 2x2 matrix.
01:49
So the first one is just going to be the dot product of the norm of 023 squared.
01:56
So that'll be 4 plus 9 plus 9.
02:01
So that'll be 22.
02:07
Yeah, 4 plus 9 plus 9 is 22...