top | item 18510528

Ask HN: How can I learn to read mathematical notation?

212 points| cursorial | 7 years ago

There are a lot of fields I'm interested in, such as machine learning, but I struggle to understand how they work as most resources I come across are full of complex mathematical notation that I never learned how to read in school or University.

How do you learn to read this stuff? I'm frequently stumped by an academic paper or book that I just can't understand due to mathematical notation that I simply cannot read.

137 comments

order
[+] QuadrupleA|7 years ago|reply
Sort of copy-pasting one of my earlier comments, apologies, but I highly recommend the book "Mathematical Notation: A Guide for Engineers and Scientists" by Edward Scheinerman (Amazon link: http://a.co/c1jcvLH ). It's short, and perfect for looking up symbols, brackets, subscript/superscript conventions etc. for science and engineering math (for me, the stuff I encounter in my programming life, when I read papers & books that deal with graphics programming, DSP, cryptography, etc.).

It's difficult to google mathematical stuff, especially since each symbol has many different meanings depending on which branch of mathematics you're dealing with - this book solves that problem nicely by letting you look up by the roman letter a symbol is similar to, by mathematical discipline, etc.

[+] sabertoothed|7 years ago|reply
You put a referral code in the URL? I find that somehow objectionable.
[+] woodson|7 years ago|reply
John von Neumann once said, "Young man, in mathematics you don't understand things. You just get used to them." While probably not the originally intended meaning, you can take the quote as saying that, after reading a lot of papers in a given field, you will “get used to it” and recognize recurring patterns and what they mean. This is particularly important as more often than not, part of the math is left out (presumably because it’s too trivial for the authors or the want to fit the page limit). So, part of being able to “read the math” is to infer what’s going on in between.

Many papers, especially im engineering, use a lot of mathematical notation that doesn’t benefit the reader, it’s just there to show off. Often, there are mistakes in there too, because no reviewer typically goes to the trouble of checking every single equation. When reading a paper, don’t get bogged down by all the equations. Read it once or a few times before getting down to that level. Often it’s helpful to read other descriptions of a particular algorithm, for example in a student’s thesis, which contain more detail and contextualize some of the math.

While you may not find this comment particularly helpful, as I’m not pointing to a guide or something, you could take away from it that it takes practice and that one shouldn’t be discouraged when you don’t understand the math in a paper, as I guarantee you there are maths professors that couldn’t make sense of it either.

[+] Koshkin|7 years ago|reply
> it’s just there to show off

That is true, unfortunately, in much of the mathematical literature. Way too often authors use the formalized language where the plain language would suffice. This kind of abuse is extremely widespread. It is one thing when a formula is used to represent, say, a complicated integral; it is another when a formula is used to express something just as easily said in a couple of words.

[+] the_rock_says|7 years ago|reply
Thank you for bringing the Neumann's quote. At times I get so bogged down because of these complex mathematical notations. This was particularly frustrating as mathematics is an area where I shine. I started reading between the lines and rewriting those equations in a way I understand. I'm glad to know that many people resonate with this and I'm not the only one that struggles. Thanks HN!
[+] tomrod|7 years ago|reply
I've been reading mathematical notation for decades. You face three things I've noticed:

1. People are typically _really_ bad at writing mathematics -- notational brevity is not a virtue when attempting to communicate ideas. You may find value reading through notes on Knuth[0] and what he taught regarding writing mathematics.

2. There is a certain level of field/conceptual awareness needed when translating the coded concepts in an academic paper/textbook. However, consistent with (1), people are bad at encoding. Using several topical texts at your disposal can help. For example, in econometrics your standard masters year 1 texts are Greene, and Wooldridge. Wooldridge is expansive and simpler to read, Greene is more fundamental and uses horrendous notation. I found reading the same topics in Wooldridge helped me decode Greene, from which I was able to deepen my understanding of Wooldridge.

3. Very few people can read a paper or text once and know it immediately. The most studied professors I know will take months to fully digest a seminal article that incorporates new ideas -- if you're new to a field, _every_ article is seminal to you.

Don't give up. It takes practice to decode, to put the concepts into a mentally straightforward order, and so on. The fact you're asking about it shows that you care, and if you let that grow you'll get to the point you want to be.

[0] http://jmlr.csail.mit.edu/reviewing-papers/knuth_mathematica...

[+] cowboysauce|7 years ago|reply
I think you've got this backwards. You don't need to understand the notation, you need to understand the math. If you don't understand the notation then you probably don't understand the math in the first place so learning notation won't help. Learning how a matrix is written is useless without understanding what a matrix is.

You need to find out exactly what type of math is used in the paper and learn that. Learning notation will come along with that. If you're interested in machine learning then you should probably start with:

* Proofs and logic (a general requirement to understanding math) * Linear algebra * Statistics * Some multi-variable calculus

[+] lucb1e|7 years ago|reply
Partly, perhaps. For me, a large part is the notation. I know conditionals, I know loops (as in for loops), I know SQL... but if you show me logic, set theory, a sigma, or, uh, what's this sigma but for multiplication, I wouldn't have known what you meant a few years ago. It's not only understanding the math, it's also the notation.

I still don't know how to read things like curly braces or matrices or a dozen other things that I don't even know the name for, and figuring it out is usually more work than it's worth. As a result, I don't understand Wikipedia articles that are supposed to be introductory and understandable to the masses, but because the article's writers are being fancy, it's only understandable for a privileged few. Often the concepts, if I do bother to understand them or look them up elsewhere, are rather simple.

It also doesn't help that people use things incorrectly or ambiguously. Sometimes a line over some math will mean the average (or "mean", to use the ambiguous lingo) and sometimes it's an infinite repetition.

Or the lingo: a friend of my girlfriend was baffled I didn't have X in school and didn't know what it was (I think it's derivations). She kind of explained it to me and I kind of understood, not recognising it. Later that evening I used it, unknowingly, in programming. When showing my girlfriend what I made she pointed it out to me.

Heck, I recently used logarithms fairly intuitively where they were never properly explained to me. I just knew the formula for entropy calculation (log(possibilities)/log(2)) by heart and managed to make something that converts a number from any base into any base (e.g. base 13 to base 19). I can do math, just nobody bothered to tell me about the fancy symbols. To me, the symbols mainly seek to obfuscate, look smart, and ensure job security.

[+] jfarmer|7 years ago|reply
I second this. The notation was driven by the concepts, problems, and approaches. If the notation feels bizarre it’s because you don’t see how it improves/clarifies the underlying concepts, problems, and approaches.

Learning the notation itself can be useful as a way to point you towards relevant concepts, e.g., “Where did this symbol come from and why did it become the convention? What concept/problem/approach motivated it?”

But if your goal is to memorize a bunch of symbols you’re gonna have a bad time.

[+] FridgeSeal|7 years ago|reply
I agree: learning the specific notation becomes trivial once you understand the underlying mathematics.
[+] ashelmire|7 years ago|reply
I've taken reasonably advanced math courses (I was, for a time, a math major), and I have a great deal of difficulty with machine learning papers. They often reference domain-specific formulas that are prerequisites, sometimes without naming them, and rarely does a paper actually define every symbol used in a formula (in fact, I don't think I've ever seen a paper do this - it's usually none, and they only define a few elements of the notation). The worst part is that they'll use a known formula, but change the notation slightly without explaining why.

These are bad academic habits. If you're using a formula with a dozen variables - at least state what they are, as well as any more unusual or overloaded notation, subscripts, etc. If you're using a formula from elsewhere, it's better to restate what these symbols mean in your paper, rather than send the reader off on a hunt. Be clear, be explicit, leave no doubt. You don't have to explain all of probability theory, but it takes only a line or two to vastly improve the readability of your paper.

[+] iguy|7 years ago|reply
Machine learning papers are a particularly toxic brew of people in a rush, who like to show off, and who spend all day fiddling with code & little time reading or writing mathematics. Lots of formulas for quite simple things are at best ambiguous and at worst simply incorrect.
[+] dragon96|7 years ago|reply
My recommendation is to focus on these two items and ignore everything else until then:

1) Logical quantifiers: ∃ ("there exists") and ∀ ("for all"). Quantifiers can get confusing when they get strung together. I like to think of them as challenge-response games. For example, your real analysis textbook asserts that a function f is continuous at x if ∀ e>0, ∃ d>0 such that if |x0-x|<d, then |f(x0)-f(x)|<e. I think of two players, Ella and Daniel, with the ∀ player (Ella) trying to disprove and the ∃ player (Daniel) trying to prove the statement. Since the definition asserts "∀ e>0", all Ella needs is a single counterexample e' such that no matter what d'>0 Daniel chooses, the condition is false. Or mathematically written, Ella's objective is to prove "∃ e'>0 such that ∀ d'>0, the condition doesn't hold." Notice how taking the converse flips the quantifiers.

