I think of the dot product as directional multiplication. Multiplication goes beyond repeated counting: it's applying the essence of one item to another. (For example, complex multiplication is rotation, not repeated counting.)

When dealing with simple growth rates, multiplication scales one rate by another:

- "3 x 4" can mean "Take your 3x growth and make it 4x larger, to get 12x"

When dealing with vectors ("directional growth"), there's a few operations we can do:

**Add vectors:**Accumulate the growth contained in several vectors.**Multiply by a constant**: Make an existing vector stronger (in the same direction).**Dot product:**Apply the directional growth of one vector to another. The result is how much stronger we've made the original vector (positive, negative, or zero).

Today we'll build our intuition for how the dot product works.

## Getting the Formula Out of the Way

You've seen the dot product equation everywhere:

And also the justification: "Well Billy, the Law of Cosines (you remember that, don't you?) says the following calculations are the same, so they are." Not good enough -- it doesn't click! Beyond the computation, what does it mean?

The goal is to apply one vector to another. The equation above shows two ways to accomplish this:

- Rectangular perspective: combine x and y components
- Polar perspective: combine magnitudes and angles

The "this stuff = that stuff" equation just means "Here are two equivalent ways to 'directionally multiply' vectors".

## Seeing Numbers as Vectors

Let's start simple, and treat 3 x 4 as a dot product:

The number 3 is "directional growth" in a single dimension (the x-axis, let's say), and 4 is "directional growth" in that same direction. 3 x 4 = 12 means we get 12x growth in a single dimension. Ok.

Now, suppose 3 and 4 refer to different dimensions. Let's say 3 means "triple your bananas" (x-axis) and 4 means "quadruple your oranges" (y-axis). Now they're not the same type of number: what happens when apply growth (use the dot product) in our "bananas, oranges" universe?

- (3,0) means "Triple your bananas, destroy your oranges"
- (0,4) means "Destroy your bananas, quadruple your oranges"

Applying (0,4) to (3,0) means "Destroy your banana growth, quadruple your orange growth". But (3, 0) had no orange growth to begin with, so the net result is 0 ("Destroy all your fruit, buddy").

See how we're "applying" and not simply adding? With regular addition, we smush the vectors together: (3,0) + (0, 4) = (3, 4) [a vector which triples your oranges *and* quadruples your bananas].

"Application" is different. We're mutating the original vector based on the rules of the second. And the rules of (0, 4) are "Destroy your banana growth, and quadruple your orange growth." When applied to something with only bananas, like (3, 0), we're left with nothing.

The final result of the dot product process can be:

- Zero: we don't have any growth in the original direction
- Positive number: we have some growth in the original direction
- Negative number: we have negative (reverse) growth in the original direction

## Understanding the Calculation

"Applying vectors" is still a bit abstract. I think "How much energy/push is one vector giving to the other?". Here's how I visualize it:

**Rectangular Coordinates: Component-by-component overlap**

Like multiplying complex numbers, see how each x- and y-component interacts:

We list out all four combinations (x with x, y with x, x with y, y with y). Since the x- and y-coordinates don't affect each other (like holding a bucket sideways under a waterfall -- nothing falls in), the total energy absorbtion is absorbtion(x) + absorbtion(y):

**Polar coordinates: Projection**

The word "projection" is so sterile: I prefer "along the path". How much energy is actually going in our original direction?

Here's one way to see it:

Take two vectors, a and b. Rotate our coordinates so b is horizontal: it becomes (|b|, 0), and everything is on this new x-axis. What's the dot product now? (It shouldn't change just because we tilted our head).

Well, vector a has new coordinates (a1, a2), and we get:

a1 is really "What is the x-coordinate of a, assuming b is the x-axis?". That is |a|cos(θ), aka the "projection":

## Analogies for the Dot Product

The common interpretation is "geometric projection", but it's so bland. Here's some analogies that click for me:

**Energy Absorbtion**

One vector are solar rays, the other is where the solar panel is pointing (yes, yes, the normal vector). Larger numbers mean stronger rays or a larger panel. How much energy is absorbed?

- Energy = Overlap in direction * Strength of rays * Size of panel

If you hold your panel sideways to the sun, no rays hit (cos(θ) = 0).

But... but... solar rays are leaving the sun, and the panel is facing the sun, and the dot product is negative when vectors are opposed! Take a deep breath, and remember the goal is to embrace the analogy (besides, physicists lose track of negative signs all the time).

**Mario-Kart Speed Boost**

In Mario Kart, there are "boost pads" on the ground that increase your speed (Never played? I'm sorry.)

Imagine the red vector is your speed (x and y direction), and the blue vector is the orientation of the boost pad (x and y direction). Larger numbers are more power.

How much boost will you get? For the analogy, imagine the pad multiplies your speed:

- If you come in going 0, you'll get nothing [if you are just dropped onto the pad, there's no boost]
- If you cross the pad perpendicularly, you'll get 0 [just like the banana obliteration, it will give you 0x boost in the perpendicular direction]

But, if we have some overlap, our x-speed will get an x-boost, and our y-speed gets a y-boost:

Neat, eh? Another way to see it: your incoming speed is |a|, and the max boost is |b|. The amount of boost you actually get (for being lined up with it) is $\cos(\theta)$, for the total $|a||b|\cos(\theta)$.

**Physics Physics Physics**

The dot product appears all over physics: some field (electric, gravitational) is pulling on some particle. We'd love to multiply, and we could if everything were lined up. But that's never the case, so we take the dot product to account for potential differences in direction.

It's all a useful generalization: Integrals are "multiplication, taking changes into account" and the dot product is "multiplication, taking direction into account".

And what if your direction is changing? Why, take the integral of the dot product, of course!

## Onward and Upward

Don't settle for "Dot product is the geometric projection, justified by the law of cosines". Find the analogies that click for you! Happy math.

## Other Posts In This Series

