# Vector Calculus: Understanding the Dot Product

I see the dot product as directional multiplication. But multiplication goes beyond repeated counting: it's applying the essence of one item to another.

This is a companion discussion topic for the original entry at http://betterexplained.com/articles/vector-calculus-understanding-the-dot-product/

@kalid, you said: “Pretend we’re doing a regular 1-dimensional multiplication, but with “b” as the axis to use –what is the result?”

Now I get it. Basically, you rotate vector ‘a’ to point to the same direction as vector ‘b’. Then you shrink the vector by a factor of “cosine theta”. Then you enlarge the vector by |b| … (only it has stopped being a vector, argh!)

Although…, if you stop thinking about it as multiplying 2 vectors—and instead see it as multiplying a 1X3 matrix with a 3X1 vector—then it easier to see it as just a multiplication. (Really, give me the cross product any day, as it doesn’t change its conceptual meaning as often.)

You are right that parametrisation is non-destructive. But (to use your example) you go from describing a circle in ‘x’ and ‘y’, to describing it in just one parameter ‘t’. Basically, the dot product combines a coordinate transformation and a parametrisation.

Which is why we always encounter dot products in line integrals. We are interested in the work done while moving along a curve inside a vector field (as an example). The coordinate transformation makes sure we only use the component of the vector that’s parallel to the direction we’re moving. The parametrisation makes sure we reduce the number of variables.

Moving away from line integrals. Taking into account the symmetry of the dot product, you’re “multiplication, taking direction into account” might be better described as a partial multiplication due to the fact that the vectors point in different directions. In other words:

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

in that way, it makes clear that it doesn’t matter which of the two vectors you take as axis.

Off course, in the context of line integrals it does matter (at least conceptually) which vector you take as axis, because only one will describe a path.

It is fun to realise that some of the most difficult concepts in mathematics are much easier than we thought. An integral for example is nothing more than an advanced form of an advanced form of addition. LOL.

@alex: Really interesting comments! In my head, the dot product becomes a scalar because it’s the result of a directional multiplication, i.e. “Pretend we’re doing a regular 1-dimensional multiplication, but with “b” as the axis to use --what is the result?”

But, the transition from a vector to a scalar is interesting. So, the thinking is the “parameterization” is how far “a” is going along the curve defined by b (writing a in terms of b).

This is a little funky to me, because I normally think of parameterizations as being non-destructive, i.e. writing a circle as [cos(t), sin(t)] leaves the shape intact, but was defined using a different variable. I might not have the right terminology though.

Maybe another way to put it:

“b defines a path. If we go in direction a, how far do we move along the path?” (We can ignore scaling effects). For the line integrals, we have a curve are moving along – how much energy is going along this path? We can parameterize the input energy [vector a] and say “Oh, now we’re going to rewrite a in terms of how much energy it’s putting along the curve.”

I think it’s a neat idea :). (Glad you enjoyed the integral explanations, I’m constantly refining my understanding of seemingly fundamental operations).

Excellent article, as always. As a current engineering student, I’m going to be eternally grateful that I took my statics and dynamics courses BEFORE vector calculus, so I had a really good intuition on the physical uses of dot and cross products that helped me wrap my head around the mathematical intricacies. Sometimes there’s a benefit to be had from teaching things in the “wrong” order like that. Anyway, keep it up, I look forward to reading your thoughts on the cross product soon–the relationship between the cross product and the determinant is still one of the biggest ‘mystery math’ things out there for me.

Hi Andrea,

No problem, I love these types of discussions! That’s a good question about the sum (vs product, let’s say). My intuition tells me 1) the combination must be symmetric [i.e., x and y should contribute equal amounts] and 2) the combination must be “independent” (if x contribution is zero, y can still have a contribution). The 2 ways (offhand) I can think of are x + y or xy, but xy fails the second test. But this might me trying to scramble and find something which fits :).

Glad you’re enjoying the analogies – I find if I put problems in terms of familiar things, I can see deeper relationships. And you’re right, the letter-by-letter comparison isn’t quite right, because there is some overlap. A better example may be “university” and “universidad” (Spanish), where there seems to be some structure (and many English words can be translated to Spanish by replacing “ity” with “idad”, i.e. unity => unidad).

I really like your map analogy, and your intuitive test of whether you’ve understood a topic. I actually use that one as an example of rote learning vs. insight – if you memorize directions, that’s rote learning, but if you remember the map (and therefore can derive the directions as needed), that’s intuition. There may be deeper levels, i.e. knowing several paths to the same goal, and what would happen if you had taken those alternates. And I agree about us putting the labels after we’ve figured out some interesting, emergent concept – sometimes studying the labels directly seems backwards!

Really appreciate the discussion, hope the law of cosines sheds some light for you (I still don’t have a firm intuition for it, so its derivation is mostly symbol manipulation for me).

Take care,

-Kalid

Hello Nice explanation for Dot product…

But I want the explanation for CROSS PRODUCT too, especially the justification for the definition…

Thanks again