2) Set notation: S = { x∈R | 0<x<1 } reads as "S is the set of real numbers that are between 0 and 1". You can also think of this as {x ∈ domain | filter_condition(x,y,z,...)}. You'll see many mathematical objects represented as sets, so it's pretty important to know how sets are defined.

[+] jjgreen|7 years ago|reply
From outside, one might think that the notation is universal and unchanging, nothing could be further from the truth: each field has its own take, its own conventions. One even finds groups within a field who "go their own way", and there are national differences too. Sorry.

Realistically, find a paper that interests you, hopefully they will list some expository text in the references (or a paper that they cite does). Get it and read it. There's not really any alternative if you want to understand the notation, it represents complex ideas compactly, so you need at least a basic grounding in those ideas.

[+] JesseAldridge|7 years ago|reply
https://en.wikipedia.org/wiki/List_of_logic_symbols

https://en.wikipedia.org/wiki/Table_of_mathematical_symbols

These might help a bit.

But as someone with similar problems, I'm beginning to think there's no real solution other than thousands of hours of studying.

[+] williamstein|7 years ago|reply
"There is no Royal Road to Geometry." -- Euclid

I've spent time studying number theory (Ph.D. Berkeley, wrote 30+ papers and 3 books), and it really is very deep. If understanding some notation or mathematics doesn't come easily to you, that's normal. It often takes Ph.D. students years of fulltime study just to understand a single research paper. This is because mathematics is a very deep subject, certainly much deeper than everything else I've encountered in academia. The good part is that pretty much all mathematics does make sense, and can be truly 100% understood if you're willing to invest enough time, unlike the case with many other things in life! An added bonus is that much of mathematics is also incredibly beautiful, when you understand it.

Listening to lectures by excellent speakers (many are on youtube now) helps a lot.

[+] westurner|7 years ago|reply
There are a number of Wikipedia pages which catalog various uses of symbols for various disciplines:

Outline_of_mathematics#Mathematical_notation https://en.wikipedia.org/wiki/Outline_of_mathematics#Mathema...

List_of_mathematical_symbols https://en.wikipedia.org/wiki/List_of_mathematical_symbols

List_of_mathematical_symbols_by_subject https://en.wikipedia.org/wiki/List_of_mathematical_symbols_b...

Greek_letters_used_in_mathematics,_science,_and_engineering https://en.wikipedia.org/wiki/Greek_letters_used_in_mathemat...

Latin_letters_used_in_mathematics https://en.wikipedia.org/wiki/Latin_letters_used_in_mathemat...

For learning the names of symbols (and maybe also their meaning as conventially utilized in a particular field at a particular time in history), spaced repetition with flashcards with a tool like Anki may be helpful.

For typesetting, e.g. Jupyter Notebook uses MathJax to render LaTeX with JS.

latex2sympy may also be helpful for learning notation.

… data-science#mathematical-notation https://wrdrd.github.io/docs/consulting/data-science#mathema...

[+] elf_m_sternberg|7 years ago|reply
I recently wrote an article called "So You Want To Get Into Theoretical Computer Science," which is mostly about how to read a bunch of papers to figure out some obscure, heretofore unimplemented (outside of academia) algorithm.

The biggest challenge was reading the mathematical notation, to whit: the four biggest papers in the field I was studying used four different notations, and that you'll end up writing your own translation guide:

https://elfsternberg.com/2018/10/27/so-you-want-to-get-into-...

[+] ColinWright|7 years ago|reply
I don't know of any easy way to learn to do this from the outside without coming up through the ranks (as it were). The only thing I can suggest is to get a few examples, and ask some friends, colleagues, or on-line forums what they mean. Pick one or two, and ask in different places. The level of assistance you can get from a well asked question in the right place can be extraordinary.

But be aware that mathematical notation is not, without context, unambiguous. So you might need to provide some context for what you're doing, or where you get the examples from. Some people think this is a weakness of mathematical notation to be solved, but I've found it tremendously powerful. There is no doubt, however, that it is an accidental barrier to entry.

So post a picture of a piece of notation, and maybe someone will either explain it, or point you at a book/website that you can read.

[+] cursorial|7 years ago|reply
Ah, I see, so it's just a matter of reading something, not understanding it, figuring out what it means and learning from that rather than there being a place where I can specifically read up on it.

I guess I just need more practice.

[+] rwilson4|7 years ago|reply
I think “mathematical maturity” is an important aspect of this discussion. Mathematical maturity is basically the ability to read a paper or textbook without assistance. It takes years to develop, and you still have to be familiar with the topic! For example, I feel comfortable reading statistics papers, but I would be totally lost reading number theory. As others have commented, familiarity with the foundational ideas is just as important as the notation.

So how do you get mathematical maturity? A bachelor’s in math, or equivalent. Meaning, approximately 4 years of focused, ideally guided, practice. I don’t think there are any faster ways.

Edit: Also important to know: most papers are poorly written, so that definitely doesn’t help. It’s especially important early on to identify who the leaders are in a field, and focus on their writings. In statistical Machine Learning, I recommend anything by Trevor Hastie, Rob Tibshirani, Bradley Efron, and Martin Wainwright.

[+] gmiller123456|7 years ago|reply
Understanding the notation is only the first little step in understanding the underlying principles. There are a lot of machine learning books/classes that will cover the underlying principles you need to understand what's covered in the book. Exactly which one to recommend depends on your background, but Andrew Ng's Coursera Course [1] has been a staple for people without a lot of math background.

[1] https://www.coursera.org/learn/machine-learning?authMode=log...

[+] sqrt17|7 years ago|reply
Ng's Coursera course will teach you what happens in Deep Learning and Machine Learning, but at least the Deep Learning course is very very light on the math side and avoids scary mathematics rather than making it accessible.

Without having read it, I'd recommend the "preliminary maths" part of Bengio et al's Deep Learning book - it teaches both the letters and the language, so to speak, and if the language isn't for you, you'd better throw away the papers and completely concentrate on reading and understanding the implementations that are our there, using the implementation first and foremost and the paper only as a backup to provide explanations when the implementation does mysterious or unexplained things.

You can do deep learning productively without having a PhD, but you won't be able (nor obliged) to read and understand PhD-level academic papers unless you have a solid (i.e., maths or physics or math-rich CS BSc) maths background.

[+] faceplanted|7 years ago|reply
It's the first little step but you can't discount it, I struggled through my CS degree being "bad at symbols" until I found the book in the top comment and things got significantly easier, because even the mathematical courses that don't expect much maths background are taught by people who do have that background and often fall back on those symbols and the vocabulary they've got the experience with.

Honestly it's weird getting this far without knowing the symbols well, I went to a significantly poorer and less well staffed school that most of my fellow students, and you're kind of between a rock and a hard place sometimes, because no-one sees it as their job to catch you up, and the people who do know it learned it long ago manually and don't exactly have an easy time teaching you if you ask.

[+] andyjohnson0|7 years ago|reply
+1 for Andrew Ng's ML course.

I did the course earlier this year, and I can confirm that you don't need much more than high-school level maths knowledge. If you understand concepts like functions and summation then you're most of the way there, and if you've got some calculus then it should be easy. I came out of it with better mathematical comprehension than when I went in.

I found that I spent a lot of time on the course converting mathematical notation into code (octave/matlab), which is a great way to validate your understanding of the maths. If you're understanding is wrong then it either throws an error, or runs slowly because you failed to map summations etc onto the appropriate parallelised operations.

ML has moved on a bit since the course was designed, but it's still a good way to get familiar with the basics.

[+] sonabinu|7 years ago|reply
I tried to overcome the notation issue by taking a ML class as a non- degree seeking student from the CS dept of a good university. I took it for credit, so invested a lot of time on hw and paper reading. I’m more comfortable with the notation now and am better at learning independently. I also did calc, linear algebra and Differential equations classes at a community college prior to this.
[+] lmilcin|7 years ago|reply
Well... perseverance is the name of the game.

The secret to reading papers in unfamiliar field is to not get discouraged just because you don't get it immediately. Instead, I will research each concept I encounter that I don't understand well.

Let's assume I want to understand something in a field I am not familiar with. It is important to understand that this typically means I have to get at least somewhat familiar with the field. I don't expect to read a paper and get it just from that single read!

I will open the paper and first just read what I can from start to end without stopping to research anything. This gives me some idea what the paper is about and what are some of the concepts that are important and how they are used later. I call this scanning.

I will go back to the start and slowly go researching EVERYTHING, ABSOLUTELY EVERYTHING that I don't understand. This is most of the work. I will keep the paper open and have something to mark where I currently am. I will research meaning of every symbol and every piece of notation, every concept being introduced, until I am confident I understand it.

This may take multiple days to advance a single line as I will frequently spend time on tagents or just getting up to speed with the basics.

Once I go through entire paper I will get back to start and now read it again. Now that I know the language of the paper I can focus on the matter at hand. I may do this few times until I am satisfied I got everything I could.

Again, I want to stress it, don't expect to understand a paper in unfamiliar field on the first reading. It is completely unrealistic. Use materials, ask people to explain, research on the Internet, rinse and repeat.

[+] AndrewKemendo|7 years ago|reply
Frankly, I don't think you can without it being specific to the field you're learning. That's why having a symbolic reference is always amazingly helpful in textbooks.

For example, the lowercase sigma symbol is used for a half-dozen different things depending on the field you're working in.

In Machine learning, if you use a logistic function as your activation function you'll use the lowercase sigma symbol to represent the sigmoid variable. However if you're working in Physics, the lowercase sigma symbol is the Stefan-Boltzmann Constant. So any good text or otherwise will explicate what the function symbols represent.

Some algebraic/calculus functions such as sum over set, divisor, sets etc...should be the same, and I haven't been able to learn how to crack that specific question as to generalizing all of those operations that isn't "go back to get a mathematics degree."

[1] https://en.wikipedia.org/wiki/Activation_function

[2] https://en.wikipedia.org/wiki/Stefan%E2%80%93Boltzmann_const...

[+] daniel-levin|7 years ago|reply
I think the lazy and somewhat cynical answer is also the most accurate: learn the mathematics.
[+] nf05papsjfVbc|7 years ago|reply
Indeed. I was thinking that the question is in some ways like asking "How can I understand the chemical symbols used in these equations". One could perhaps memorise that 'Na' is Sodium and H is Hydrogen but without knowing what they are and how they behave etc. an equation in isolation is meaningless and won't help to understand the reaction.
[+] inverse_pi|7 years ago|reply
There's a long version and a short version. The long version is you have to learn to write mathematics by yourself. Start with an intro course and start deriving theorems by yourself. Do not look at the proofs. At this stage, details are very important and can't be overlooked. You need to be your own critic and keep asking why and how to every single detail and step until you can convince yourself that you would be able to naturally come up with the theorem and proof. Continue doing this to higher level courses. This is how I learned Math since middle school all the way throughout graduate school.

The short version is you have to ask the right questions. Naturally for every theorem or equation, there are 3 big questions:

1) What does the theorem/equation say? What's the intuition behind it?

2) Why is it true?

3) How does one come up with it?

One must ask these questions in the exact order. To understand what the equation really means, you should break it down further to smaller components. What is this variable? What does it represent? What is the intuition behind what it represents? What's the implication when the variable increases, decreases, etc? Do that for every single component in the equation/theorem. One should fully understand the intuition and clearly describe all quantities before trying to look at the equation/theorem as a whole.

To understand why an equation/theorem is true you need to build up a repertoire of theorems related to the quantities of interest. The bigger your repertoire, the easier you can prove or disprove something. The more advanced way is to build up intuition around the quantities of interest then come up with intuitive hypotheses. The hypotheses are often easier to prove/disprove. The process repeats.

[+] earlgray|7 years ago|reply
This answer matches my experiences very closely. When you feel you brain begging you to gloss over the equation and move on - that's a red flag that you need to slow down, exercise discipline over your concentration, and figure out what's going on. It might take a few days for the intuition to settle. Personally I've known it to take a couple of years.

edit: patience, self-forgiveness, and a willingness to accept frustration are important traits. You might spend a whole week banging your head against the wall, feeling like you're making no progress, and then one day everything falls beautifully into place. That doesn't mean you did something correctly on the final day - it means you did everything correctly for the whole week before. Don't view a difficult and unrewarding day as wasted time. You're building something very difficult and that takes a bewildering amount of time.

[+] y7|7 years ago|reply
While there is usually some notation that is implicit, and where the meaning depends on the particular field, most papers should explicitly define their notation.

Are you sure it's a problem of notation, and not just that you're not used to reading slowly? Reading academic papers is very different from reading prose, and I find that even though you might struggle understanding it at first read, going through it line by line very slowly does help a lot.

Do you have an example paper you're struggling with?

[+] vanderZwan|7 years ago|reply
Not OP, but in my experience experts everywhere have a blind eye to the conventions they are so used to that they end up skipping giving a definition for them them.
[+] starbeast|7 years ago|reply
I run into the same problem, am much better at understanding maths stated as code than in mathematical notation.

3blue1brown's animated maths channel is pretty good. - https://www.3blue1brown.com/

Khan Academy's maths section covers a lot of stuff - https://www.khanacademy.org/math

math.stackexchange is excellent for specific questions - https://math.stackexchange.com/

One thing that works for me is to try and find something stated both in code and in maths notation, then you can work out one from the other.

[+] imjustsaying|7 years ago|reply
I always wondered why math notation hasn't been replaced by code.

While math notations can be interpreted in different ways, code is going to give an unambiguous result.

Why don't mathematicians, especially those writing in machine learning or computer science domains, do this? Is it just a problem of agreeing on a common language?

[+] pps|7 years ago|reply
I'm also interested in this topic, here you can read some interesting stuff:

"Links to resources talking about how to understand mathematics, mathematical language and mathematical notation."

https://github.com/nbro/understanding-math