- Vector Calculus: Understanding the Dot Product
- Vector Calculus: Understanding the Cross Product
- Vector Calculus: Understanding Flux
- Vector Calculus: Understanding Divergence
- Vector Calculus: Understanding Circulation and Curl
- Vector Calculus: Understanding the Gradient
- Understanding Pythagorean Distance and the Gradient

wererogueFebruary 27, 2012 at 5:58 pmThis can be a really tough one, and to be honest I don’t find many of the analogies very useful. I’m a video game programmer so I need the dot product a lot, and I still find it easiest to think in terms of projection, as sterile as it may sound. I think of the dot product as the component of the first vector in the direction of the second. Or, if you think of the second vector as a hyperplane (more sterile, mathematical terms), how long would the first vector be projected onto it?

I love this site, and I don’t comment often, but I think you do a great job, and I’m sure I’ll be pointing my son at your articles before too long (he’s nearly 1)

As a matter of professional curiosity, are you certain that the Mario Kart boost pads only give you a boost proportional to your alignment? Or do they just give you a constant boost so long as you are crossing them in the correct direction?

kalidFebruary 27, 2012 at 6:23 pm@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.”

JustinFebruary 28, 2012 at 1:25 amI’m no expert but just giving my 2c regarding my experience of reading this article:

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. :)

blubFebruary 28, 2012 at 2:02 amI 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!

JustinFebruary 28, 2012 at 5:16 amMuch 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.

nikFebruary 28, 2012 at 5:30 amI’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 …

kalidFebruary 28, 2012 at 4:16 pm@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!

Vector Calculus: Understanding the Dot Product | Code DumpFebruary 29, 2012 at 5:17 pm[…] 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). […]

prince abdullah abubakarMarch 2, 2012 at 12:06 pmi lov dis page is so easy 2 undastand simply outstanding

Daniel PearcyMarch 4, 2012 at 5:59 amGreat post – I really liked the stpe-by-step breakdown of the different ways to look at it and I could imagine that the mario kart example would go down really well in class.

mark ptakMarch 4, 2012 at 7:41 amI found this discussion refreshing especially when combined with Professor Strang’s Linear Algebra Course on MIT open courses. Also having spent my first Saturday Night with AdaFruit I loved the kill your fruit analogy. As you fill this out a comparison with the cross product and some of the geometry of “in the plane” versus out of the plane would be great. Before I started to regularly come to this site to have my mind blown I did it on such simple realization as “the cross product of any two vectors in a plane gets you a vector normal to the plane.” Off to make some fruit salad…

kalidMarch 4, 2012 at 1:07 pm@mark: Thanks for dropping by! Ah, I remember we used Prof. Strang’s book in our course too, sadly I don’t remember enough linear algebra (especially an intuition for eigenvectors / eigenvalues) but I’m looking forward to getting re-acquainted with it :).

@Daniel: Thanks — if you end up trying it, I’d love to know how it worked out! I’m still looking for really vivid analogies of what’s happening.

alexMarch 9, 2012 at 1:45 pmOne of the most difficult things in mathematics isn’t failing to understand the initial concept (the one we’re first introduced to at school). Instead, the difficult thing in mathematics is to understand the generalised concept. You seem to have covered everything—and it was useful to me—but I don’t believe you’ve explained very well why it becomes a scalar.

Lets rewrite the first equation a bit:

vec{a} cdot vec{b} divided by |vec{b}| = |vec{a}| cos(theta)

or in words (arguing from the right side of the equation): to get the magnitude of the component of vector a in the direction of vector b, take the dot product of vectors a and b and divide by the magnitude of vector b. (Remember that “vec{b} / |vec{b}|” is the unit vector e_b.) This sounds remarkably similar to a coordinate transformation, specifically from polar to Cartesian coordinates. (I know you mention it, sorry)

But there is a second transformation happening at the same time. We’re changing from vectors to scalars. The “projection” doesn’t really explain that (at least it never did to me). Your question is better: “What is the x-coordinate of a, assuming b is the x-axis?” The thing to remember though, is that we’re simultaneously applying a parametrisation! That is why the dot product occurs in Line Integrals!

To summarise:

Step 1: take the component of vector a in the direction of vector b (it’s still a vector)

Step 2: alter the size of said component by multiplying it with |b|. (it’s still a vector)

Step 3: apply parametrisation to change it from a vector to a scalar.

That last part makes sense out of Line Integrals involving Work (and Energy): we’re parametrising vector a along curve C (which is defined by position vector b)

Hope it helps! (And I hope I didn’t make any mistakes.)

alexMarch 9, 2012 at 1:59 pmI forgot to mention that the context of the dot product determines whether its symmetry is important; whether its parametrisation is important; … and so on. The context also determines what we’re multiplying—and what our result represents (e.g. your: “What is the x-coordinate of a, assuming b is the x-axis?”).

Which is why I always had difficulty with the dot product. The dot product of a vector with itself, is conceptually completely different. Especially when you contrast it with the use of a dot product in line integrals.

Thanks.

P.S. Love your integral explanations:

Integrals are “multiplication, taking changes into account”; and…

the dot product is “multiplication, taking direction into account”.; and…

Line integrals are “multiplication, taking into account changes both in magnitude and direction”.

kalidMarch 9, 2012 at 3:22 pm@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).

alexMarch 9, 2012 at 6:21 pm@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.

alexMarch 10, 2012 at 2:15 pmI thought some more about this. Your explanation lead me to try and wrap my head around line integrals and their use of the dot product. But…

You are absolutely right that the dot product in itself is just multiplication taking direction into account. Changing the vector notation into matrix notation makes that clear. And yet…

I asked myself: Why do we use the dot product? Well, we want an answer to a specific question, don’t we? That got me thinking about what vectors represent; which is “magnitude” and “direction”. So, when we multiply vectors we multiply both magnitude and direction.

Except…we don’t always care equally about magnitude and direction! When we only care about the magnitude of vectors, we don’t even bother with vector notation!

In the case of the dot product we care about the direction of vector ‘a’ with respect to vector ‘b’ (the direction of vector ‘b’ with respect to vector ‘a’). In other words we care about the RELATIVE DIRECTION—which explains why it is a scalar.

