by _virtu · 2y ago · 0 comments
You know what blew me away though? Not one textbook I looked in mentioned “why” the dot product is important; that is it’s useful for determining the similarity of two vectors. They all focused on the mechanical details of computing the dot product, but never spelled out the reason it can be useful. I went through a few other resources before I broke down and had a little chat with ChatGPT to discuss the meaning behind it and it makes perfect sense after that.
In comparison to when I was in college, things are much slower paced so I can take the time I need to ensure I have a full grasp of a concept before moving forward. I guess all of this is to say that as I’ve continued forward through more concepts I keep finding that the books I’m reading offer a mechanical view instead of a holistic view of the material. This feels like the biggest issue with most math books I’ve read and it makes me wonder where books that offer more semantic meaning of concepts instead of recipes exist.
You cannot simply explain to someone complex stuff - best way is to let people grind through to build their own understanding.
Parent poster wrote that "it’s useful for determining the similarity of two vectors" - now I would ask why do I need to determine similarity of two vectors as it does not mean much to me - if I would be grinding through math problems I would most likely find out why, but there is no way I could understand and retain it when someone would just tell me.
Simple:
Start with
a) Suppose you are making a video game..
b) Suppose you are determining ballistic trajectory of your missile system based on model rockets
c) Suppose you are running a fighter robot group..
Or any of the stuff children are supposed to *actually* do and then take these classes with determination to do the actual creative things that they wanna do all life.
There is an aspect of jest in the above comment, but it also contains some likely truth. Children love doing stuff, and these are the things that may enable them.
Edit 2: The teacher probably gave some example from biology or something that you didn't care about and therefore forgot about it.
The worst thing was to learn something just because the teacher said so. If I hadn't had the motivation not to fail, I would definitely not have gone this far in my studies and in life.
I think the same goes for mathematics instruction. The thinking is that you will soon take courses that will make specific application of these tools that have broad application.
To get someone understand something holistically, as in link to their previous knowledge base, requires knowledge of what their knowledge base is. Traditionally this has been done with structuring the teaching with prerequisites etc and hoping it works.
I struggle with this quite a bit when I teach students with heterogeneous background. To be effective, one has to first probe what the students already knows to be able to relate the new stuff to that, and this requires interaction. Hypertext is/would be helpful for self-learning, but it's sadly very underutilized. LLMs may be better. But probably even those can't at least in the current form replace interactive human teaching as they don't really form/retain a model of what the user knows.
This is absolutely not true. Many times I've experienced the moment of something complex "clicking" after hearing or reading an appropriate explanation for a phenomenon - finally seeing the right visual or appropriate example or comparison. I find it hard to believe you've never experienced this other than through grinding problem sets.
I believe something "clicked" only because you were grinding or already quite familiar with the topic.
There is no way to simply explain complex topic so someone would just get it or someone would "click" on after reading one book on the topic.
Maybe you prefer to figure out everything yourself, but you have just one lifetime, and having access to guidance while grinding will allow you to learn things faster (and thus more).
I do not argue that guidance is not needed, it also is, but there is no shortcut that lets people skip own hard work by telling someone incantation of words or sentences in special order that will make things click.
Grinding through to build your own understanding when someone can just give you useful meaning and context to connect to your other parts of learning is a core teaching skill, and anyone avoiding that because its "too hard" is doing a deep disservice to their students.
Otherwise at the end you get people dissatisfied they cannot get job but they have a degree.
It wasn't until years later that I found that it was all about "the area under the curve" and why that would be useful. At no point in those high school classes did we ever work a practical example. I was pissed off all over again when I found out how useful that stuff could be, and how much I'd missed out on.
I'm sure most teachers mean well, and I'm sure most of them try. But by god there are some truly awful twats out there who should never set foot in a classroom again.
What an awful person. Chances are she was getting defensive and covering for her own lack of understanding. If I were a parent, I would confront her about that, not least of all her contempt for students and for learning, but toward parents.
Teachers don't know everything, and when they don't know, they should be able to admit that without hesitation or defensiveness. This sets a good example in general, of humility, instead of inculcating the notion that life is about having all the answers, or rather, pretending to have all the answers. All this does is set up people to become imposters. Of course, if you're teaching calculus, you should have at least a basic grasp of the material, and if you don't, you should say so, so that you've not put in a position where you have to teach it.
> I'm sure most teachers mean well, and I'm sure most of them try.
I think it is generally accepted that primary education isn't exactly packed with the best candidates, both from the point of view of pedagogical ability as well as mastery of the material.
He had to confess he didn't know why or how either of them works, he just uses them :-)
Perhaps a bit oddly I didn't have any problem with the pure math prof. also not offering any use cases, although of course it also does!
https://betterexplained.com/articles/a-calculus-analogy-inte...
But that fact’s significance and too obvious simplicity, with all its ramifications, only hit me deeply and profoundly when a year later I realized I could use those functions to draw a circle on a screen.
Before that they were abstractions related to other abstractions that I had to memorize to pass a course.
To this day I am frustrated when reading papers about abstract algebraic relations and other such concepts, without even a sentence or two discussing any intuitive way to think about them. Just their symbolic relations.
I appreciate that in the game of math that view becomes natural. But most of us learn math with additional motivations and are interested in any perspective that highlights potential usefulness or connection to the real world. Many of us mentally organize our knowledge teleologically.
Yet even when usefulness is known to exist, it is often neither mentioned or referenced. Or even considered relevant.
Edit: the same goes for not showing a single concrete example of an abstract concept. A kind of communication that would unlock many mathematical papers to a much larger audience of intelligent and relevant readers.
Take parametric curves. I explain that they generalize the concept of a function. Every function can be parametrized in a trivial way. They don’t really understand this concept. They have a hard time parametrizing a function and do so only becuase of a formula.
The fact is most people need to go through the mechanical process of doin g before they can get to a point of understanding. It takes almost the entire semester for me to convince beginning algebra students that the reason that 2x + 3x is 5x is because of the distributive property. And when they do understand it they don’t understand why that is important.
Later on when things click for someone they will often say things like, “Why didn’t they just tell this when we took the course?” Usually we did. You just didn’t have a sophisticated enough understanding of things to grok it at the time you took the course.
And I know picking on your example isn't in the league of a general solution.
But if 2x (which is x + x) is two apples in a box, and 3x (which is x+x+x) is three apples in another box, then you put those two boxes in a bigger box (another +), people already intuitively can see the distributed property of scalar multiplication vs. addition of some unit, they just didn't have a name for it.
Likewise, a 3x4 square of paper next to a 7x4 piece of paper can be easily seen to be a 10x4 piece of paper. Multiplication of numbers over added numbers.
So one way to introduce distribution is to start by showing examples of several places where people already understand the concept of multiplication distributing, and use it every day, but just didn't know it was one concept with a name.
Once people can recognize distribution as an already familiar relationship in everyday life, then the symbols can be visited as the way we write down the already known and useful concept so we can be very clear and general about it.
Anyway, that's just a reaction to one example, which may not mean much.
Sometime later a person will really grok all this and then say, “why didn’t they just tell us this is all just the distributive property?”
_Make: Geometry: Learn by coding, 3D printing and building_ https://www.goodreads.com/book/show/58059196-make
_Make: Trigonometry: Build your way from triangles to analytic geometry_ https://www.goodreads.com/book/show/123127774-make
_Make: Calculus: Build models to learn, visualize, and explore_ https://www.goodreads.com/book/show/61739368-make
(oddly the Calculus book was published second, so I guess I'll need to re-read it after I finish the trigonometry book)
Hopefully, this will provide me with a sufficient grounding in conic sections that I can solve my next CNC project with a reasonably efficient set of calculations (trying to do it using my rudimentary understanding of triangles from trigonometry had me 4 or 5 triangles deep, barely half-way to the final point I needed, and OpenSCAD badly bogged down performance-wise).
If you’re talking about research papers, that’s just because they’re written for domain experts and aren’t really for giving you intuition. They’re written in a deliberately terse (one might say elegant) style to convey the research findings in formal mathematical language and nothing much else. If you want to gain an intuitive grasp of things, read a proper textbook in detail or play around with the ideas on paper. Or both!
I guess the reason is that once you’ve acquired the intuition, having the literature cluttered up with the same explanations again and again becomes clunky and increases the volume of material to be sifted through when you’re just looking for a result you need in your research and don’t need all the extra chatter. It’s just cleaner that way. But to an outsider it does look more opaque. It’s a trade off.
I think that really is the best reason for not being more accessible. Along with less work - given a good paper already can take a lot of work to write clearly even for the immediate audience.
But there is tremendous value in reaching a wider audience, for readers, writers, and the very real serendipity of cross pollinating ideas. So an easily skipped concise titled section, that gave a little context or example for the non-inside crowd, would be a nice tradition. Even an appendix - although that might strike the established culture as too quirky.
Some papers manage to do something like that, a colorful example or perspective adding levity as well as clarity. So it is not breaking any barriers. Just not standard or prescribed.
Or maybe it wouldn't have much impact. I tend to find reasons to dive into many different new topics, so it is a prevalent need for one!
I completely agree — especially in the modern era where extra pages cost nothing.
Opposed to the liberal arts were the illiberal or servile arts. These are necessary and good, of course, but necessarily inferior to the liberal arts because their end is not truth or formation; they are instead practical, concerned with effecting some kind of economic end. The point here is not to disparage, but to understand how all of these are related and ranked according to a "for the sake of" relation. A human being doesn't exist to eat, he eats to exist, for instance.
Modern education is very much oriented toward the servile arts, and what passes for the liberal arts today is anything but the classical notion.
The point is that modern education is less interested in leading to understanding, realizing virtuous habits, and leading to freedom, and more interested in churning out workers. Workers don't ask "why" (though we can agree that those who do can, guided by prudence, contribute more economically). Indeed, that is perhaps the key difference between classical science and modern science: the emphasis of the former is truth, while that of the latter is control of nature. Of course, it isn't that you must choose absolutely between understanding and effectiveness, and the classical tradition does not claim either that study precludes work. Study often requires work, for sake of preparing the way for truth. Rather, it is that the end of the modern educational tradition is different from that of classical education, and this end determines the form of the pedagogical methodology. It is a difference in anthropology, of the vision of man.
All men work, but what do they work for? Do they work for work's sake, or perhaps to make money to satiate their base appetites (modern view)? Or do they work in order to be free to pursue higher ends[1]?
It's not really that it measures similarity. Physics isn't interested in that. It's that it tells you lengths and angles, which you need in all sorts of calculations. In more advanced settings, a dot product is generally taken as the definition of lengths and angles in more abstract spaces (e.g. the angle between two functions).
In machine learning applications, you want a definition of similarity, and one that you could use is that the angle between them is small, so that's where that notion comes in. A more traditional measure of similarity would be the length of the difference (i.e. the distance), which is also calculated using a dot product.
In physics, the dot product is used to losslessly project a vector onto an orthonormal basis, and the angle measures how much of the vector's magnitude is distributed to each bases vector.
The angle can be defined in terms of the dot product, because you don't need the angle (as in a uniform measure of rotation) in order to compute important physical results.
The angle can be defined in terms of dot product because |a|=sqrt(a•a) can be shown to be a norm, and because a•b/|a||b| can be shown to always be between -1 and 1, and because those things agree with length and cosine of the angle for Euclidean spaces. It's not that you don't need the angle. It's that the dot product gives a good definition of angle in settings where it's otherwise not clear what it would be (e.g. what's the angle between two polynomials `x` and `x^2`)
In programming terms, there are interfaces for things like length and angle (properties that those things should satisfy). If you implement the dot product interface, you get implementations of those other ones automatically. The "autogenerated" implementations agree with the ones we'd normally use in Euclidean geometry.
With that being said, I do remember my math and physics teachers in high school spend lots of time talking about the why and intuitions and let the books state the how.
Most textbooks motivate it by the angle between the vectors or as projections (e.g., for hyperplanes). Numerics-focused ones will further emphasize how great it it is that you can compute this information so efficiently, parallelizable etc.. Later on it will be about Hilbert space theory or Riemannian geometry and how having a scalar product available gives you lots of structure.
> This feels like the biggest issue with most math books I’ve read and it makes me wonder where books that offer more semantic meaning of concepts instead of recipes exist.
All of the good ones do both. They first give the motivation and intuition and then make matters precise (because intuition can be wrong).
Understandably college courses & textbooks meant for CS people will be more focused on computation, while a math major who is taking Linear Algebra will get a more theoretically motivated course. Gilbert Strang is an example of an engineering-focused text while Sheldon Axler or Katznelson & Katznelson is an example of what a math major would experience.
The difference in pedagogy seems to be which of these perspectives is treated as fundamental. Math education tends to treat the mathematical operations as fundamental. Physics treats the concept as fundamental and regards the operation as an implementation detail. It is very similar to how in software development you (for the most part) treat an API's interface as more fundamental than its implementation.
Unfortunately even physics books don't go over the intuition for underlying math very well, to their detriment. They seem to just assume everyone already perfectly understands multivariable calculus and linear algebra. I think it's because by the time you've gotten through a physics PhD you have to be completely fluent in those and the authors forget what it was like to find them confusing.
But in general, literature using and/or teaching mathematics does tend to be too algebraic/mechanistic. Languge models can be a very good aide here!
I guess if you want to learn math, only a math textbook will actually care.
Colleges tend to have two tracks for physics, one that's closer to high school physics, which is as you described. A collection of algebraic equations that you have to either remember or, if your professor was kind, given a crib sheet of.
The other is the "Engineering" or "Calculus" based physics track where, as you can imagine, you're taking Calc 1 and Physics 1 at the same time.
I have seen some, kinder, programs where you take Calc 1 in your first semester and start the Physics classes in your second semester.
One of the best books on Electronics according to HN crowd is The Art of Electronics, and it is filled with pages over pages of how-to of designing circuits of more than 1000 pages. But if you want to know why a Colpitts oscillator is the best for your design, all the best for that.
Even the textbooks produced by professors from the best engineering schools (e.g MIT, Stanford, etc) are not spared of this issue. One of my former lecturers (not MIT) for linear algebra and numerical analysis courses claimed that he worked and consulted for NASA, but how I wished that he had cover some of the motivations of doing a dot product. For the ChatGPT responses of the reasons of doing dot product for two vectors see ChatGPT 4 prompt below. I think once ChatGPT/Gemini/etc can operate properly on math equations at least as good they can for NLP, I think we are going to have a wonderful treat even for the understanding the higly complex concepts for examples thermodynamics, electromagnetics and general relativity.
Another classic example is try to find inside your favorite DSP book on why analytic signal in complex number generated by Hilbert Transform is necessary for communication and there is a very high probability that that's not a single explanation for that but there are many equations and graphs related to analytic signal. If we understand why or the raison d'etre, perhaps we can further ask why stop at analytic signal in complex number form, can we use quaternion number and what is the benefit of having more elaborate quaternion number form rather than complex form. If you are trying to do that and check this fact with most of DSP textbooks on this particular important issue then you will probably end up dissapointed even if you have bookshelf that contains majority of DSP books that are published since the invention of FFT.
I have also included the ChatGPT prompt for the dot product, and the responses are delightful to say the least.
>User prompt: Why you want to perform dot product of two vectors
>ChatGPT 4:
The dot product of two vectors, also known as the scalar product, is a fundamental operation in mathematics and physics with various applications, including:
Computing angles between vectors: The dot product can be used to find the cosine of the angle between two vectors. This is particularly useful in geometry and 3D modeling to determine orientations and angles.
Projecting vectors: The dot product is used in the projection of one vector onto another. This is crucial in physics for resolving a vector into components parallel and perpendicular to another vector, and in computer graphics for rendering and shading calculations.
Checking orthogonality: Two vectors are orthogonal (i.e., the angle between them is 90 degrees) if their dot product is zero. This property is vital in many areas including computer graphics, signal processing, and linear algebra.
Work calculation in physics: In physics, the work done by a force (a vector) moving an object through a displacement (another vector) is calculated using the dot product. This is important for understanding how much energy is being used or transferred in a system.
Machine learning and data analysis: The dot product is used in algorithms such as those for finding similarities between data points, calculating vector norms, or in the training processes like those of neural networks where weights and input signals are combined.
Each of these applications demonstrates why the dot product is a key tool in both theoretical and applied disciplines, linking geometry, algebra, and practical computation.