Here is my first less wrong post (after years spent blogging in French). I discovered  Anki on this blog. I'm now sharing the tips I've been using for months to learn mathematics with Anki. Example(s) of deck can be found on

I'm a French researcher in fundamental computer science, which essentially means that I do mathematics all day long. But my biggest problem is that I'm really bad at learning mathematics. Let me give an example. Hopefully, you should be able to understand even if you don't know the domains I'm using in my examples. One day, I wanted to discover what category theory is. Another day, I wanted to read an introduction to number theory. Two subjects which seem really interesting. And the first pages of those books seems to be crystal clear. After 10 or 20 pages, I have already forgotten the definitions given in the first page, and I am lost. Definitions are not hard, there is just too many of them.

Let me emphasize that I'm speaking of learning definitions you understand. As far as I know, it is mathematically useless to learn things you do not understand. (Apart, may be, if you try to  learn the first digits of Pi, or some few things like that).

In the category theory example, definitions are explained by showing how well-known properties of algebra or of topology are special cases of the introduced category definition. Those examples are really helpful to understand the definitions. Indeed, it allows my mind to go from new notions to known notions. For example, I recall that Epi and Mono are generalization of injective and of surjective. Or of surjective and injective. I can't remember which is which. But at least I know that an arrow can both be Epi and Mono. And even know that I know that Epi in Sets are surjective, I still don't know which of the properties of surjection remains. Which is a trouble since having only the Set example would imply that Epi and Mono imply Iso.

And, to solve this kind of problem, a spaced memorization software is wonderful. The only trouble I have is that the decks which already exist are not really interesting. Because, usually, card creation did not follow any special logic (some scanned hand written lectures note). And furthermore, the already existing decks concern mathematics I'm not interested in. I don't want to learn multiplication table, nor calculus. In fact, the only decks from the community I use are the one from Rationality, from A.I. to Zombie and the one which teach good learning practice. Hence, I'm now creating decks, from books on topic  I want to know.

The rules I follow


I create a deck per book. Hence I will be able to give the decks to the community, telling each time exactly what belongs in the deck. It means I accept to put in the decks things I already know. And to put the same thing in different decks (for example, the definition of Open Sets of course belongs to a topology deck. But it also belong to a complex analysis book where this definition is restricted to the case of metric space.) I don't think I'm really wasting my time, it allows me to learn things I don't perfectly know but that I would not have created otherwise. Furthermore, it will hopefully allows the community to begin by any book.

I must emphasize that the decks are supposed to help reading the book. Not to be used instead of the book. Because having read the proof at least once is often important. And my decks do not contains proofs (apart when I'm reading research paper and that my goal is to understand complex proofs).

I don't create the entire deck at once. For example, I'm reading a set theory book. Right now I've only read the first chapter. Because there are already too many definitions I do not remember correctly and which is confusing (the type, the cofinality, ...). Hence it  would be too much of a trouble to read the 2nd chapter yet. (Relating to this, I will need to tell the users of my decks to suspend the chapter n+1 until they know the content of the chapter n.)

Reciprocally, I create many decks simultaneously. Which is coherent with the way maths are studied in university. That is, even if I'm currently blocked in the complex analysis book, I can still read a graph theory book. And while I learn my analysis course, I can create the graph deck.

Kind of cards.

A basic anki card is a question and an answer. Sometime, both sides of the cards are questions and answer. It's useful for vocabulary. Since I'm French, I want to know both the English and the French name of the definitions I learn.

Otherwise, I only use clozed deletions. That is, a basic text, with holes you must recall. (Note that it allows to simulate basic cards. So once you selected cloze deletion, you never need to switch back to usual mode).

Apart from the usual «front» and «extra» field, I always have a «reference» field. In this field,  I write chapter, section, subsection and so on. I also write the theorem, lemma, corollary, definition number. I do not write down the page number because of laziness. I think I should, because some books have long sections without any numbered results. And in those case, it takes minutes to find where an information come from. Having theorem number is required because, in order to recall a result, it is usually helpful to remember its proof. And reciprocally, if you forgot the theorem, it may be usefull to read its proof again.

Last important fact. I told Anki not to erase fields when I completed the creation of a card. It is clear that chapter and section numbers rarely change, so it is useful not to have to write them down again. Concerning the mathematics part, I saw that successive cards are often similar. For example, in a linear algebra book, many results begin by «Let U,V be two vector space and T a morphism from u to V». It is helpful not to have to retype it in each cards.


In a definition card, there is usually three deletions. The first is the name of the defined object. The second is the notation of this object. The third one is the definition. If an object admits many equivalent definitions, all definitions appears on the same card. Each definition being a different cloze deletion. Indeed, if your card is «A square is ... » and you answer «A diamond with a 90° angle», you don't want to be wrong because it is written «A rectangle with two adjacent side of same length». Therefore, the card is:
«{{c1::A square}} is: equivalently
-{{c2::A diamond with a 90° angle}} or
-{{c3::A rectangle with two adjacent side of same length}}»

Beware, sometime it is better if the name and the notation belong to the same deletion. For example, if X is a subset of a vector space, it is easy to guess that «Aff(X)» is «the Affine Hull  of X» and that «the affine hull of X» is denoted «Aff(X)». What you really want is to recall that «the set of vectors of the form Sum of x_ir_i, with x_i\in X and r_i in the field, where the sum of the r_i is 1»  is «the affine hull of X».


A theorem usually admits two deletions. Hypothesis and conclusion. It sometime admits a third deletion if the theorem has a classical name. For example you may want to remember that the theorem stating «In a right triangle,  the square of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the other two sides. » is called  «the Pythagorean theorem».

Beware, no hypothesis in a deletion should  introduce an object.  «If, ... , then the center of P is not trivial» is hard to understand, whereus «Let P be a group. If ..., then the center of P is non trivial» is more clear.


A first important thing is to always write all hypothesis. Sometime, some hypothesis are given in the beginning of a chapter and are assumed to be true in the whole chapter. But, when the card appears, you don't recall those hypothesis (and you don't want to learn that, in this very book, in this very chapter, only complex vector spaces are considered).