This raises the question: “How do we multiply vectors when we care about the absolute direction?” For a two dimensional vector the answer is easy; we convert the vector to a complex number and multiply complex number ‘a’ with complex number ‘b’.

In a similar way, this explains the multiplication of a Nx1 matrix with a 1xN matrix to get a NxN matrix. But in this case, we care about multiple direction (instead of relative direction, or absolute direction). The Jacobian is a good example.

Similarly, the cross product. We care about direction, but we only care about the direction perpendicular to both vector ‘a’ and vector ‘b’.

So vector multiplication is about multiplying a pair of numbers (magnitude and direction), whereby we take into account ‘direction’ to varying degrees.

To summarise, I would suggest changing “…the dot product is ‘multiplication, taking direction into account’.” into:

The dot product is multiplication while taking relative direction (or the difference in direction) into account.

Anyway, thank you for explanations like these. They help me to understand the basic mathematical idea—instead of the more specific physical idea—behind mathematical concepts like these.

Thanks.

JoeMarch 10, 2012 at 10:10 pmExcellent 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.

kalidMarch 12, 2012 at 8:44 pm@alex:

Yep, totally agree with the grouping — it shows the symmetry by thinking of a onto b, or b onto a. And yep, with line integrals, you usually have a defined Force and Path vector (it’s not as intuitive to project the Path onto the Force).

I love breaking down complicated ideas into easy-to-digest parts… yep, the integral is a wrapper around the idea of “applying” something piece by piece (of which multiplication and repeated addition are very simple base cases).

On the vector notation: I guess it depends on how deep you want to go :). For me, I take it as an axiom that “we want to figure out how much one vector pushes in the direction of the other, it will be a single number (called the dot product) and here’s why it should be what it is (i.e., x and y components interacting)”

Yes, relative direction is a good way to put it — the absolute doesn’t matter. In a system of relative coordinates (just angles between them), what do we know about the force of one onto the other? (Interestingly, I stumbled upon the concept of coordinate-free geometry today).

When we care about absolute direction, yep, we want different results when vectors that are 90 degrees apart but oriented differently are combined. I think we need to be careful with complex numbers though (for terminology) since the typical dot product gives 0 when perpendicular, but complex numbers do a rotation.

I might tweak it to “the dot product is multiplication, taking the difference in direction into account”. (I’ll have to tweak it). WIth all of these 1-liners, it’s a tradeoff between an immediate click vs. getting into too much detail.

And the feeling for these discussions is mutual, I love exploring these ideas!

@Joe: Thanks Joe. I agree, there’s an interplay between theory and application (I learned vector calc before E&M, and having physics examples definitely solidified my earlier understanding). I don’t think you can teach in some pyramid where the base ideas are learned, divorced from examples, and then the applications are sprinkled in later.

Appreciate the encouragement, I’d love to do the cross product & determinant in the future! (Two concepts I really, really want to get an intuition for & not just the mechanical calculation).

ShaunMarch 13, 2012 at 10:35 pmI’d love to feature this post in the Math and Multimedia Carnival #21 on my site, Math Concepts Explained. Please let me know! My site is at http://sk19math.blogspot.com. Thanks!

kalidMarch 13, 2012 at 11:01 pm@Shaun: Definitely! I’ve emailed you as well, but feel free to use the content as you need. Thanks for asking!

Vector Calculus: Understanding the Dot Product | HTML5 Game DevelopmentMarch 19, 2012 at 6:59 am[…] http://betterexplained.com/articles/vector-calculus-understanding-the-dot-product/ RedditBufferShareEmailPrintFacebookDiggStumbleUpon […]

andreaMay 17, 2012 at 7:33 amKalid, thanks for the great article and even more for your wonderful “mission” :)

There’s still something that doesn’t click to me about the dot product, hopefully you’ll be able to give me a hint.

Formally, I can see that the two definitions, ax*bx+ay*by and |a||b|cos(t), are equivalent. Given what I expect to be the meaning of the dot product, I can figure out why summing the products of pairwise parallel components and multiplying the vector lengths times cos(t) both “make sense”, but it’s not straightforward for my intuition to realize why do they make exactly the same sense. Why are those reasonable measures of “weighted parallelism” (i’m just trying to give a more meaningful name to the dot product than “dot product”, but it doesn’t really matter) exactly the same?

My only way to help intuition is to have intuitive arguments to derive (1) the latter from the former and (2) the former from the latter (I’m not talking about formal proofs here, those are available everywhere). Thanks to your great article, I can now see path (1), but I still miss an intuition for path (2).

More precisely, I can see that ax*bx+ay*by is invariant wrt to rotation, and therefore I can choose one particular frame where bx=|b|, by=0 and ax=a*cos(t), which leads to |a||b|cos(t). That’s path (1) and it gives my intuition a strong hint on the equivalence of the two definitions. Thank you for that.

However, should I start from |a||b|cos(t) and try to derive ax*bx+ay*by, I’d be kind of lost. I could make it to the point that, being |a||b|cos(t) obviously invariant wrt to rotation as well, I could fix one frame where |b|=bx and |a|cos(t)=ax, and that would cover the ax*bx part, which in this particular frame gives the value of the dot product. But what’s the intuition that makes me generalize it to ax*bx+ay*by? How do I come to the point that I tell myself “hey, of course I need to add the “ay*by” there!”?

Thank you once again for your great contributions :)

Regards,

Andrea

kalidMay 19, 2012 at 4:21 pmHi Andrea, thanks for the comment. I’m similar — I can go from ax*bx + ay*by 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 [ax*bx + ay*by] 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 ay*by” is really “Hey, I need to add any *possible* contribution from ay*by” (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 “ax*bx + ay*by” 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! :)

andreaMay 21, 2012 at 2:34 amKalid,

thanks a lot for your answer!

Yes, I also thought that when you choose a frame where |b|=by the whole contribution comes from ay*by, and therefore it is reasonable to somehow combine ax*bx 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

