video_id
stringclasses 7
values | text
stringlengths 2
29.3k
|
|---|---|
PxCxlsl_YwY
|
Q, and R, and I'm wondering,
what is this angle here?
|
PxCxlsl_YwY
|
OK, so, of course,
one solution is to build a
|
PxCxlsl_YwY
|
model and then go and measure
the angle.
|
PxCxlsl_YwY
|
But, we can do better than that.
We can just find the angle
|
PxCxlsl_YwY
|
using dot product.
So, how would we do that?
|
PxCxlsl_YwY
|
Well, so, if we look at this
formula, we see,
|
PxCxlsl_YwY
|
so, let's say that we want to
find the angle here.
|
PxCxlsl_YwY
|
Well, let's look at the formula
for PQdotPR.
|
PxCxlsl_YwY
|
Well, we said it should be
length PQ times length PR times
|
PxCxlsl_YwY
|
the cosine of the angle,
OK?
|
PxCxlsl_YwY
|
Now, what do we know,
and what do we not know?
|
PxCxlsl_YwY
|
Well, certainly at this point
we don't know the cosine of the
|
PxCxlsl_YwY
|
angle.
That's what we would like to
|
PxCxlsl_YwY
|
find.
The lengths,
|
PxCxlsl_YwY
|
certainly we can compute.
We know how to find these
|
PxCxlsl_YwY
|
lengths.
And, this dot product we know
|
PxCxlsl_YwY
|
how to compute because we have
an easy formula here.
|
PxCxlsl_YwY
|
OK, so we can compute
everything else and then find
|
PxCxlsl_YwY
|
theta.
So, I'll tell you what we will
|
PxCxlsl_YwY
|
do is we will find theta -- --
in this way.
|
PxCxlsl_YwY
|
We'll take the dot product of
PQ with PR, and then we'll
|
PxCxlsl_YwY
|
divide by the lengths.
|
PxCxlsl_YwY
|
OK, so let's see.
So, we said cosine theta is
|
PxCxlsl_YwY
|
PQdotPR over length PQ length
PR.
|
PxCxlsl_YwY
|
So, let's try to figure out
what this vector,
|
PxCxlsl_YwY
|
PQ,
well, to go from P to Q,
|
PxCxlsl_YwY
|
I should go minus one unit
along the x direction plus one
|
PxCxlsl_YwY
|
unit along the y direction.
And, I'm not moving in the z
|
PxCxlsl_YwY
|
direction.
So, to go from P to Q,
|
PxCxlsl_YwY
|
I have to move by
***amp***lt;-1,1,0***amp***gt;.
|
PxCxlsl_YwY
|
To go from P to R,
I go -1 along the x axis and 2
|
PxCxlsl_YwY
|
along the z axis.
So, PR, I claim, is this.
|
PxCxlsl_YwY
|
OK, then, the lengths of these
vectors, well,(-1)^2 (1)^2
|
PxCxlsl_YwY
|
(0)^2, square root,
and then same thing with the
|
PxCxlsl_YwY
|
other one.
OK, so, the denominator will
|
PxCxlsl_YwY
|
become the square root of 2,
and there's a square root of 5.
|
PxCxlsl_YwY
|
What about the numerator?
Well, so, remember,
|
PxCxlsl_YwY
|
to do the dot product,
we multiply this by this,
|
PxCxlsl_YwY
|
and that by that,
that by that.
|
PxCxlsl_YwY
|
And, we add.
Minus 1 times minus 1 makes 1
|
PxCxlsl_YwY
|
plus 1 times 0,
that's 0.
|
PxCxlsl_YwY
|
Zero times 2 is 0 again.
So, we will get 1 over square
|
PxCxlsl_YwY
|
root of 10.
That's the cosine of the angle.
|
PxCxlsl_YwY
|
And, of course if we want the
actual angle,
|
PxCxlsl_YwY
|
well, we have to take a
calculator, find the inverse
|
PxCxlsl_YwY
|
cosine, and you'll find it's
about 71.5°.
|
PxCxlsl_YwY
|
Actually, we'll be using mostly
radians, but for today,
|
PxCxlsl_YwY
|
that's certainly more speaking.
OK, any questions about that?
|
PxCxlsl_YwY
|
No?
OK, so in particular,
|
PxCxlsl_YwY
|
I should point out one thing
that's really neat about the
|
PxCxlsl_YwY
|
answer.
I mean, we got this number.
|
PxCxlsl_YwY
|
We don't really know what it
means exactly because it mixes
|
PxCxlsl_YwY
|
together the lengths and the
angle.
|
PxCxlsl_YwY
|
But, one thing that's
interesting here,
|
PxCxlsl_YwY
|
it's the sign of the answer,
the fact that we got a positive
|
PxCxlsl_YwY
|
number.
So, if you think about it,
|
PxCxlsl_YwY
|
the lengths are always
positive.
|
PxCxlsl_YwY
|
So, the sign of a dot product
is the same as a sign of cosine
|
PxCxlsl_YwY
|
theta.
So, in fact,
|
PxCxlsl_YwY
|
the sign of AdotB is going to
be positive if the angle is less
|
PxCxlsl_YwY
|
than 90°.
So, that means geometrically,
|
PxCxlsl_YwY
|
my two vectors are going more
or less in the same direction.
|
PxCxlsl_YwY
|
They make an acute angle.
It's going to be zero if the
|
PxCxlsl_YwY
|
angle is exactly 90°,
OK, because that's when the
|
PxCxlsl_YwY
|
cosine will be zero.
And, it will be negative if the
|
PxCxlsl_YwY
|
angle is more than 90°.
So, that means they go,
|
PxCxlsl_YwY
|
however, in opposite
directions.
|
PxCxlsl_YwY
|
So, that's basically one way to
think about what dot product
|
PxCxlsl_YwY
|
measures.
It measures how much the two
|
PxCxlsl_YwY
|
vectors are going along each
other.
|
PxCxlsl_YwY
|
OK, and that actually leads us
to the next application.
|
PxCxlsl_YwY
|
So, let's see,
did I have a number one there?
|
PxCxlsl_YwY
|
Yes.
So, if I had a number one,
|
PxCxlsl_YwY
|
I must have number two.
The second application is to
|
PxCxlsl_YwY
|
detect orthogonality.
It's to figure out when two
|
PxCxlsl_YwY
|
things are perpendicular.
OK, so orthogonality is just a
|
PxCxlsl_YwY
|
complicated word from Greek to
say things are perpendicular.
|
PxCxlsl_YwY
|
So, let's just take an example.
Let's say I give you the
|
PxCxlsl_YwY
|
equation x 2y 3z = 0.
OK, so that defines a certain
|
PxCxlsl_YwY
|
set of points in space,
and what do you think the set
|
PxCxlsl_YwY
|
of solutions look like if I give
you this equation?
|
PxCxlsl_YwY
|
So far I see one,
two, three answers,
|
PxCxlsl_YwY
|
OK.
So, I see various competing
|
PxCxlsl_YwY
|
answers, but,
yeah, I see a lot of people
|
PxCxlsl_YwY
|
voting for answer number four.
I see also some I don't knows,
|
PxCxlsl_YwY
|
and some other things.
But, the majority vote seems to
|
PxCxlsl_YwY
|
be a plane.
And, indeed that's the correct
|
PxCxlsl_YwY
|
answer.
So, how do we see that it's a
|
PxCxlsl_YwY
|
plane?
|
PxCxlsl_YwY
|
So, I should say,
this is the equation of a
|
PxCxlsl_YwY
|
plane.
So, there's many ways to see
|
PxCxlsl_YwY
|
that, and I'm not going to give
you all of them.
|
PxCxlsl_YwY
|
But, here's one way to think
about it.
|
PxCxlsl_YwY
|
So, let's think geometrically
about how to express this
|
PxCxlsl_YwY
|
condition in terms of vectors.
So, let's take the origin O,
|
PxCxlsl_YwY
|
by convention is the point
(0,0,0).
|
PxCxlsl_YwY
|
And, let's take a point,
P, that will satisfy this
|
PxCxlsl_YwY
|
equation on it,
so, at coordinates x,
|
PxCxlsl_YwY
|
y, z.
So, what does this condition
|
PxCxlsl_YwY
|
here mean?
Well, it means the following
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.