Math Intuition Cheatsheet 478 points by jgrodziski 706 days ago | past | web | 64 comments

 I am often saddened by how much easier it has been for me to acquire computer science versus mathematical literacy. Embarrassingly, years after a poorly-timed calculus course left me thinking I had to be able to prove the central limit theorem in order to use calculus, the biggest barriers have turned out to be things programming as a discipline has learned to avoid; encouraging varied and/or terse notations, opaque variable naming schemes, and arbitrary use of jargon where simpler terms would suffice.A friend of mine who is a physicist once complained to me that every time he had to install some scientific software package on his computer, he had to deal with a litany of arbitrary things which seemed to have nothing to do with his task. I countered with my experience learning math and joked that at least programmers are willing to occasionally refresh our idioms and notations to better reflect our mutual understanding.
 (Kalid from BetterExplained here)Thanks for the comment. There's this weird notion in Calculus education that we need to start from first principles. Limits were invented a century after Newton died, yet they're taught first. "Oh, students won't understand calculus unless they can build it from first principles. I don't care if Newton worked out gravitation with his understanding, it's not good enough."My little candle in the darkness (http://betterexplained.com/calculus/lesson-1) is to start with intuitive notions (X-Raying a pattern into parts, Time-Lapsing parts into a whole) and then gradually introducing the terms. Eventually, if people are interested, we can get into the theory (which is like getting into the Peano axioms of arithmetic, if you care to go that deep.)I think in math there's a tendency to express things in the lowest-level "machine code" we can. We need more comments and pseudocode outlines :).
 > Thanks for the comment. There's this weird notion in Calculus education that we need to start from first principles. Limits were invented a century after Newton died, yet they're taught first. "Oh, students won't understand calculus unless they can build it from first principles. I don't care if Newton worked out gravitation with his understanding, it's not good enough."It depends. In high school, it certainly makes sense to start from an intuitive, rough idea, but in college/uni, I much preferred classes that started from first principles (axiomatic QM, sets → topology → metric spaces → calculus/algebra) etc. rather than the weird classes which define nothing properly and put in a “this is true, but I won’t tell you why :P” every other lecture. Which approach is preferable obviously also depends on your aims, but I found it hard to get a thorough understanding of a topic without a first-principles-based derivation at least at some point.
 I definitely agree -- context matters.For a potential math major [i.e. people for whom metric space refers to a measure and not a flat in Europe :)], you definitely want the ground-up understanding. In CS it's similar, where you learn about transistors, logic gates, ALUs, CPUs, machine code, compilers, along with high-level languages.But, some people just need the HTML "Hello World" to make their webpage. (In the math field, we have students who need calculus primarily to find the min/max of a function, and are wasting time worrying about epsilon-delta definitions of continuity. Limits are interesting, but I'd prefer to ignite curiosity with higher-level topics then dive into the details, instead of forcing someone to learn organic chemistry before being able to drive a car.)
 That's how they taught CS at your school?Where I studied, we did have classes on all the low level stuff, but we didn't start there: I took a class taught using a high level language every semester. CS-100 was intro to how computers worked, but right along with it, you had 101 teaching C.If you are going to end up teaching software engineering material, compiler design and such, you just can't have people that have barely done any programming for a year or two, or all they are going to learn is boxes next to each other, instead of being able to actually write a simple compiler in the compiler class.
 Whoops, I probably wasn't clear enough in my reply -- the classes on transistors, logic gates, etc. are available to CS majors but are definitely not a requirement for programming. I completely agree that trying to teach about digital logic, etc. without the general context of programming is backwards.Drive the car, build your interest, then start taking classes in chemistry, physics, etc. to see how it works.
 Same thing with logarithms, which were invented to simplify multiplying two huge numbers. Combined with log tables (think paper LUT for humans) that became a simple matter of looking up two log conversions, adding them, then looking up the inverse of the answer.Is that what we learn in high school? Nope. So everyone is left wondering what the hell they are good for (or were, before we had calculators) the first time around.(btw, as far as I can tell you don't have that bit of history on your site yet either - might be an interesting addition?)
 Well, I learned that at school. It still didn't answer what the hell logarithms are good for. Everyone was left wondering why we were learning something that can be replaced by calculators.Seeing some modern application of lagarithms would be great. Even just making a log-log graph at some point would answer every question. But those are not at the official curriculum.
 It drives me batty because we learn the properties of logarithms before (if ever) internalizing what they mean. Here's my intuition if it helps someone:http://betterexplained.com/articles/think-with-exponents/Exponents let you plug in time, and get the amount of growth. e^3 ~ 20, which means "3 periods of 100% continuous growth [100% is implied by e, 3 = 3* 1] will grow us from 1 to 20".Logarithms let us plug in the growth, and get the time it took to get there.ln(20) ~ 3 means "It takes 3 units of time [growing at 100%, continuously] to grow from 1 to 20".Exponents take inputs and find the future state, logs take the future state and work backwards to find the inputs that got us there.
 Great tidbit, thanks. I forget if I have a mention that logs were developed before e, but I love it because it's a little mosquito in the ear for the over-rigorous mathematicians who define e up front (as a limit) and then say "the natural logarithm is log base e".e was only discovered because of logarithms, not the other way around! :)
 (LUT = LookUp Tables, for anyone that is confused)
 I find your emphasis of building intuition very important.Personal anecdote related to Pythagorean theorem/euclidean distance.When in ninth grade, I asked my math teacher to explain why why the the standard deviation is like it is and why the square root and not something else. He could not explain that to me satisfactorily.I spend few hours looking at the formula myself and plotting and drawing different datasets until I made the following association: if dataset is like N dimensional vector and its values x1, x2, .. xN are coordinates, then I'm looking at euclidean distance from mean plus adjusting for the number of dimensions. I think this single moment of cryptic formula making sense changed my attitude towards statistics and math. Dataset ~ vector and data-point ~ vector-coordinate association helps to understand statistics using geometrical intuition.
 That's pretty amazing you came up with that in 9th grade. You may know this already but for anyone who doesn't, this is a result of covariance being an inner product [0]. Remember that the inner product of a vector with itself is the length of that vector squared. So if you had another data set, y1, ..., yN, the correlation ( = covariance / (std.dev(X)*std.dev(Y)) ) is the inner product divided by each length which, if you remember, is the angle between your vectors (datasets after removing the means.)
 Great example, I like that. I started realizing that many instructors don't necessarily have an intuition for the topic they're teaching, and it's often up to the individual student to seek it out. I'm hoping to do more stats concepts down the line, this is a nice analogy for why standard deviation is defined as it is.
 Kalid - First of all, your site kicks ass! Keep doing what you're doing. You probably can't even imagine the 2nd and 3rd order impacts of the benefits you provide. Someone gets one insight from your site, that makes something they learn in school more comprehensible, and then it explains it to someone else, who then can learn more quickly....Bithive123 - I found that practicing Project Euler has helped my understanding a lot. Part of it was that it made math a joy again, and I tied it to learning new programming languages.
 Thanks so much. My meta goal is to help people gain confidence in what it means to learn (in general, not just math) and ideally encourage people to share their insights with others. No reason for us to all bump our shins on the same coffee table in a dark room, someone turn on the lights on your way out!
 Unfortunately, most of the mathematical text miss the historical context which they are developed in. I personally enjoy a text in any subject, where the author develops the content with historical perspective.Any learning course should include one textbook which develops the content from an historical perspective.
 I agree. A few years after doing articles, I started seeing the power of historical context.For example, the Fourier Transform was originally _rejected_ as implausible when presented to the mathematicians of the time. They needed a decade of debate to verify its truth, and yet we teach it to students in a week and expect them to internalize it without issue. We need to acknowledge the difficulty/counter-intuitive nature of the idea up front.
 Kalid, I just read your article on Prime numbers (not-quite randomly selected from the homepage). I just wanted to say how well written I found it - even beyond the technical side of things, your writing style, tone, and humility ("if I didn't mess it up") are fabulous.
 Thank you Jacob, I really appreciate it. I try to imagine that I'm writing to a younger version of myself, who hasn't seen the material yet. It helps me remove potential anxiety about not knowing everything, or trying to impress -- there's no reason to deceive yourself about what you do or don't know.
 Since we've mentioned the article, I can't help asking about a particular tit-bit that caught my attention --what do primes have to do with quantum mechanics?
 Definitely not an expert, but I found a few good articles on this (just updated the article):Primes appear to be zeroes of the Reimann Zeta Function. Nature loves minimizing energy, so there might be some reason the Zeta Function models how atoms behave. Then, primes are the most "stable orbits" or have a similarly useful property.Super high level, but I think it's interesting.
 Thanks! I am a mathematician, so am fine with the discussion of the 𝜁 function. I get the impression that de Sautoy is overselling the connexion a little bit in his zeal to make an analogy, but (1) I don't know the area, and so shouldn't really comment, and (2) it's interesting even if it's oversold.
 Your friend must have been trying to link a fast C or Fortran library to some higher level language, yeah? That's always a nightmare.
 >>Why would you need to prove central limit theorem in order to use calculus? What kind of course teach it that way? It would sound like something to prove for a honors calculus class that prepares students to become mathematicians.Yes, but not knowing calculus, how would he know that? Or any of those things that you have pointed out? They are certainly not taught at school (where we are unhelpfully taught an entirely different "mathematics" to that which you get at university, and will often require for advanced software work) and none of this stuff is ever pointed out in maths books.Instead, the reader of a maths textbook is unsettled by the constant unspoken assumptions and unexplained concepts that he is already assumed to know. There is in university level maths books what looks like an almost wilful disregard for how people are actually taught mathematics at high school. How do students going from school to university cope? is there some secret occult ritual where all this knowledge is transmitted?That's how it looks for those of us who are trying to teach ourselves, and it is in marked contrast to the experience of learning almost anything else, particularly programming.
 What subjects are you comparing with? I don't know whether the situation is that much better for physics, for instance. I think part of the problem is that mathematics books are in general either targeted at experts or at professors who need to assign a textbook. It looks like publishers believe the market for self-taught mathematicians is too small. In contrast, programmers are a pool of people who are willing to spend money on books to teach themselves, because they hope it will have a direct career benefit. That said, mathematics curricula must vary a lot from country to country. I was taught the fundamental of calculus in my penultimate year of high school!
 I'm comparing maths with programming and every other subject I learned in school and after :) I do find maths difficult, which is also why I am fascinated by it. It's alien to me.As for physics, although I have never studied it to any depth, I did enjoy reading the Light and Matter series of textbooks a few years ago.(http://www.lightandmatter.com/)
 Thanks for your reply, that's some useful information.I'm writing as a self-taught programmer who has spent years trying to get a handle on the maths of game development and computer graphics; for the most part that means calculus, linear algebra and geometry.I went to high school in the UK where I was not taught calculus, or for that matter even told that I could go to university. My experiences did lead, I must admit, to some hostility towards the educational establishment and a strong desire to succeed without their help!I first learned of calculus when I was about 18 and I bought a book on computer graphics programming. I was all geared up to start doing some cool 3d stuff, when all of a sudden I saw this strange elongated "S" symbol, which of course was not explained in the text. This confused me, when the book had a mathematical appendix describing the simplest vector operations (which I did learn in high school) in some detail. And that was the beginning of my frustration!There just seems to be such an enormous gulf between high school, "everyday" mathematics and anything coming after. I would like to think that in a world where programming is now so popular, that the border between everyday mathematics and the higher reaches of academia would shift a little and a kind of intermediate area would open up.
 To be fair, we drag around (and rigorously defend) many bad artifacts of past programming languages. Case sensitivity? Double-equals-sign for testing equality?But still, programming seems far more willing to fix mistakes than hard sciences/math. We've been clanking around with Pi instead of Tau for how many centuries?
 When I took my first programming course, one of things I was most surprised by was case sensitivity. It's kind of funny thinking about it now my perspective is entirely different -- "D" and "d" aren't the same value so why would they mean the same thing?Is case sensitivity a bad artifact? It doesn't seem like it is to me anymore, but my former self sure thought so.
 Salesforce's Apex language is case insensitive. It leads to a a lot of confusion, frustration, and distress when different programmers have their personal preferred style of referring to a class or var or when the lazy ones just write everything in lowercase. Never again.
 Would the best of all possible worlds be a case sensitive language where once you defined a name all other names that differed only in the case of the characters would be impossible to define?That way names would have to be referred to as written, but you would avoid the potential confusion of having multiple names that differed only in the case of their characters.Lots of programmers would probably regard this as some terrible infringement on their freedoms but, like python's whitespace indentation, I think it might work out OK.
 Besides using the field's notation (why we still can't werite greek letters easily?), I also like it a lot to use case to differentiate between kinds of elements.For example, let's say you want to write code that communicates with an arduino. You can define a class named "Arduino", that'll be instantiated on other classes, and the instances can be called "arduino", with no problems at all. On case insentive languages one has to resort to worse names, like "arduino_t", or "arduino_instance".
 What if it was only for things in the same "class" (wrong word, but I'm not sure what to actually call it)?So variables only with variables, classes only with classes, functions only with functions?(I.e. you can define a class called Arduino (bad name, by the way) and a variable named arduino, and it won't complain, but if you then try to define a class called "ARDUINO" or a variable named "ARDUINO" it will error out.)
 That would make a class of error impossible, at the cost of losing consistency (in most modern languages, the class name is just a variable that holds a class value).I'm not decided if I like it or not.
 I like there to be a difference between a variable “p” and a variable “P” (the former, for example, might be a vector, whereas the latter could conceivably be a projector onto this vector). Especially when doing numerical work, I found it to be extremely helpful to stick to established notation in the field also in the code intended to implement the algorithms written in this notation. In this sense, I find it sometimes sad that C++ doesn’t allow boldface/curly variable names :)
 I started my 1st year in college doing both math and computer science majors. I really love math but I just hate how (especially calculus and linear algebra courses) they just don't work on growing any intuition at all. in contrast, in my CS major we had a linear algebra class (ugh overlapping classes, huh) as well and we used computer graphics as a case study to learn about the basic concepts which was really fun and enlightening.Eventually I just ragequit math because I didn't have the patience and time to search for the intuition myself, which is a pitty. I'm really happy I followed the classes about mathematical proofs, groups etc because I really enjoyed those but others were just painful.Anyhow recently I discovered this blog too up my math concerning computer science is this: http://jeremykun.com/. It's a tad more advanced than this but I'd really recommend it. His blog is freaking amazing and always a joy to read. Math as a sidehobby it is! :)
 A lot of mathematics people feel this way about programming, too. Both sides expect one to devote the time to build intuition to grok their subject. I think it's easier to learn programming coming from the mathematics side, because you're going from nobody holding your hand to a compiler giving you error messages. You can't interactively test whether your intuition in mathematics is sound (you can, but you have to play both the role of the compiler and the tester).
 I'd read Yudkowsky's popular "An Intuitive Explanation of Bayes' Theorem" as well as a few others, but the article on this site made me feel like I actually understood it for the first time. The examples were clever, short, and simple, while still demonstrating how powerful Bayes' Theorem can be.The concise explanations here seem more helpful than semester-long university courses I've taken. I definitely look forward to exploring his other articles on math and programming.
 Glad it was helpful!There's a strange tendency in technical explanations to expand, expand, expand. A heuristic I have: Imagine you're writing a letter to yourself, before you started the course. There's no reason to waste your own time, just cover the key difficulties and how to overcome them, in simple language you would have understood.(Oh, this letter also costs \$5 a word, so let's make them count!)
 This is terrific. I'm mathy enough to know e to several places, and use it in programs occasionally, but if you'd asked me how it might be intuitively derived I'd have been at a loss. And that's just for something inside my comfort zone - the article on linear algebra is just as illuminating.This looks like it will be my commute reading for the week. But more than that it just makes me happy that it exists.
 Thanks, glad to hear you're enjoying it. I realized that until I could explain a concept intuitively, I didn't really understand it -- and it became a mission to find some analogy that really clicked for me. Hope it gives you some entertaining reading.
 Same here. I always was super interested in mathematics and still am. To have this resource to learn about where it all "came from" and how it actually works is great. Will read it on my commute as well!
 What an excellent collection of articles (well, I only ready a few, but I would like to think my experience extrapolates to the rest)! But I don't think "cheatsheet" is really the right word. Really this is a collection of short expository writings on particular mathematical concepts. And very well done, I think, to the point that calling it a "cheatsheet" (which I associate with a haphazardly conjoined sequence of facts and tricks out of context) is to do it a disservice. Or maybe the name choice has some marketing value?
 Glad you enjoyed them so far :)."Cheatsheet" might not be the best term for the summary page, perhaps "quick reference". I picked cheatsheet because it's a little more approachable than "reference", which implies something formal (and perhaps offputting).
 I really like this cheatsheet, it is very inspiring actually. You should consider doing a version written for elementary school aged kids. You need to get buy in while they are still young!
 Thanks! I'd love to do more elementary school topics. I still encounter revelations about things like basic counting (fencepost problem) and arithmetic.My meta goal is to raise people's standards for what it means to understand something. ("If it didn't click, I should keep looking for a better explanation." vs. "It didn't click, I'm no good at this.")
 For me the best one from Kalid is the explanation of the fourier transform: http://betterexplained.com/articles/an-interactive-guide-to-...This article is simply amazing, moreover Kalid is an humble person and references his inspirations from several people over the web. Thank you very much Kalid for the time you dedicated to share all this wonderful resources.
 Thanks so much, and for originally submitting the cheatsheet to HN. (I hope it helps people untangle concepts that confused me for literally a decade.)I really appreciate the encouragement and hope to keep cranking as long as I can.
 Sure could have used this site a couple years ago when I was in school!
 I like the idea but I personally really enjoy and prefer 'math english'. At first it may seems odd but after a while you get used to it and it's actually easier, you just scan through epsilons, deltas knowing exactly what they mean. Intuition has edge-case scenarios, double-meanings and almost-truths. I don't know why, but I think intuition (pseudocode math as someone had named it) gives a little bit of a 'illusion' of knowledge. You think you got it but are you really?
 Great point. I use the word "intuition" but feel it might be overloaded, things with intuitive knowledge, psychics, going with your gut despite the facts, etc.The sense I mean is closer to "grokking" or "clicking", when symbols and definitions actually mean something. You start thinking with the symbols, not despite them. You actually look forward to checking your understanding with real problems, because when it clicks the problems become easy :).
 Those explanations remind me of Feynman's explanation of elliptical orbits.
 This September, I'm starting tutoring A level maths to underprivileged kids for a charity after helping them with GCSEs last year. This looks like it will be really helpful. Thanks!
 That's awesome! I hope you can make use of the site. One goal for the site is to provide "ammo" to teachers who are looking for other ways to present difficult concepts.
 This is gold. Please do point to more resources like this.
 Thanks for posting this! I just read a small portion of Integration and trust me, it all make sense now!
 I love the content, just wishing for some of their views on explaining electronic circuit design.
 Seems like there are a lot of things i need to learn in maths
 Are there other resources like this on Math?