kalidMay 23, 2012 at 1:00 amHi 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 x*y, but x*y 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

BrianAugust 19, 2012 at 7:46 pmHi 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

kalidAugust 21, 2012 at 12:41 am@Brian: Glad you’re enjoying it. Don’t let this site stop you though, I want to read your insights too (love seeing how people approach things).

Great question on why we don’t end up with a vector. There’s a few ways to interpret how one vector “overlaps” with another. The dot product is a horrible name because it doesn’t tell anything *about* the overlap, just the name of the symbol used (woohoo). The idea is to say “How much does vector A push in the direction of the vector B?”. There is an implicit vector here (the reference vector, B), so the operation just gives the size.

The adding of components is basically breaking each vector (A and B) into parts, and seeing how each part might possibly push in the same direction. It turns out, only the horizontal parts can push in the same direction (ax * bx) and only the vertical parts can push in the same direction (ay * by). The combined “push” is the sum of how much each axis is pushing. Hope this helps!

preethiJanuary 7, 2017 at 2:17 amI’m still confused about the direction of the DOT product which you have mentioned as implicit. Can you explain the same with the Mario-Kart speed example?

Caio OliveiraMarch 25, 2017 at 4:11 pmHey, maybe this will help you out: https://www.youtube.com/watch?v=LyGKycYT2v0

AvoAugust 23, 2012 at 9:21 pmDude, 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.

kalidAugust 25, 2012 at 3:33 pm@Avo: Thanks so much. That’s exactly what I wanted — math as a story, something interesting to follow, not a dry series of steps. Really appreciate the encouragement!

Heh, it’s not a choice between learning and video games, you can do both :).

AvoAugust 26, 2012 at 7:18 pmI get the projection aspect of it — I see why projecting vector a onto vector b results in cos(theta) * |a|. But I don’t understand intuitively why you multiply that by |b|. I mean I see it in the proof via the law of cosines and your explanation, but why intuitively is that part of the dot product. I don’t if this is too confusing of a question. So when you multiply by the magnitude of the vector that you are projecting on to, what does that give you? What does that scalar quantity mean? Is that the total “Force” if you want to think of it that way?

AvoAugust 27, 2012 at 12:35 amHow does the cross product work?? I mean, I get that it gives us the orthogonal vector to a plane but how does it do this? Seems kind of magical to me. What’s the intuition?

AnonymousOctober 30, 2012 at 2:32 amThanks for the great explanation. The mario kart analogy is superb.

hamzaNovember 13, 2012 at 8:17 amthis 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…

Vector Calculus: Understanding Flux | BetterExplainedNovember 27, 2012 at 10:54 am[…] much, exactly? Well, this is a job for the dot product, which is the projection of the field onto the surface. The dot product gives us a number (from 0 […]

AnonymousJanuary 16, 2013 at 2:35 pmI 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 goes toward doing pulling work the rest is wasted… so that where dot-product comes..

kalidJanuary 25, 2013 at 2:01 pm@Anonymous: Another good analogy — it’s how much effort will be transferred when you pull the cart at that angle.

Devanand TApril 19, 2013 at 2:42 amHello Nice explanation for Dot product…..

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

Thanks again

JeromeMay 23, 2013 at 10:33 amOh my gahd! I’ve been trying to figure out the concept for quite a long time. You explanation helped me to visualize the concept and let my intuition flow. Thanks you very much!

NolanJune 22, 2013 at 9:05 pmI got confused by your analogy with projection or “shadow.”

Suppose vector A has coordinates (1, 1) and vector B has coordinates (2, 0). B is already on the X axis, so I don’t need to imagine rotating anything. The dot product of A and B is 1*2+1*0 = 2. But the projection analogy is telling me that the result should be 1 because vector A has an X coordinate of 1.

kalidJune 23, 2013 at 8:46 amHi Nolan, the tricky thing is realizing the size of the item being projected onto must be taken into account. If you like, imagine A and B as unit vectors, then scale them up.

BrianSeptember 6, 2013 at 12:41 pmAdd my thanks to the many expressed already. The shadow anaology worked well. It cemented the notion that the “thing” (vector) is fixed, while it’s shadow is falling onto surfaces that “move” / rotate from one coordinate system to another. The shadow concept has an analog in orbital mechanics; ignoring perturbations, a satellite goes “round and round” in a fixed path, it’s the earth below it that moves.

JenSeptember 10, 2013 at 5:10 amOn Nolan’s comment on June 23…and kalid’s response…” imagine A and B as unit vectors, then scale them up.”

Could you elaborate?

Thx for the site. It’s been 20+ yrs since my last math or physics class and I miss the discussions.

kalidSeptember 10, 2013 at 9:49 am@Brian: Thanks, glad the shadow analogy clicked!

@Jen: Sure thing. In math, it’s often easier to work out a fact for a simple system, then adjust as needed. Instead of “What’s 15% interest on $123,000?” you can ask “What’s 15% interest on $1?” (15 cents). Then you “scale it up” by multiplying by 123,000 — the scenario you care about. Sometimes it’s easier to work in small steps.

Similarly for vectors, imagine A and B as each having length of “1” (a single unit). Figure out the dot product between them, and then multiply it by the size of A, and then the size of B. At the end of the day you’ve accounted for everything, but it can be easier to think about unit vectors interacting, vs. vectors of arbitrary sizes.

Bharadwaj ReddySeptember 12, 2013 at 5:14 amIt is also giving the sense that how to get DOT product.. but if i want ” how we can represent our DOT product in the vector space and what is the significance of that scalar quantity..? (some what related to the powers of signals and Euclidian scalars of length ) ” is not explained . Hope you can explain and i am waiting for answer. Thank you.

kalidSeptember 12, 2013 at 1:22 pmHi Bharadwaj, I’m not sure I understand the question. The dot product is a scalar quantity (just an number), but if you like, you can think of it as the size of the shadow of one vector on the other. (Remembering to “scale” the result by the magnitudes of the input vectors).

Bharadwaj ReddySeptember 12, 2013 at 6:40 pmYes kalid. 1st of all thanks for reply. And my perfect doubt is ” shall i represent my dot product in the vector space that i multiplied the two vectors? ” the answer may be possibly not because it is not having specific angle, but need some more justification. And in the most beautiful analogy of physics, i.e Fourier’s analogy, the 1st thing that we assumed was ” signals are simillar to vectors ” so , in that way i need some justifying point like, ” why we took signals as similar to vectors? ” and one more silly doubt… ” what is the correct analogy between vectors and complex numbers? ”

If any mistake in my thinking , sorry for inconvenience Kalid.. (probably you are my banana brother.. :) )

