Here, I'm going to treat theta as a vector, so

this is n plus one dimensional vector, and

I'm saying that theta gets here updated as that's a vector, Rn + 1.

Alpha is a real number, and delta, here is a vector.

So, this subtraction operation, that's a vector subtraction, okay?

Cuz alpha times delta is a vector, and so

I'm saying theta gets this vector, alpha times delta subtracted from it.

So, what is a vector delta?

Well this vector delta, looks like this, and

what it's meant to be is really meant to be this thing over here.

Concretely, delta will be a n plus one dimensional vector, and

the very first element of the vector delta is going to be equal to that.

So, if we have the delta, if we index it from 0,

if it's delta 0, delta 1, delta 2, what I want is

that delta 0 is equal to this first box in green up above.

And indeed, you might be able to convince yourself

that delta 0 is this 1 of the m sum of ho(x),

x(i) minus y(i) times x(i) 0.

So, let's just make sure we're on this same page

about how delta really is computed.

Delta is 1 over m times this sum over here, and what is this sum?

Well, this term over here, that's a real number,

and the second term over here, x i,

this term over there is a vector, right,

because x(i) may be a vector that would be,

say, x(i)0, x(i)1, x(i)2,

right, and what is the summation?

Well, what the summation is saying is that,

this term, that is this term over here,

this is equal to, (h of(x(1))-

y(1)) * x(1) + (h of(x(2))-

y(2) x x(2) +, and so on, okay?

Because this is summation of i, so as i ranges from i = 1 through m,

you get these different terms, and you're summing up these terms here.

And the meaning of these terms, this is a lot like if you remember actually

from the earlier quiz in this, right, you saw this equation.

We said that in order to vectorize this code we will instead said u = 2v + 5w.

So we're saying that the vector u is equal to two times the vector v

plus five times the vector w.

So this is an example of how to add different vectors and

this summation's the same thing.

This is saying that the summation over here is just some real number, right?

That's kinda like the number two or some other number times the vector, x1.

So it's kinda like 2v or say some other number times x1, and

then plus instead of 5w we instead have some other real number,

plus some other vector, and then you add on other vectors, plus dot,

dot, dot, plus the other vectors, which is why, over all,

this thing over here, that whole quantity, that delta is just some vector.