It is important to have empty deletion. In automata theory, some theorems deal with monoids, and some other only deal with finite monoid. If I write «If M is a {{c1::finite}} monoid» for theorem dealing with finite monoid, and  «If M is a monoid» for theorem dealing with arbitrary monoids, the deletion show that M is assumed finite. Therefore, in the second case, I must write «If M is a {{c1::}} monoid». It's really simple to do, since Anki don't delete the fields when I create a card. So, when the hypothesis that M is finite is not required anymore, I can keep the deletion in the field to create the new card.

Multiple implications

This leads me to another problem. An hypothesis may have many implications. And a property may be implied by many hypothesis. Therefore, it is better to state:

«If {{c1::P1}} or {{c2::P2}} .. or {{c3::Pi}} then {{c4::Q}}», or «If {{c1::P}} then {{c2::Q1}} and {{c3::Q2}} ... and {{c4::Qi}}». Indeed, you don't want to be wrong because, of all hypothesis, you thought of the wrong one for this very card. Here, each term in brackets represents a cloze deletion.

There would be a problem if P implies Q and R and if O and P  both imply Q. But this has not happened yet to me. It seems that it does not often happen in math textbooks.

Order of the words

When a theorem is of the form «{{c1::The  centralizer of A in G}} {{c2::divides}} {{c3::the normalizer of A in G}}», you must also have a card «The normalizer of A in G {{c1::is divided by}} the centralizer of  A in G». Otherwise, you could guess the result by pattern matching. Because you know the hole in the middle is either an equality or a dividability statement. Right now, I did not figure out how to do this efficiently. But I should edit my old cards in order to satisfy this property.

Note that you always want to have a cloze deletion named c1. If you don't have it, you can't preview your card, therefore you can't check whether your LaTeX compile. And if you choose to change c2 to c1 later, you need to review your card again, because Anki thinks that it is a new cloze deletion.


The last thing I want in Anki are examples. Generally, they are of the form 
«{{c1::A}}, {{c2::B}}.., {{c3::Z}} are examples of {{c4::P}}».

I used to believe that examples were not mathematics. Because, as a Bourbakist, as a logician, I know that an example does not belong to any theory. What matters is definitions, axioms, theorems, proofs. Since, I understood examples have at least three goals. Officially, it gives intuition, and shows cases where theorems can be applied. Formally, it shows that some set of hypothesis is not contradictory, hence it is useful to consider those hypothesis. In practice, this very examples may be used when one want to test statements which does not appear in the course. That is, examples are sometime answers to exercices, or counter example to idea one may have.


Once the cards are made, I ask to Anki to create all images using LaTex (which should be done immediatly in a perfect program, but is not). And I use synchronization to send all cards to my smartphone. (Free application, without ad, they are wonderful!) to learn in the public transport.

Of course, when I  create cards, I made mistake. Either because my LaTeX doesn't compile, and Anki shows an error message in the cards. Or because I forgot a word, wrote a word instead of another one. (For example, I always write «set» instead of «state».) If I believe there is a mistake, I suspend the card. Once at home, I synchronize and, on my computer, check whether it is really a mistake or not. 
It is why I wrote the chapter and section number of each card.  It allows me to check quickly whether the card and the book states the same thing.

Sometime, the mistake is a bad cloze deletion. It is possible that, when a part of the sentence is deleted, it makes no sens anymore. For example, it happens if I did not follow the above mentioned rules. (It was the case for the first deck I created, where I didn't devise any rule yet). Same rule applies if I see a mistake so big that I do not understand anymore the question I asked. 

Thanks to dutchie and to rhaps0dy who corrected many typo of this post.


New Comment
12 comments, sorted by Click to highlight new comments since: Today at 5:50 PM

Figures my first comment would be about this topic as I am currently planning to write a book on how to use SRS to increase learning efficiency (directed at college students)

I have some questions about your use of Anki to learn mathematics because I started using Anki when I was studying Physics and was never able to use it successfully for the purpose of learning math-heavy subjects:

1 - You say that you use Anki so that it is easier to read a textbook so I was wondering whether you think Anki has helped you retain that knowledge in the long term or whether you use it solely while you are going through the textbook

2 - Do you keep your cards in separate decks even after finishing the textbook? I'm of the opinion that a single deck for long-term cards is better for interleaved practice benefits, but one of the problems of math-heavy cards is that they are so context dependent that the interference between cards ends up destroying recall performance so I wanted get your input on how you handle that

3 - Not really a question, but can you upload the Sequence deck anywhere? Can't find it online anymore.

I liked when you said that you add some cards to help break pattern matching, it is also one of the things I've noticed as I've used Anki over the years. I like to think of redundancy as a core concept when thinking about card creation in the sense that some non-trivial things should be added over different cards in differing formulations so that your recall of that piece of knowledge isn't tied to some pattern that isn't available when you're not doing card review.

A first deck is shared on I may want to edit it more before uploading it on Ankiweb servers. But I'm confident that this deck have high quality compared to what is currently on ankiweb.

I don't have a ton of math cards, but I have a few, plus I've used anki alongside a few other textbooks (as well as for learning programming languages, which is against the grain of common advice), and I've been using anki effectively for about three years now (I used it ineffectively for several months before that - I think the learning curve of making good cards about the right things is one of the hardest parts of anki).

I think long term retention of these texts is one of the biggest advantages it has. I tend to go through phases of caring and not caring about topics, and with anki I've been able to ignore a text for months and then jump back in pretty quickly (where before I would have had to start mostly over, even if I could move through the old material much faster than before).

Why the grain of common advice (never heard this expression before) says not to use Anki to learn programming language ? I find it useful in order to recall the order of the argument of certain functions, like List.fold_left and List.fold_right, that I often uses when programming.

The expression is "against the grain", deriving from cutting wood against its grain, fyi.

I don't know why common opinion is against it, it's just the impression I've gotten. I think it stems from the tendency to caution against blindly memorizing things that you could just look up when needed.

But there's a middle ground of things that I'll forget without anki cards but that I do use often enough to justify memorizing.

1- I hope it to works for long term memory. But I have been using Anki for 6 months now. Therefore, I can not say anything about remembering things for years. I can however, that it certainly helps remembering some things during a few months. It implies that it helps going through the book, even if it takes months to read an entire books. Because if I recall the n first chapter, it becomes really easyer to read chapter n+1.

2- It is really too soon for me to answer that. I can try to keep you updated in a few years :p I did not finish the deck of any text book yet since I began using Anki. Because I have 3 new cards by days, and hundreds of cards for some books. However, all decks are of the form «math::book». Hence I simultaneously see cards from a lot of different decks. I don't have any trouble with context, but it may be because I always write down all hypothesis. Therefore I always have all context in my cards. And if I think I have not enough context, I edit the card to add the missing information.

(For example, I currently read a book about group theory and a book about semigroup theory. After a few days, I understood I always must explicitely state whether a morphism is a morphism of group or a morphism of semigroup in order to have all context. Thus I edited 20 or 30 cards. And all was ok after that)

3-I will do it once I finished the deck at least one. I don't want to do it before that, because I can't know whether all cards are correct and makes sens until I tested myself all cards.

I've heard about Anki before, but I haven't tried this method of studying. Some questions related to mathematics I solved with the help of a tutor or various services, like WolframAlfa. Also, on this site, you can ask questions about mathematics (but not only), as on the Quora, and get useful answers and advice. Some useful information about Anki I found on Reddit:

Thanks, this is useful.

I've been thinking about doing this - I'm trying to learn math (real/complex analysis, abstract algebra) for 'long term retention' as I'm not really using it right now but want to get ahead of learning it later, and struggling with retention of concepts and core proofs.

Do you think it's going to be useful to share decks for this purpose? I feel like there are many benefits to making my own cards and adding them as I progress through the material, and being handed a deck for the whole subject at once will be overwhelming.

I am going to share my decks when I'm confortable with their quality. They will all be on Right now, there is only the deck from Linear Algebra done Right. Both as an anki package and as text

In both case, you'll need an LaTeX compiler to see them correctly. Sharing the compiled version of LaTeX seems to be hard for my computer. I don't really know, when I try to export with the media, the programs halts.

I do think it is useful to share decks. Because I don't think creating the deck helped me a lot. On the other hand, I'm pretty sure that it's a bas idea to use the deck for parts of the book you didn't read yet. It is why I do advise to suspend the chapter you didn't entirely understood yet.

As @Gurkenglas says, automatically suspending chapters could be a useful anki feature in this case. I'm not sure it would be useful for many people in general.

That sounds more like Anki decks need a feature for making what cards are shown tied to what chapter you say you've read up to.

You can fake this reasonably well with tags, or alternately, just importing on a chapter by chapter basis.

New to LessWrong?