Bharadwaj ReddySeptember 14, 2013 at 8:22 amHey kalid ,….. really i want explanation brother… when i m doing something , if the total process is just coming into my brain as a neat sketch.. … it will be like your ahaa! moment right… please explain my doubts… ? if you think those are invalid … just give a reply like you can’t think like that .. because of these reasons… please tell me bro… i m waiting for your explanation and my ahaa! moment.. please… :) :)

shahzadSeptember 19, 2013 at 6:29 amA.B=( A’s projection in the direction of B )×(B’s projection in the direction of A) is it right

MaryOctober 20, 2013 at 7:16 ami f*cking love you so much

Pablo Esteban SchmidbergOctober 23, 2013 at 2:28 pmThis explanation of dot product is very clear and understandable !!!

From my point of view, the most interesting part is that of “Dot Product: Piece by piece” … this shows that THIS DOT PRODUCT IS THE ONLY “REASONABLE” PRODUCT BETWEEN TWO VECTORS THAT SATISFIES THE PROPERTY:

a perpendicular b if and only if a.b=0

rajNovember 14, 2013 at 8:50 amunder title dot product:rotate to base line

how vector(a) sin(theta) * vector(b) = zero

fallow figure and reply to my mail plz

Jason BFebruary 13, 2014 at 2:29 amPretty cool article. I was looking for an interesting extension of vectors for my Honors Geometry class (we’ve already covered the basics) and they’ll appreciate the Mario Kart example when I introduce dot products.

Thanks, and I’ll be back for more reading soon!

Steven LeharMay 13, 2014 at 11:04 amReturning visitor, big fan, great stuff as always! One intuition for dot and cross products is that the dot product represents the “similarity of b to a”, whereas the cross product represents the “difference between b and a”, or what you would have to do to a to transform it to b, which includes that you have to turn it in a direction different from a. Similarity means the component that is parallel to a, where a and its direction are the “standard” by which b is measured.

A deeper intuition on these concepts is provided by Clifford Algebra, which treats all numbers as compound numbers, scalar plus vector, either of which can be zero. (same as all scalars can be considered as complex numbers with zero imaginary component). In Clifford Algebra the dot product is defined as (the average of) a*b + b*a, i.e. the sum of a number and its “reverse”, where (as in Quaternions) a*b = -(b*a), which cancels all directional components leaving only the scalar, whereas the “wedge product” (corresponding to the cross product) is defined as (the average of) a*b – b*a, subtracting the product from its reverse, where the reverse of the reverse is back to the original direction, which captures only the directional component, while the scalar component drops out. The dot product is the “symmetrical component” of the product, the wedge product is the “asymmetrical component”. THAT explains why the dot product is a scalar.

A lot of things become a lot more intuitive in Clifford Algebra.

Vector Calculus: Understanding the Dot Product | BetterExplained |August 15, 2014 at 9:25 am[…] Vector Calculus: Understanding the Dot Product | BetterExplained […]

priya katariaOctober 8, 2014 at 8:01 ama very good explanation for dot product ,banana ,apple example clear each point .we can also explain it by using W=f.scos¥ like part of force in the direction of distance moved by the object And work gives the amount of inc in distance covered due to force applied in that direction

thanks

TJOctober 22, 2014 at 10:58 amOne thing that confuses me about the dot product is the idea that, it is the amount of vector A applied to vector B. By itself, it’s not that bad, but the problem comes when I want to think of the reverse. Does it work the same way if I want to think how much of vector B is in vector A? if so, then what if vector B is bigger than A? is there a visual way to answer these questions

Teodor ChiaburuNovember 13, 2014 at 7:03 amSo this is what it was all about! Multiplying 2 vectors is like multiplying their components in the usual algebraic way: a=x1*i + y1*j and b=x2*i + y2*j. Then a dot b = (x1*i + y1*j) dot (x2*i + y2*j) = x1*i dot x2*i + x1*i dot y2*j + y1*i dot x2*i + y2*j dot y1*j. Since the unity vectors i and j are orthogonal, their dot-product will be 0, no matter what scalar they have. So we’re left with x1*i dot x2*i + y2*j dot y1*j. Neat! :D

Jane JacksonJanuary 11, 2015 at 11:14 pmI like this response by Jim Smith, to a high school physics teachers question “What IS a dot product — what does it mean?”