I like to think of the dot product in terms of f.e. pulling a cart… if you pull the cart in direction parallel to the ground then all the force goes to do pulling… but if you pull at some angle to the ground then only \$\$cos(theta)\$\$ goes toward doing pulling work the rest is wasted… so that where dot-product comes…

this is a great work, and a great web site full of ways i always wished to know from someone and never found that someone until accidentally i came across this web site, thank you very much…

Kalid,

Yes, I also thought that when you choose a frame where |b|=by the whole contribution comes from ayby, and therefore it is reasonable to somehow combine axbx and ay*by, but I couldn’t figure out how come the combination turns out to be so simple (just summing the two components). There’s probably something simple I’m failing to see

Thanks for the hint on the law of cosines, it might indeed be the key to answer my question, although the circularity you already spotted out makes me feel suspicious about it. I’ll need to give it some deeper thought!

By the way, I love the way you reason in terms of analogies. Indeed a letter-by-letter comparison of “apple” and “manzana” is not the way to match the two terms, and their semantic association to the concept of apple is fundamental. However, I think the letter-by-letter comparison has also something to give, but I need to change the analogy in order to explain in what sense.

The way I look at math is as a wild island I have to explore. In the beginning, I have no map of the territory. As I proceed with the exploration and discover interesting places, I draw my own map by putting crosses (theorems or concepts) and tracing paths between them (proofs or reasoning lines), trying to find ways that connect all the interesting places.

There might be several ways to get to the same place from the same starting point, and it might not be obvious that some paths lead to the same place. Some might be longer and easier, some harder and shorter. Sometimes I feel surprised by ending up in the same place as I did by following another path; sometimes I’m surprised to end up somewhere different than I thought. That makes me realize I don’t know the territory.

Now given a good map with places and paths (theorems and formal proofs), I am normally (not always!) able to get from anywhere to anywhere, but that’s not enough to say I “know” the island. Instead, if I were able to orienteer well enough to be aware at any time where I am as I follow one path, and where I would be if I would be following an alternative one, that would make me feel confident that I know the territory, as if I could watch the whole island from above. Besides, that’s what I need if I want discover new places or find new ways of my own.

I like this analogy because I do not think mathematical concepts are conceived in the first place as “useful ideas to represent mathematically” (like “weighted parallelism”), and then given a mathematical formulation. I rather believe that they come up as people explore the island, and only after, when it’s clear that these places are frequently visited and somehow useful, they are given a name and (when possible) an interpretation. Like putting a cross and an intuitive label on the map.

But the intuitive label is a sign for tourists, and knowing where the useful places are and what paths lead to them is not enough for an explorer; I want to know where I am on the island as I follow each path, what obstacles I’m going to encounter, what deviations I will likely need to take, and so on. That makes me able to trace a step-by-step (letter-by-letter) comparison of any path.

Anyway, I’ll try to follow the path you pointed me to with the law of cosines and let you know if that will make my map richer! I look forward to your next article

Regards,

Andrea

Dude, I love your site! The way you explain math reads like prose, yet I still feel like I’m learning so much more than I from my classes/textbooks. You are a gifted teacher. I think you need to author a revolutionary math textbook that does not sacrifice clarity in the name of rigor. Your website is the solution to the problem posed in Lockhart’s Lament. Keep doing what you are doing, I only wish I could have discovered this 10 years ago. I probably still would have preferred video games, but who knows.

i lov dis page is so easy 2 undastand simply outstanding

Hi Khalid,

I’m really impressed that someone is doing this intuition thing. I always wanted to write some articles on the necessity of understanding Math physically; guess you beat me to it =P.

I don’t quite understand why one adds all the resolved vectors at the end. When one has resolved all the vectors, shouldn’t it yield a resultant vector? And wouldn’t the magnitude of the resultant vector be the dot product? In which case, one would have sqrt((ayby)^2 + (axbx)^2). I think the confusion is why one can add the magnitude of a vector to another which is perpendicular.

Thanks,
Brian

[…] Vector Calculus: Understanding the Dot Product A vector is “growth in a direction”. The dot product lets us apply the directional growth of one vector to another: the result is how much we went along the original path (positive progress, negative, or zero). […]

@Justin: Thanks for the feedback – it’s really helpful to know what’s working (or not).

It took me a while to realize the cartesian / polar versions as well - now, when I see that “equation foo = equation bar” I really try to see “Ok, what perspective does the foo-side have? The bar side?”.

Yes! What you said about vectors is exactly it – they exist (abstractly) and here are two possible ways to describe it. There’s probably more, but polar/cartesian are the common ones.

Yes, the analogies aren’t 100% for me (probably 90%), shadow is maybe 95%, there might be an even better one out there (as they come in I’ll be amending the article).

Dot product racing sounds like an interesting idea for gameplay mechanics :).

@blub: Great point on the symmetry - it’s something I don’t have the best intuitive grasp for either. For the piece-by-piece it makes algebraic sense. For the “projection” side, not as much – why would the projection of A onto B be the same as B onto A?

