### Video Transcript

Hey folks! Where we left off, I was talking
about how to compute a three-dimensional cross product between two vectors, π cross
π. Itβs this funny thing where you
write a matrix, whose second column has the coordinates of π£, whose third column
has the coordinates of π€, but the entries of that first column, weirdly, are the
symbols π-hat, π-hat, and π-hat, where you just pretend like those guys are
numbers for the sake of computations.

Then with that funky matrix in
hand, you compute its determinant. If you just chug along with those
computations, ignoring the weirdness, you get some constant times π-hat plus some
constant times π-hat plus some constant times π-hat. How specifically you think about
computing that determinant is kind of beside the point. All that really matters here is
that youβll end up with three different numbers that are interpreted as the
coordinates of some resulting vector. From here, students are typically
told to just believe that the resulting vector has the following geometric
properties: its length equals the area of the parallelogram defined by π and π, it
points in a direction perpendicular to both of π and π, and this direction obeys
the right hand rule in the sense that if you point your forefinger along π and your
middle finger along π then when you stick up your thumb, itβll point in the
direction of the new vector.

There are some brute force
computations that you could do to confirm these facts. But I want to share with you a
really elegant line of reasoning. It leverages a bit of background,
though. So for this video Iβm assuming that
everybody has watched chapter 5 on the determinant and chapter 7 where I introduce
the idea of duality. As a quick reminder, the idea of
duality is that anytime you have a linear transformation from some space to the
number line, itβs associated with a unique vector in that space in the sense that
performing the linear transformation is the same as taking a dot product with that
vector. Numerically, this is because one of
those transformations is described by a matrix with just one row where each column
tells you the number that each basis vector lands on. And multiplying this matrix by some
vector π is computationally identical to taking the dot product between π and the
vector you get by turning that matrix on its side. The takeaway is that whenever
youβre out in the mathematical wild and you find a linear transformation to the
number line you will be able to match it to some vector, which is called the βdual
vectorβ of that transformation, so that performing the linear transformation is the
same as taking a dot product with that vector.

The cross product gives us a really
slick example of this process in action. It takes some effort, but itβs
definitely worth it. What Iβm gonna do is to define a
certain linear transformation from three dimensions to the number line. And it will be defined in terms of
the two vectors π and π. Then, when we associate that
transformation with its dual vector in 3D space, that dual vector is gonna be the
cross product of π and π. The reason for doing this will be
that understanding that transformation is going to make clear the connection between
the computation and the geometry of the cross product.

So to back up a bit, remember in
two dimensions what it meant to compute the 2D version of the cross product? When you have two vectors π and
π, you put the coordinates of π as the first column of the matrix and the
coordinates of π as the second column of matrix, then you just compute the
determinant. Thereβs no nonsense with basis
vectors stuck in a matrix or anything like that, just an ordinary determinant
returning a number. Geometrically, this gives us the
area of a parallelogram spanned out by those two vectors with the possibility of
being negative depending on the orientation of the vectors. Now, if you didnβt already know the
3D cross product and youβre trying to extrapolate, you might imagine that it
involves taking three separate 3D vectors π, π, and π and making their
coordinates the columns of a three-by-three matrix, then computing the determinant
of that matrix. And, as you know from chapter 5,
geometrically, this would give you the volume of a parallelepiped spanned out by
those three vectors, with the plus or minus sign depending on the right-hand rule
orientation of those three vectors. Of course, you all know that this
is not the 3D cross product. The actual 3D cross product takes
in two vectors and spits out a vector. It doesnβt take in three vectors
and spit out a number. But this idea actually gets us
really close to what the real cross product is.

Consider that first vector π to be
a variable, say with variable entries π₯, π¦, and π§, while π and π remain
fixed. What we have then is a function
from three dimensions to the number line. You input some vector β π₯, π¦, π§
β and you get out a number by taking the determinant of a matrix whose first column
is π₯, π¦, π§ and whose other two columns are the coordinates of the constant
vectors π and π. Geometrically, the meaning of this
function is that for any input vector π₯, π¦, π§, you consider the parallelepiped
defined by this vector π and π then you return its volume with the plus or minus
sign depending on orientation. Now, this might feel like kind of a
random thing to do. I mean, where does this function
come from? Why are we defining it this
way? And Iβll admit at this stage it
might kinda feel like itβs coming out of the blue. But if youβre willing to go along
with it and play around with the properties that this guy has, itβs the key to
understanding the cross product. One really important fact about
this function is that itβs linear. Iβll actually leave it to you to
work through the details of why this is true based on properties of the
determinant. But once you know that itβs linear,
we can start bringing in the idea of duality.