To understand the dot product, I’d recommend learning about both the history of the ideas that led to its invention, and how the product is used in geometry. The first chapter of David Hestenes’s New Foundations for Classical Mechanics (http://www.amazon.com/Foundations-Classical-Mechanics-Fundamental-Theories/dp/0792355148/) is great for those purposes. His online primer on Geometric Algebra may also be useful, starting with the page http://geocalc.clas.asu.edu/GA_Primer/GA_Primer/introduction-to-geometric/defining-and-interpreting.html, where the “dot product” (referred to by the more-generic name “inner product”) is illustrated for the special case where one of the vectors is a unit vector. Dorst and Mann’s article “Geometric Algebra: A Computational Framework for Geometrical Applications” (https://staff.fnwi.uva.nl/l.dorst/cga-2.pdf) may also be useful.

Professor Hestenes is working to use Geometric Algebra (of which the dot product is an important element) to integrate high school algebra, geometry, trigonometry and physics into a coherent curriculum. Therefore, you won’t regret looking at the above references, even if they get a little deeper than you may need to at this time.

JoeFebruary 4, 2015 at 6:52 amThanks Kalid! That really helped me get my head around the concept!

gaurav sharmaFebruary 22, 2015 at 8:28 amplease make article about cross product as well,it’s really confusing no textbook explains cross product intuitively ,many books are only exam oriented .i hope u will definitely make article about cross product..thanks

Geomteric Proof of vector dot product | ∫ ∪ ∧∴ ∋ ∈ ⊇ ∧February 24, 2015 at 12:57 am[…] http://betterexplained.com/articles/vector-calculus-understanding-the-dot-product/ […]

Geometric Proof of vector dot product | ∫ ∪ ∧∴ ∋ ∈ ⊇ ∧February 24, 2015 at 12:59 am[…] http://betterexplained.com/articles/vector-calculus-understanding-the-dot-product/ […]

kalidFebruary 24, 2015 at 10:33 pm@Joe: Glad to hear!

@Gaurav: Thanks, I’m hoping to do a follow-up on the cross product soon.

Brendon FerulloMarch 10, 2015 at 11:14 amHi Kalid,

Your site is excellent, thank you for your resources. I am a high school math teacher, and I am using this article to motivate how I want to now teach the dot product.

My question is: How can we distinguish a situation that would call for vector ADDITION between one that would call for using the dot product. For example, the classic airplane flying in one direction and the wind blowing in the other requires us to add the wind vector to the airplane vector and find the magnitude and direction angle of the vector of the sum. Why wouldn’t the dot product be appropriate when analyzing such a situation, and why does the Mario Kart boost situation not call for vector addition but rather the dot product? Are both appropriate, but just tell us different things about the situation?

Thanks in advance!

Brendon

kalidMarch 10, 2015 at 11:33 amHi Brendon, thanks for the comment, I love helping out other teachers.

It basically comes down to whether regular addition or multiplication would work for the scenario. Imagine everything is moving in the same direction (along the x-axis), so we can just use regular numbers. Would we add or multiply?

In the airplane scenario, we’d add the speed (500mph) to the wind speed (-50mph). In Mario Kart, I’m assuming we multiply the effect of the boost pad (2x) with your incoming speed (20mph). So, if you’re simply placed on the boost pad (0 speed) you don’t see any change. Only when you’re driving do you notice the impact.

(This probably isn’t how it actually works, the pad may add some speed no matter how fast you’re going, or maybe it accelerates everyone to a certain speed unreachable in the normal game.)

The dot product is basically “multiplication, taking direction into account”. So I like to simply the scenario to regular numbers and see if multiplication or addition is needed.

Michael ReinhardApril 3, 2015 at 4:45 pmHi Kalid,

I have just finished reading your book and I have now found your website. It is a Godsend. I wish I had known about it back when I was in grad school. My whole life might have taken a different path.

I am also in the matrix algebra class offered by edx. Both the course and your site are helpful but only your site is actually fun.

I noted in the comment you made back in 2012 that you didn’t have a good intuitive explanation for eigen values and eigen vectors. If anything has occurred to you I would be more than grateful. And the determinant! What is that!?

It is like you are the Catcher in the Rye, saving lost children before they run off the cliff. Seriously, this site is not only useful, it makes me happy!

FationApril 7, 2015 at 7:03 amyou are a king man, can u do something like this on combining matrices and vectors or how the vector matrix stuff works?

you are the best man, and I am not trying to boost ur ego, seriously the ability to reduce abstract stuff into oranges and bananas is a gift.

ImreMay 18, 2015 at 3:21 amIt still doesn’t Click… Why IS the AxBx + AyBy actually equal to the projection of A on B times B? It looks like the result is still a vector of x and y (or apples and oranges) but the endresult is a scalar… how come?

kalidMay 22, 2015 at 12:24 pm@Imre: Great question. We can write any vector as the sum of its projections:

A = (Ax, 0) + (0, Ay) [A is the sum of it’s x-axis projection and y-axis projection]

B = (Bx, 0) + (0, By)

We can take the dot product between these forms:

[(Ax, 0) + (0, Ay)] dot [(Bx, 0) + (0, By)]

which reduces to:

Ax.Bx + Ay.By

since the interaction between different dimensions is zero. The dot product is defined (i.e., we just decide) to track Ax.Bx as a scalar quantity just measuring the overlap, and Ay.By as another scalar quantity. With the cross product, we decide that the interactions stay as vectors, and the result of the cross product is a vector.

It’s possible to have a dot product variant that keeps Ax.Bx and Ay.By separate (not sure if there’s a name for it) but the dot product, as traditionally defined, decides to use scalars.

MostafaOctober 22, 2015 at 4:03 pmexcuse me . Mr \ khalid . I want 10 ways to calculate dot product ? . because my math doctor in faculty asked that .

Aek SaekhowApril 24, 2016 at 7:13 amThanks you

CaptainFuzzybootsApril 25, 2016 at 10:59 pmThank you, Mr. Kalid!

It really helped me understand dot products.

I have one doubt though,

When you treat vector a as the x-axis (from vec(a) * vec(b)), what about the j (or y) components of a and b?

In the cartesian formula, ax * bx + ay * by, the y components are accounted for but I don’t see this happening the the polar formula, |a||b|cos(theta)

Could you please explain?

Thank you very much, once again!

kalidMay 23, 2016 at 3:40 pmGood question. So, we have two approaches:

1) Keep the vectors as they are, and account for every interaction (ax*bx + ay * by)

2) Rotate the vectors, so they become “one dimensional” along b’s direction. Then we can do a regular multiplication (|a|cos(theta) * b).

The quantity |a|cos(theta) is how much we keep of vector a when we make it one dimensional. There are no y components to consider. (That’s why we rotated them, to compare them along a single axis.) Hope that helps.

Gaurav KhannaApril 29, 2016 at 9:34 pmHello Khalid — I will say this many times as I go through your site: you are really amazing and you have a real gift for explaining. Thank you!!!