One way to think about it: a vector is really a direction and magnitude. When we write (10, 10) that’s really a shorthand for “the 45-degree angle, scaled up some amount – 10x the unit circle”. So when we’re doing the dot product, we can save the scaling for the end (find the projection on the unit circle, then scale up by each amount). Because otherwise, it’s weird that projecting (10,10) onto (200, 0) would give a different result than projecting onto (2000, 0). Why does it matter that the vector being projected “onto” is larger? (That’s why plain “projection” doesn’t click nicely with me).

@nik: Awesome! Yes, the goal for each article is to move beyond mechanical formula applications, glad if it helped!

Hi Andrea, thanks for the comment. I’m similar – I can go from axbx + ayby to |a||b|cos(t), but not vice-versa. I think it’s because I don’t have a good, geometric intuition for the cosine rule (probably a good candidate for another article!).

I really like your phrase “weighted parallelism”, I love finding ways to interpret fundamental operarations (I agree that “dot product” is not enlightening…it’s just then name of the operator symbol!).

My high level intuition is that “weighted parallelism” is a fundamental concept (it exists on its own), which can then reduce to rectangular [axbx + ayby] or polar (|a||b|cos(t)) coordinates. I see it like naming an object in the real world: we can say “apple” or “manzana” (Spanish). It’s true that “apple” and “manzana” are equivalent, but it’s tough see using a “letter-by-letter” comparison. It’s easier to trace the word history to the core concept and see how they’re the same. Similarly, it’s tough to jump directly from rectangular to polar results without moving through the intermediate concept.

That said, we can still try!

Intuitively, I think the key is realizing that “weighted parallelism” must come from both components that could be parallel. In your last example, the “Hey, I need to add ayby" is really "Hey, I need to add any possible contribution from ayby” (i.e., if you decided to choose a different frame where |b| = by, then the entire contribution would be coming from ay*by).

More mechanically, the law of cosines lets us express the cosine in terms of the lengths of a, b and the length between them (“c”). The length between them can be rewritten as (a - b)^2 [where a and b are vectors], which reduces to a^2 + b^2 - 2 (a.b), and this last component (a.b) gives us the magic “axbx + ayby” term. This argument may be a bit circular (using the dot product during a proof of the meaning for the dot product), I’d like to dive into it more as well! Check out the “vector formulation” on this article: http://en.wikipedia.org/wiki/Law_of_cosines

Hope this helps!

Much agreed with blub - the symmetry needs to be exposed more somehow.

I think this is half-exposed with Dot Product: Rotate to baseline, where the x-axis is used as the baseline. Perhaps the symmetry can be partially represented by rotating CCW to a y-axis baseline.

I’ve did some electrical engineering and some computer engineering and plain mathematics and although I’ve never really encountered problems with laws of physics it has almost always been just formulas for me. It’s not like I did not have some way of expressing it but wow do i feel like I actually know stuff now! Know what is actually going on and not just mechanically applying the formulas to get the solution of a problem …

I just found this site and I like it alot, thans! I use the dot product a lot as well and I also think in terms of projection. But, as a matter of fact, I never miss the oportunity to think about the symetry the dot product inherents and I feelit is missing in the text. If you think in terms of projection, you can think “the first vector, projected on the second” or “the second vector, projected on the first.” The point is to understand that both properties are equal and that is not very intuitive!

However, I love your way to use the dot product piecewise for each combination of dimensions and you can explain the distributive property of the operation with it. Very nice, I like it!

I found your description of the different dot product equations as cartesian vs polar based very useful. I only groked that the morning after reading.
Also, the ‘Piece by Piece’ illustrated well why we add only products of the like-for-like axes and discard the rest (because they’re perpendicular and always equal zero!)

What worked for me (after reading ‘Piece by Piece’) is to think of the vectors from an abstract POV - neither as cartesian/polar. From there, we decide whether to decompose down to cartesian/polar. Polar is much more easy to intuit. Cartesian less so, but I think I see it now - you can decompose down to any any basis you like as long as it’s orthonormal - doing so lets you discard the orthogonal pairs of axes and end up with the simple ax.bx+ay.by+az.bz sum. If they aren’t orthonormal then the “optimisation” cannot be done.

I didn’t find the analogies 100% either, but then again I haven’t really found a 100% analogy yet anywhere - I’d like people to share theirs if they have one. The ‘shadow’ one works well, but it’s always the fact that you multiply by the magnitude of the vector you’re projection onto which doesn’t quite fit.

I did find them quite inspiring though, especially that of Mario-Kart. I too noticed that the gameplay might differ from your description, but it’s not too hard to imagine a game world where the dot product would be the resultant behaviour! In fact that might be quite an interesting demo: Dot-product racing.

@wererogue: Thanks for the feedback! You bring up some great points.

1. Yep, projection is only sterile because the term is unfamiliar (but not the concept). Another might be “What is the shadow of one vector on the other?”. One subtlety I should have mentioned was that the dot product gives a plain number (i.e. total energy absorbed) and not a new vector on your own (when I think “projection”, I think getting a new, likely shorter, vector that is in the direction of the first).

2. Awesome, looks like your son will be getting off to a head start

3. The real mario kart boost pads probably just add a constant amount to your speed, irrespective of direction (I should clarify that). My analogy was just to see “Hey, one vector is determining the multiplier effect, and the other the incoming direction.”