Once you know that itβs linear you
know that thereβs some way to describe this function as matrix multiplication. Specifically, since itβs a function
that goes from three dimensions to one dimension, there will be a one-by-three
matrix that encodes this transformation. And the whole idea of duality is
that the special thing about transformations from several dimensions to one
dimension is that you can turn that matrix on its side and, instead, interpret the
entire transformation as the dot product with a certain vector. What weβre looking for is the
special 3D vector that Iβll call π such that taking the dot product between π and
any other vector π₯, π¦, π§ gives the same result as plugging in π₯, π¦, π§ as the
first column of a three-by-three matrix whose other two columns have the coordinates
of π and π, then computing the determinant. Iβll get to the geometry of this in
just a moment. But right now, letβs dig in and
think about what this means computationally. Taking the dot product between π
and π₯, π¦, π§ will give us something times π₯ plus something times π¦ plus
something times π§, where those somethings are the coordinates of π. But on the right side here, when
you compute the determinant, you can organize it to look like some constant times π₯
plus some constant times π¦ plus some constant times π§ where those constants
involve certain combinations of the components of π£ and π€. So, those constants, those
particular combinations of the coordinates of π£ and π€ are going to be the
coordinates of the vector π that weβre looking for.

But whatβs going on the right here
should feel very familiar to anyone whoβs actually worked through a cross-product
computation. Collecting the constant terms that
are multiplied by π₯, π¦, and π§ like this is no different from plugging in the
symbols π-hat, π-hat, and π-hat to that first column and seeing which
coefficients aggregate on each one of those terms. Itβs just that plugging in π-hat,
π-hat, and π-hat is a way of signaling that we should interpret those coefficients
as the coordinates of a vector. So, what all of this is saying is
that this funky computation can be thought of as a way to answer the following
question: what vector π has the special property that when you take a dot product
between π and some vector π₯, π¦, π§ it gives the same result as plugging in π₯,
π¦, π§ to the first column of the matrix whose other two columns have the
coordinates of π£ and π€, then computing the determinant? Thatβs a bit of a mouthful. But itβs an important question to
digest for this video.

Now for the cool part which ties
all this together with the geometric understanding of the cross product that I
introduced last video. Iβm gonna ask the same question
again. But this time, weβre gonna try to
answer it geometrically instead of computationally. What 3D vector π has the special
property that when you take a dot product between π and some other vector π₯, π¦,
π§ it gives the same result as if you took the signed volume of a parallelepiped
defined by this vector π₯, π¦, π§ along with π£ and π€? Remember, the geometric
interpretation of a dot product between a vector π and some other vector is to
project that other vector onto π then to multiply the length of that projection by
the length of π. With that in mind, let me show a
certain way to think about the volume of the parallelepiped that we care about. Start by taking the area of the
parallelogram defined by π and π, then multiply it not by the length of π₯, π¦,
π§, but by the component of π₯, π¦, π§ thatβs perpendicular to that
parallelogram.

In other words, the way our linear
function works on a given vector is to project that vector onto a line thatβs
perpendicular to both π and π then to multiply the length of that projection by
the area of the parallelogram spanned by π and π. But this is the same thing as
taking a dot product between π₯, π¦, π§ and a vector thatβs perpendicular to π and
π with a length equal to the area of that parallelogram. Whatβs more, if you choose the
appropriate direction for that vector, the cases where the dot product is negative
will line up with the cases where the right hand rule for the orientation of π₯, π¦,
π§, π£ and π€ is negative.

This means that we just found a
vector π so that taking a dot product between π and some vector π₯, π¦, π§ is the
same thing as computing that determinant of a three-by-three matrix whose columns
are π₯, π¦, π§, the coordinates of π£ and π€. So, the answer that we found
earlier, computationally, using that special notational trick must correspond
geometrically to this vector. This is the fundamental reason why
the computation and the geometric interpretation of the cross product are
related.

Just to sum up what happened here I
started by defining a linear transformation from 3D space to the number line, and it
was defined in terms of the vectors π and π, then I went through two separate ways
to think about the βdual vectorβ of this transformation, the vector such that
applying the transformation is the same thing as taking a dot product with that
vector.

On the one hand, a computational
approach will lead you to the trick of plugging in the symbols π-hat, π-hat, and
π-hat to the first column of the matrix and computing the determinant. But thinking geometrically, we can
deduce that this dual vector must be perpendicular to π and π with a length equal
to the area of the parallelogram spanned out by those two vectors. Since both of these approaches give
us a dual vector to the same transformation, they must be the same vector. So that wraps up dot products and
cross products. And the next video will be a really
important concept for linear algebra: change of basis.