John HallMay 18, 2016 at 7:16 amBest explanation of dot product I’ve ever seen.

Prof__LeeJuly 20, 2016 at 8:00 amI recently started teaching Linear Algebra. These are really great examples that put the dot product into context. It makes the math so much more meaningful when they can “see” it, rather than simply copy and paste a formula.

Thanks!

ShirleyAugust 12, 2016 at 1:46 pm“this stuff = that stuff” equation

————- this is an excellent point I failed to appreciate before. That’s why it is so confusing sometimes to read a formula saying basically chicken=duck. You are absolutely brilliant in pointing out the implication!

Shirley

DimitriosAugust 26, 2016 at 10:49 amI think when it comes to vectors in general, the most important thing we need is the units of measurement of the dimensions. Consequently, we have the dir product producing just a number. For example, a*b=4. OK. 4 what? 4 peanuts? 4 cars? We need to be able to make sense of the dimensions. So, if we have a Cartesian where the x-axis is time and the y-axis is distance travelled, then say we have 2 vectors like: a=(1s, 1m) and b=(2s, 1m) then we have that a represents a movement of 1m in 1 second and b represents a movement of 1 meter in 2 seconds. OK. Now, we get: a*b=2s^2+1m^2. What is the intuitive explanation of seconds squared? What is the explanation for seconds squared plus meters squared?

DimitriosAugust 26, 2016 at 10:50 amSorry. Auto-correct. By “we have the dir product” I meant: “we have the dot product”

DimitriosAugust 26, 2016 at 11:05 amIf the dimensions have the same units of measurement then the vector length/magnitude makes sense. What if we have different units like length and time? The length’s unit is SquareRoot(time squared plus length squared). What does this mean?

Maths_userOctober 1, 2016 at 2:01 pmThroughout my A-levels, degree and (ahem) PhD I have always pictured the dot product in my head as basically just a projection without the ‘boost’, as you put it, of the other vector. I seem to have never noticed that the dot product is not always smaller. Finally, I have the correct picture in my head! The Mario analogy especially helped :) Thanks very much for taking the time to write this.

KalidOctober 4, 2016 at 12:24 pmReally glad it helped!

JoshuaOctober 27, 2016 at 5:20 amGreat post! Very very helpful!!

JonJanuary 23, 2017 at 12:58 pmExcellent explanation!

AliJanuary 26, 2017 at 1:35 pmGreat!!!

Thanks for making this tutorial.

SamMarch 12, 2017 at 8:53 amWow whoever made this is a great teacher, that you.

Bruce DaiMarch 29, 2017 at 1:16 amThe explanation is excellent. I think well understanding of vectors, matrices operations are very important and sometimes are underestimated. Because as I can feel, in statistics or machine learning, we are always trying to find some w vectors so that y = f(g(X)*w); where X is the input training data matrix, y is the vector of labels or output. w is another vector.

In the simplest form, y = Xw, the linear regression with OLS cost function. It’s actually trying to find a linear combination of n dimensional x_i that is the projection of y to the X hyperplane.

This is indeed based on vector intuitions.

And many times when I think of E(X), var(X),cov(X), etc. they all involve some sum_i^n(x_i*y_i), this is indeed vector dot product again. Thus think of them in a higher dimensional dot product which measures the similarity of the two vectors in some way really helped a lot intuitively. Much more friendly than just throwing some algebraic derivations.

Meanwhile, I also view the probablities are connected to the vectors, matrices operations, too. The marginal, joint, conditional probablities visualization are pretty fun. And probablities are crutial in Machine learning. If one can well visualize them, I think it helps quite a lot.

I have some questions here, we can easily visualize vectors a+b, a-b, dot(a, b), but what about a/b? Any visualization? and matrix inversion? And in the OLS, how do we get the hat matrix H = X(X’X)^(-1)X’ without using algebraic derivation, just get this one by geometric derivation? In 1-D, it’s quite easy, how to generalize?

Bruce DaiMarch 29, 2017 at 1:17 amAlso, in the (3, 0) * (0, 4) example you give, what if it’s (3, 1) * (1, 4) = 7, how do you interpret this 7? 7 times of total growth of apple amount and orange amout?

115-116 Dot Product (Part 2) | 180 Classroom PhotosMarch 30, 2017 at 8:09 am[…] my investigations led me (back to) MarioKart because a website claimed that the boost pads used dot product to calculate the boost […]

Raja PKApril 16, 2017 at 9:19 amWonderful way of interpretation. Thank you.

