Mini-Post: Dot Products and Cross Products, and their Equivalent Trig Things.

August 17, 2010

Okay, so, we know (or you should know!) what cross and dot products are for Euclidean spaces.  We use them all the time!  On the daily!  So, I’m sure you’ve seen the equalities

a\cdot b = \|a\|\|b\|\cos(\theta)

\|a\times b\| = \|a\|\|b\|\sin(\theta)

where \theta is the angle between the vectors a and b.  Where do these equalities come from?  Let’s find out.

The Dot Product.

dot

Note that, in the picture above, we have constructed a triangle.  Neat.  Now, if you’re anybody who’s anybody, you are well aware of the Law of Cosines.  Even though I know you can recite it from memory, let’s write it out explicitly below:

x^2 = y^2 + z^2 - 2xy\cos(\theta_{z})

where \theta_{z} is the angle opposite the side z.

Well, we have a triangle here, so let’s apply this.  We get:

(\|a-b\|)^2 = \|a\|^2 + \|b\|^2 - 2\|a\|\|b\|\cos(\theta)

But note that \|x\|^2 = x\cdot x for any x.  That’s convenient.  We can rewrite this equality as

(a-b)\cdot (a-b) = \|a\|^2 + \|b\|^2 - 2\|a\|\|b\|\cos(\theta)

but we can reduce the left side

(a-b)\cdot (a-b) = a\cdot a - a\cdot b - b\cdot a + b\cdot b

= a\cdot a - 2(a\cdot b) + b\cdot b

= \|a\|^2 - 2(a\cdot b) + \|b\|^{2}

and so, we can rewrite this by replacing the left side of the original equation with this one.  We get:

\|a\|^2 - 2(a\cdot b) + \|b\|^{2} = \|a\|^2 + \|b\|^2 - 2\|a\|\|b\|\cos(\theta)

Reducing this, we get

-2(a\cdot b) = -2\|a\|\|b\|\cos(\theta)

whence

a\cdot b = \|a\|\|b\|\cos(\theta)

And this is the equation that we’re used to havin’!  Good.

Cross Product.

For the cross product, we require three dimensions.  So, every vector will be represented by: a = a_{1}i + a_{2}j + a_{3}k, where i,j,k represent the unit vector in the x,y,z direction, respectively.  Note that this is exactly the same as saying a = (a_{1}, a_{2}, a_{3}), but this first way is the usual “physic” notation, and it is slightly easier to work with.  We have the same picture as above in the dot product, and we want to show that

\|a \times b\| = \|a\|\|b\|\sin(\theta)

so, where’s a good place to start?  Well, let’s write everything out.

a\times b = (a_{1}i + a_{2}j + a_{3}k) \times (b_{1}i + b_{2}j + b_{3}k)

Now, let’s distribute.

= a_{1}b_{1}(i\times i) + a_{1}b_{2}(i\times j) + a_{1}b_{3}(i\times k)

+ a_{2}b_{1}(j\times i) + a_{2}b_{2}(j\times j) + a_{2}b_{3}(j\times k)

+ a_{3}b_{1}(k\times i) + a_{3}b_{2}(k\times j) + a_{3}b_{3}(k\times k)

Okay, but what’s i\times i?  If you want to figure it out matrix-wise, you can, but it is just going to turn out to be zero.  We get a lot of things crossing out because of this.  We wind up having the significantly messier expression

= a_{1}b_{2}k - a_{1}b_{3}j - a_{2}b_{1}k + a_{2}b_{3}i + a_{3}b_{1}j - a_{3}b_{2}i

= (a_{2}b_{3} - a_{3}b_{2})i + (a_{3}b_{1} - a_{1}b_{3})j + (a_{1}b_{2} - a_{2}b_{1})k

which is a pretty nice deal, all things considered.

Okay, now, here’s the crazy part.  I’m not going to do everything completely out, but you can write it out on paper if you’d like.  From above, we have

\|a\times b\|^{2} = (a_{2}b_{3} - a_{3}b_{2})^{2} + (a_{3}b_{1} - a_{1}b_{3})^{2} + (a_{1}b_{2} - a_{2}b_{1})^{2}

and this, ugh, is equal to

= a_{2}^{2}b_{3}^{2} - 2a_{2}a_{3}b_{2}b_{3} + a_{3}^{2}b_{2}^{2}

+ a_{3}^{2}b_{1}^{2} - 2a_{1}a_{3}b_{1}b_{3} + a_{1}^{2}b_{3}^{2}

+ a_{1}^{2}b_{2}^{2} - 2a_{1}a_{2}b_{1}b_{2} + a_{1}^{2}b_{2}^{2}

BUT, we can make this much nicer.  This is the part you might wanna scratch out on paper to see that it works:

= (a_{1}^{2} + a_{2}^{2} + a_{3}^{2})(b_{1}^{2} + b_{2}^{2} + b_{3}^{2}) - (a_{1}b_{1} + a_{2}b_{2} + a_{3}b_{3})^{2}

= \|a\|^{2}\|b\|^{2} - (a\cdot b)^{2}

= \|a\|^{2}\|b\|^{2} - \|a\|^{2}\|b\|^{2}\cos^{2}(\theta)

from the dot product identity above, which gives us, finally:

= \|a\|^{2}\|b\|^{2}(1 - \cos^{2}(\theta))

= \|a\|^{2}\|b\|^{2}(\sin^{2}(\theta))

and putting this all together, we get

\|a\times b\|^{2} = \|a\|^{2}\|b\|^{2}(\sin^{2}(\theta))

which, after taking the square root of both sides (since the norm is always positive, we can do such a thing…), reduces to the significantly nicer:

\|a\times b\| = \|a\|\|b\|\sin(\theta)

which is what we’re used to.

Last Note.

I learned a kind of cute way to remember which product is cosine and which is sine; unfortunately, I don’t remember who taught it to me, so they’re gonna get absolutely no credit for it!  Sad.  Either way, I always say to myself:

{\bf \mbox{Cross ain't Cos}}

which means that “cross product isn’t the cosine one…that’s the dot product.”  If you have some other jingle or way to remember it, comment it!

Advertisements

4 Responses to “Mini-Post: Dot Products and Cross Products, and their Equivalent Trig Things.”

  1. Tina said

    It’s a pity you don’t have a donate button! I’d most certainly donate to this brilliant blog! I suppose for now i’ll settle for book-marking and adding your
    RSS feed to my Google account. I look forward to fresh updates
    and will share this site with my Facebook group.
    Talk soon!

  2. It’s usually during these early moments of arrival at the retreat that we get overly excited and perhaps even a bit prone to minor mishaps such as cuts or scrapes. These are merely a few samples of the activities which could necessitate the use of our first aid supplies. In the United States, there are also certain areas that offer sanctuary in times of crisis.

  3. Please do not start off any Email with, “I have just seen your profile. If you already have an online dating subscription, you might feel hesitant in ditching it for a new more specific one that you aren’t really familiar with. The fact is that a number of people use the internet for ulterior motives and it is therefore important to protect yourself from cyber scammers.

  4. We can distinguish four steps in changing our habits or our behavior:
    . If you don’t have basil oil, just crush basil leaves to release the smell.
    Exposing yourself to the facts you are committing to memory at regular intervals after the initial study session will help transfer the
    information from short-term to long-term memory and
    will make it available for years to come.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: