Then what we can do,

is we can then sort that out.

So we've got multiply that out.

So we've got r_1, s_1,

plus r_1, t_1, plus r_2, s_2,

plus r_2, t_2, plus

all the ones in between r_n and s_n, plus r_n, t_n.

Then we can collect it together.

So we've got the r_1, s_1 times r_2,

s_2, all the way to r_n,

s-n. That's of course,

just equal to r dotted with

s. If we collect the r_t terms together,

we've got r_1, t with t_1, r_2,

t_2, all the ones in between r_n, t_n.

That's just r dotted with

t. So we've demonstrated that this is in fact true,

that you can pull out plus signs and dots in this way,

which is called being distributed over addition.

The third thing we're going to

look at is what's called associativity.

So that is, if we take a vector, a dot product,

and we've got r dotted with some multiple of s,

where a is just a number,

it's just a scalar number.

So we're multiplying s by a scalar.

What we're going to say is that,

that is equal to a times r dotted with

s. That means that it's

associative over scalar multiplication.

We can prove that quite easily, just in the 2D case.

So if we say we've got r_1 times a

s_1 plus r_2 times a s_2,

that's the left-hand side,

just for a two-dimensional vector.

Then we can pull the a out.

So we can take the a out of both of these,

happens then we've got r_1,

s_1, plus r_2, s_2.

That's just r.s, a times r.s.

So this is in fact true.

So we've got our three properties

that the dot product

is commutative. We can interchange it.

Is distributed over addition,

which is this expression, and its

associative over scalar multiplication.

We can just pull out scalar numbers out.

As an aside, sometimes you'll see people in

physics and engineering write vectors in bold,

numbers or scalars in normal font or they'll underline

their vectors to easily distinguish

them from things that have scalars.

Whereas in math and computer science,

people don't tend to do that.

It's just the notation difference

between different communities,

and it's not anything fundamental to worry about.

The last thing we need to do before we can move on is,

draw out a link between

the dot product and the length or modulus of a vector.

If I take a vector and dot it with itself,

so r dotted with r,

what I get is just the sums

of the squares of its components.

So I get r_1 times r_1,

plus r_2 times r_2,

and all the others if there were all the others.

So I get r-1 squared plus r_2 squared.

Now that's quite interesting because that

means if I take the dot product of a vector with itself,

I get the square of its size of its modulus.

So that equals r_1 plus r_2 squared,

square rooted, all squared.

So that's mod r squared.

So if we want to get the size of a vector,

we can do that just by dotting

the vector with itself and taking the square root.

That's really neat and

really hopefully, quite satisfying.