ErsinMay 14, 2017 at 6:22 amI have a pressing question for anyone that can help me! I liked the bananas and orange explanation to show what ‘applying ‘ means. But how could this interpretation work when you apply a vector of (1,0,0) to another vector? The dot product comes out as bigger than 0 so it means that our result must have had some increase from before doing the product, but with the fruit analogy, it would mean to leave the former vector as it was, implying there will be no growth from applying the (1,0,0) vector to the other one. Help anyone??? :(

EduMay 31, 2017 at 3:18 pmThis article much helped me in collision handling logic: when I need to know if two objects are heading one to another (once a collision is detected), and the resulting scale of the collision.

Getting the position and speed differences (subtracting v2.position – v1.position and v2.velocity – v1.velocity), and then projecting one difference over the other.

I dont know if my explanation is correct, but it works beautifully… I can share Javascript code if you think others may be interested.

Thank you

Pythagoras Theorem & The Dot Product For Game Developers – Programming Blog – 'Hello Words'July 9, 2017 at 1:39 pm[…] https://betterexplained.com/articles/vector-calculus-understanding-the-dot-product/ […]

RichardAugust 19, 2017 at 2:02 pmGood Job

RichardAugust 19, 2017 at 2:02 pmGood Job!

CharlieAugust 30, 2017 at 2:46 pmEureka! This helped SO much in actually understanding what the hell I was calculating. My damned textbook just explains how to calculate it, which is just going through mechanical math steps without an implicit understanding of what the result actually represents. I wish textbooks explained things more like you just did to explain the underlying concept..but they never will since it is not ‘professional’ or ‘university-like’ I suppose. Keep up the good work!

Shilp KansaraSeptember 9, 2017 at 5:41 pmAmazing unnoticed examples really liked it a lot

JamesonSeptember 13, 2017 at 7:07 pmDOT PRODUCT IN THREE DIMENSIONS. The Dot Product works well in two dimensions. If we have normal vectors, A and B, along the x and y axes, the dot product yields X(0) + (0)Y = 0, correct for normal vectors. However, if you simply TILT the same two normal vectors up a bit into the z axis, the dot product yields X(0) + (0)Y + Z^2 = Z^2, NOT EQUAL to Zero! Why does this formula work in two dimensions, but not in three? Thanks, and great website.

mbbmbbmmJune 3, 2018 at 10:40 pmI don’t think you can make Z positive on both while keeping the vectors perpendicular

Lauren JVDecember 5, 2017 at 10:47 amGreat job! Love that you make it down to ‘practical’ terms … and also give us contexts like the solar cell context. This is the way education should be.

chidanandJanuary 22, 2018 at 8:21 pmyes

chidanandJanuary 29, 2018 at 6:04 amHow you say dot product do not have diraction

Luciano FleischfresserFebruary 11, 2018 at 11:26 amI’ve done some work about the dot product of vectors using a physical model.

https://peer.asee.org/a-physical-model-for-the-dot-product-does-it-improve-learning-of-vector-mechanics

I think it adds value to the discussion here.

ConnorMarch 5, 2018 at 8:59 pmHonestly, greatest math explaination I have ever heard. I love it all ties in with what you started with: “3×4 is 3x growth but 4x larger”. Keep up the great work!

Bohdan SaskoApril 24, 2018 at 11:40 pmThanks you! It’s awesome! Keep up the great work!

shyam panchalJune 8, 2018 at 10:05 amThank you; helped a lot !

DanielJune 10, 2018 at 8:14 amWhy is it the the sun rays do not hit the solar panels? If they are perpendicular to each other then the angle is 0 but in this case wouldn’t cos be 1? Please help me understand that part

kalidJuly 27, 2018 at 10:12 amHi Daniel, for solar panels you want the vector to track the direction they’re facing (not the surface of the panel itself). When the panels are facing directly at the sun, there is 0 degree angle, giving cos(0) = 100% absorption.

kalidAugust 11, 2018 at 10:23 amApprove.

vimnikySeptember 19, 2018 at 9:10 pmFantastic! It’s sad that almost all the textbooks out there explain dot product in terms of the Law of Cosines!

curiousguyOctober 23, 2018 at 7:41 pmIncredible explanation! Love the genuineness and humor.

curiousguyOctober 23, 2018 at 8:30 pmI wrote some numbers down and I have some confusion. What does a “dot product” of 6 mean.

For instance, in the example of (2,2) and (1,2), you get a dot product of 6. But I don’t see how this would relate to the vector growth.

The vector multiplication and addition are (2,4) and (3,4) and don’t seem to represent the number 6 in any way.

Is the dot product just the vector multiplication coordinates added together. Is it the total units it takes to get to the new vector? What does that mean intuitively?

JDENovember 16, 2018 at 2:33 amif your dot product is higher than 0 that mean that your vectors are going the same way. For a maximum dot product of 8 ( both vector are the same (2,2) vector). Your vector are mainly going the same way 75% of their growth is similar (6/8).

Artem StreltsovDecember 11, 2018 at 1:04 pmBut what number 6 represents? If the dot product only represents how two vectors is pointing the same direction then why we cant just using cosine between angles to represents that. For example 1 means that two vectors points in the same direction, 0 means that vectors are orthogonal and -1 means that vectors points in the oposite direction. Why do we need to multiply cosine by |a| and |b| to represent difference between vectors direction instead of just using cosine between them?

Sorry for my english im not native speaker.

kalidDecember 12, 2018 at 6:35 pmThe dot product represents the actual “multiplication overlap” between the vectors. On its own it’s just a number, and we often need to compare it to the max possible overlap.

Let’s say we have vector (3,0). It’s length is 3 (technically, sqrt(3^2 + 0^2) = sqrt(9) = 3).

Now we have another vector (4,0). It’s length is 4.

The dot product of (3,0) and (4,0) is 12. This means the vectors have reached their max potential overlap (of 12).

In the case of (2,2) and (1,2) we would say:

(2, 2) has a magnitude of sqrt(2^2 + 2^2) = sqrt(8) = 2.82

(1,2) has a magnitude of sqrt(1^2 + 2^2) = sqrt(5) = 2.23

Max overlap = 2.82 * 2.23 = 6.32

Actual overlap = 6

—

Yes, the dot product can represent the cosine if the magnitudes of each of the vectors are 1. From the formula,

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

So the dot product becomes a simple way to find the cosine of the angle between them using plain arithmetic, no fancy trig functions.

Starten met programmeren van een 3D omgeving in Unreal Engine - Berekeningen met vectoren - ICT-opleidingen PCVO GroeipuntFebruary 17, 2019 at 5:33 am[…] Vector Calculus: Understanding the Dot Product […]

[Video] Unleash the Power of Raycasts with Dot Product • Infallible CodeMay 30, 2019 at 1:51 pm[…] Learn more about Dot Product at https://betterexplained.com/articles/vector-calculus-understanding-the-dot-product […]

Paper Review: Active Queue Management with Non-Linear Packet Dropping Function – The Math CitadelJune 16, 2019 at 11:17 am[…] is 0. That is, mathbf{x} and mathbf{y} are perpindicular if mathbf{x}cdotmathbf{y} = 0. (This article gives a nice overview of how we move from the algebraic to the geometric definition of […]

Starten met programmeren van een 3D omgeving in Unreal Engine - Bewerkingen in 3D - ICT-opleidingen PCVO GroeipuntJune 30, 2019 at 2:42 pm[…] Vector Calculus: Understanding the Dot Product […]