# Every mathematician has only a few tricks

In Gian-Carlo Rota's "Ten lessons I wish I had been taught" he has a section, "Every mathematician has only a few tricks", where he asserts that even mathematicians like Hilbert have only a few tricks which they use over and over again.

Assuming Rota is correct, what are the few tricks that mathematicians use repeatedly?

• A mathematician never reveals their tricks. – Sam Hopkins Jun 15 at 14:39
• Going to MO, because that way all the tricks are pooled. – Michael Engelhardt Jun 15 at 14:43
• I once heard a Fields Medallist say that his research consisted of interchanging the order of summation and applying the Cauchy-Schwarz inequality. – Simon Wadsley Jun 15 at 15:38
• I am not sure what to expect from answers to this question. I always thought that the point Rota was trying to make was that a mathematician has only a small set of "tricks" that the mathematician has personalized deeply enough to always reach for and use them. Certainly we all "know" a lot more mathematics than a few tricks, but we natively are all truly fluent in a much narrower range than one would naively expect. I thought the point was that the set of techniques was particular to each mathematician. What am I missing here? @MartinSleziak's suggestion for an answer format seems reasonable. – Jon Bannon Jun 15 at 22:41
• I think this question misunderstands the quote; I'm surprised at so many upvotes. I think the point is that every mathematician has a few tricks that are her own. We don't necessarily know each other's tricks. That's why the observation has some real content.... i.e. it's not that everyone else is super clever and you are average because they too only have a few tricks, it's just that you do not understand their tricks, you only understand your tricks – T_M Jun 16 at 9:45

$$\sum_{i=1}^m\sum_{j=1}^n a_{i,j}=\sum_{j=1}^n\sum_{i=1}^m a_{i,j}$$

(and its variants for other measure spaces).

I still get misty-eyed whenever I read something that capitalizes on this trick in an unpredictable way.

• In some ways, Fubini's theorem is just a fancy version of this. – Gabe K Jun 15 at 15:44
• I tell my students in basically every class I teach always to pay attention to the order in which a double sum (or double integral, or sum-of-an-integral) first shows up, because chances are, the best thing to do next is change the order of summation/integration. – Mark Meckes Jun 15 at 20:23
• People have made millions on algorithm speedups based on that. Find a first integral that's stable over repeated calculations, change the order of integration, and voila! your program is several orders of magnitude faster than competitors'. – Michael Jun 15 at 21:00
• Gelfand in one of his paper about integral geometry mentioned the fundamental trick which is version of what you wrote. If $$A\stackrel{\alpha}{\leftarrow} C\stackrel{\beta}{\rightarrow} B$$ and $f$ is a function on $C$, then $$\sum_{a\in A} \sum_{\alpha(c)=a} f(c)=\sum_{b\in B}\sum_{\beta(c)=b} f(c).$$ The inner sums are pushforwards and they have counterparts in other categories. Grothendieck used it succefully when applied to the (derived) category of coherent sheaves. E.g., you can get Poincare-Hopf theorem this way. – Liviu Nicolaescu Jun 16 at 11:41
• @LiviuNicolaescu This is very neat. What I wrote is the special case where $A=[m]$, $B=[n]$, $C=[m]\times[n]$, $\alpha$ and $\beta$ are projections, and $f\colon (i,j)\mapsto a_{i,j}$. Thanks Liviu! – Gabe Conant Jun 16 at 12:29

In combinatorics: shove it into OEIS, and see what's up. Also, add more parameters!

• Does "snake oil" count as a trick? – qwr Jun 16 at 6:36
• That's basically the source of my PhD. – Simon Rose Jun 16 at 18:39
• More parameters, meaning "catalytic variables"? – Somatic Custard Jun 16 at 21:20
• @SomaticCustard Well, the recent example I worked with, mathoverflow.net/questions/362265/… was solved by first generalizing the problem, (adding two additional parameters a and c). – Per Alexandersson Jun 16 at 21:24
• @PerAlexandersson Nice! – Somatic Custard Jun 16 at 22:36

Dennis Sullivan used to joke that Mikhail Gromov only knows one thing, the triangle inequality. I would argue that many mathematicians know the triangle inequality but not many are Gromov.

• Just in case somebody takes Sullivan's joke literally: I was always amazed how much analysis (including PDEs and functional analysis) Gromov knows. (As well as topology, dynamical systems,...) – Moishe Kohan Jun 16 at 15:13
• In 1994, Vladimir Arnold was upset that among the Fields medalists, "three were inequalities manipulators". – Denis Serre Jun 16 at 16:18
• Did Arnold think that number was too high, or too low? – Harry Wilson Jun 17 at 19:59
• In his book Partial Differential Relations, he showed that he also knows elementary. linear algebra. – Deane Yang Jun 21 at 0:43
• @HarryWilson: just that it's less or equal than the sum of two other numbers of Fields medallists. – Steve Jessop Jul 4 at 15:17

A very useful generic trick:

If you can't prove it, make it simpler and prove that instead.

An even more useful generic trick:

If you can't prove it, make it more complicated and prove that instead!

• The first is sometimes attributed to Polya. A related piece of wisdom due to de Giorgi: "If you can't prove your theorem, keep shifting parts of the conclusion to the assumptions, until you can." – Todd Trimble Jun 16 at 0:10
• "In dealing with mathematical problems, specialization plays, as I believe, a still more important part than generalization. Perhaps in most cases where we unsuccessfully seek the answer to a question, the cause of the failure lies in the fact that problems simpler and easier than the one in hand have been either incompletely solved, or not solved at all. Everything depends, then, on finding those easier problems and on solving them by means of devices as perfect as possible and of concepts capable of generalization... – Ivan Meir Jun 16 at 0:12
• ...This rule is one of the most important levers for overcoming mathematical difficulties; and it seems to me that it is used almost always, though perhaps unconsciously" —David Hilbert, “Mathematical Problems” – Ivan Meir Jun 16 at 0:12
• These methods can be combined. First generalize the problem, making it more complicated. Then simplify along a different axis. – Stig Hemmer Jun 16 at 7:22
• This reminds me of Zeilberger's paper on the method of undetermined generalization and specialization. – Timothy Chow Jun 16 at 15:47

Integration by parts has allegedly earned some people big medals.

• Perhaps a reference to: mathoverflow.net/questions/53122/mathematical-urban-legends/… – Sam Hopkins Jun 15 at 17:45
• @SamHopkins: Strange, I had heard this about Laurent Schwartz: somebody in his entourage jokingly said "so now one gets the Fields medal for integrating by parts"? – Alex M. Jun 17 at 12:36
• @AlexM.: apocryphal stories like this can often shift and evolve, involving different people, etc. – Sam Hopkins Jun 17 at 12:38
• Transferring that derivative from one function to the other can be life changing. – Steven Gubkin Jun 18 at 21:06

For a finite set of real numbers, the maximum is at least the average and the minimum is at most the average.

Of course this is just the real version of the Pigeonhole Principle, but Dijkstra had an eloquent argument as to why the usual version is inferior.

https://www.cs.utexas.edu/users/EWD/transcriptions/EWD10xx/EWD1094.html

• I'm glad I came here today if for nothing else than to have read that piece by Dijkstra. Thank you for the link. – msh210 Jun 17 at 11:17
• I'm not convinced of the superiority of the other version. It only makes sense for real numbers. What's wrong with "if $A$ has more elements than $B$, then there is no injection $A\to B$"? This version works even for infinite sets (and indeed, it's a commonly used trick). – tomasz Jun 18 at 20:14
• The pigeonhole principle wins my vote, partly because it has such a memorable name and because you can explain it to your six year old. And it really is useful. – Alan Dixon Jul 2 at 14:17

Although Erdős was mentioned in the comments as perhaps having prompted this whole discussion, I'm surprised not to see the basic trick of "try a random object/construction" posted as an answer, which he used so often to such great success.

• what do you mean by "try a random object/construction"? – Rauni Jun 19 at 5:53
• E.g. to prove that some graph exists satisfying a given property, show this holds with positive (or even high) probability for the random graph $G(n,p)$. This is also often called the "probabilistic method." – Sam Hopkins Jun 19 at 12:55

If an integer-valued function is continuous, it has to be constant.

This trick shows up in many places, such as the proof Rouché's theorem, and basic results about the Fredholm index.

• ...as long as the domain is connected! I happen to have a continuous, integer-valued, non-constant function in my pocket right now. (It's the function which maps each point inside of a piece of currency to the face value of that piece of currency in cents.) – Tanner Swett Jun 17 at 0:59
• @TannerSwett How is your function not constant? – Allawonder Jun 17 at 11:09
• @Allawonder Tanner must have two coins of distinct values in their pocket. Different coins are different connected components of the domain. Each coin maps to its own value, so the function is only locally constant. – Will R Jun 17 at 13:37
• @Allawonder How about the continuous integer-valued non-constant function $\operatorname{id} \colon \mathbb Z \to \mathbb Z$? – Earthliŋ Jun 17 at 16:59

Those of us who are old enough may remember http://www.tricki.org/

Localize + complete, taking a hypersurface section, and using the socle are useful tricks in commutative algebra.

• I scoffed at your first sentence, then quickly had a terrible realisation. – Pop Jun 15 at 15:39
• I've been looking for a reference on the 'localize and complete' type of trick. Can you give an example of the technique in action (or a paper where I should take a look)? – Harry Gindi Jun 15 at 16:57
• @HarryGindi: there are countless examples. Often, a property can be checked locally, then completion allows one to use Cohen's structure theorem, thus working concretely over power series. One not very simple but powerful result where that procedure works is the following: If $R$ is a regular Noetherian algebra containing a field and $M,N$ be f.g modules, then $Tor_i^R(M,N)=0$ implies $Tor_j^R(M,N)$ for all $j\geq i$ (the so-called rigidity of Tor). – Hailong Dao Jun 15 at 17:43
• Am I the only person who has to wilfully resist pronouncing tricki as "tritsky"? – Robert Furber Jun 15 at 21:36
• @RobertFurber Is that you, comrade? – Mitch Jun 16 at 21:36

Hölder's inequality and the special cases, Cauchy-Buniakovski-Schwarz

• Cauchy-Schwarz, arguably, is the only trick in analytic number theory – Stanley Yao Xiao Jun 15 at 21:12
• Cauchy Schwarz Master Class granted it isn't only about Cauchy Schwarz... – lightalchemist Jun 16 at 11:13
• Just imagine, how much would number theorists prove if they use general Hölder inequality instead. – Fedor Petrov Jul 12 at 20:55

Not sure if... well, what the...

Find a duality. Play duals against each other.

• Duality is everywhere. It often appears in subtle and unexpected ways. Surprisingly powerful for something that sounds so simple. – Deane Yang Jun 15 at 18:57
• And yet, curiously, triality doesn't seem to be 50% more powerful as a trick. (Or maybe I just haven't grokked how to use it properly!) – LSpice Jun 16 at 14:03
• @LSpice Maybe because playing three guys against each other is much more tricky – მამუკა ჯიბლაძე Jun 16 at 15:52
• @LSpice: Well... every vector space has a dual, but triality only exists in a few dimensions. – darij grinberg Jun 30 at 17:34
• @darijgrinberg, fair enough; but perhaps one could also suspect that structure that's available all the time must be less powerful than structure that is available in only a few cases. – LSpice Jun 30 at 19:41

Whenever you find yourself trying to implement inclusion–exclusion by hand ... stop immediately and start over using the Möbius $$\mu$$-function.

What worked very well for the French school of algebraic geometry (but it seems to predate them!) is the "French trick" of turning a theorem into a definition. See e.g. this post for some examples and background on the term.

If $$1-x$$ is invertible, then its inverse is $$1 + x + x^2 + \cdots$$. This is the second most useful "trick" I know, after "look for the [symmetric] group acting on you thing", but someone else already mentioned it.

• So for x=2..... – lalala Jun 16 at 20:57
• @Pablo Care to share useful instances of your trick? – Rodrigo A. Pérez Jun 17 at 14:09
• @lalala, for $x = 2$, the inverse is exactly as stated. In $\mathbb Q_2$, anyway. – LSpice Jun 17 at 17:11
• If $x$ is nilpotent, then $1-x$ is invertible – Pablo Zadunaisky Jun 17 at 21:22

If $$r,s$$ are elements of a ring, then $$1-rs$$ invertible implies $$1-sr$$ is invertible (and it is a trick: you can make an educated guess for the formula for the inverse of $$1-sr$$ from that for $$1-rs$$). This can be used to find quick proofs of: (a) in a Banach algebra, $${\rm spec\ } rs \cup \{0\} = {\rm spec}\ sr \cup \{0\}$$ (which in turn yields the nonsolvability of $$xy-yx = 1$$---all one needs is boundedness and nonemptiness of the spectrum); (b) the Jacobson radical (defined as the intersection of all maximal right ideals) is a two-sided ideal; and probably some other things I can't think of right now ...

• This trick is due to Halmos, right?—or at least he wrote up a nice explanation of it. – LSpice Jun 16 at 14:04
• Halmos did explain the motivation for the method (power series) in one of his books. Jacobson in his 1930s (?) book (Theory of rings) must have included it. But I think there is an 1910s paper of either Burnside or Wedderburn which deals with this and a generalization. – David Handelman Jun 16 at 17:42

In the course of working with Hervé Jacquet and reading many of his papers on automorphic forms and the relative trace formula, I feel like he got an amazing amount of mileage out of clever use of change of variables.

I remember a conference where all the speakers gave extremely hard-to-follow talks using very sophisticated machinery, and then Jacquet gave a talk with a very nice result and about 45 minutes of it was going through an elementary proof (once you knew the setup) that boiled down to a clever sequence of change of variables.

• I like this answer as it is more in the spirit of what Rota seemed to be referring to – Yemon Choi Jun 16 at 21:05
• Classical physics is all about this! Hamiltonian/Lagrangian mechanics, Hamilton-Jacobi theory, canonical transformations, finding conserved quantities etc. involve clever choice of variables. – Piyush Grover Jun 17 at 15:31

I couldn't resist adding one of my own: "Apply linearity of expectation".

For example in Barbier's incredibly elegant approach (Buffon's Noodle) to Buffon's Needle Problem.

Andre Weil's slogan that where there is a difficulty, look for the group (that unravels it).

I take this to mean something more aggressive than a truism to note and use group structure; more like "exploit the full potential of representation theory in all its manifestations after seeking out whatever obvious and hidden symmetries exist in the problem".

The chapter ‘A Different Box Of Tools’ of Surely You're Joking, Mr Feynman was named for a particular trick Richard Feymnan used:

[Calculus For The Practical Man] showed how to differentiate parameters under the integral sign — it's a certain operation.  It turns out that's not taught very much in the universities; they don't emphasise it.  But I caught on how to use that method, and I used that one damn tool again and again.

(pp.86–87)

• I asked about Feynman's trick elsewhere on MO and got some interesting responses. – Timothy Chow Jun 16 at 15:45

Maybe more than a "trick," but if you want to investigate a sequence $$a_0,a_1,\dots$$, then look at a generating function such as $$\sum a_nx^n$$ or $$\sum a_n\frac{x^n}{n!}$$. If you are interested in a function $$f:\mathrm{Par}\to R$$, where $$R$$ is a commutative ring and $$\mathrm{Par}$$ is the set of all partitions $$\lambda$$ of all integers $$n\geq 0$$, then look at a generating function $$\sum_\lambda f(\lambda) N_\lambda b_\lambda$$, where $$\{b_\lambda\}$$ is one of the standard bases for symmetric functions and $$N_\lambda$$ is a normalizing factor (analogous to $$1/n!$$). For instance, if $$f^\lambda$$ is the number of standard Young tableaux of shape $$\lambda$$, then $$\sum_\lambda f^\lambda s_\lambda = 1/(1-s_1)$$, where $$s_\lambda$$ is a Schur function. If $$f(\lambda)$$ is the number of square roots of a permutation $$\lambda\in\mathfrak{S}_n$$ of cycle type $$\lambda$$, then $$\sum_\lambda f(\lambda)z_\lambda^{-1} p_\lambda = \sum_\lambda s_\lambda = \frac{1}{\prod_i (1-x_i)\cdot \prod_{i where $$p_\lambda$$ is a power sum symmetric function and $$z_\lambda^{-1}$$ is a standard normalizing factor.

The Renormalization Group trick:

Suppose you have some object $$v_0$$ and you want to understand a feature $$Z(v_0)$$ of that object. First identify $$v_0$$ as some element of a set $$E$$ of similar objects. Suppose one can extend the definition of $$Z$$ to all objects $$v\in E$$. If $$Z(v_0)$$ is too difficult to address directly, the renormalization group approach consists in finding a transformation $$RG:E\rightarrow E$$ which satisfies $$\forall v\in E, Z(RG(v))=Z(v)$$, namely, which preserves the feature of interest. If one is lucky, after infinite iteration $$RG^n(v_0)$$ will converge to a fixed point $$v_{\ast}$$ of $$RG$$ where $$Z(v_{\ast})$$ is easy to compute.

Example 1: (due to Landen and Gauss)

Let $$E=(0,\infty)\times(0,\infty)$$ and for $$v=(a,b)\in E$$ suppose the "feature of interest" is the value of the integral $$Z(v)=\int_{0}^{\frac{\pi}{2}}\frac{d\theta}{\sqrt{a^2\cos^2\theta+b^2\sin^2\theta}}\ .$$ A good transformation one can use is $$RG(a,b):=\left(\frac{a+b}{2},\sqrt{ab}\right)$$.

Example 2: $$E$$ is the set of probability laws of real-valued random variables say $$X$$ which are centered and with variance equal to $$1$$. The feature of interest is the limit law of $$\frac{X_1+\cdots+ X_n}{\sqrt{n}}$$ when $$n\rightarrow\infty$$. Here the $$X_i$$ are independent copies of the original random variable $$X$$.

A good transformation here is $$RG({\rm law\ of\ }X):={\rm law\ of\ }\frac{X_1+X_2}{\sqrt{2}}$$.

(1) Double-counting, which can also be described as counting the same thing in two ways. Very useful, and at least as powerful as interchanging summation order.

(2) Induction. When there is a natural number size parameter, one can always consider trying this.

(3) Extremal principle, which is ultimately based on induction, but looks very different. For example, the Sylvester-Gallai theorem has an extremely simple proof using this.

There's the quote in Bell's Men of Mathematics attributed to Jacobi: "You must always invert", as Jacobi said when asked the secret of his mathematical discoveries. Sounds apocryphal but it is certainly a nice suggestion.

• Buffett and Munger are also known to have incorporated this principle into their investing philosophy. – Favst Jun 15 at 21:02
• Presumably this is related to elliptic integrals giving inverse elliptic functions, just as integrals like $\int \frac{1}{x} dx$ gives the inverse to the exponential function and $\int \frac{1}{1+ x^2} dx$ gives the inverse to the tangent function. – Robert Furber Jun 15 at 21:44
• Sure, but since most problems can be written as a map to invert, the advice sound comical – Piero D'Ancona Jun 15 at 22:02
• @LSpice, it's mentioned in "Poor Charlie's Almanack: The Wit and Wisdom of Charles T. Munger" and many websites that seek to understand and emulate Buffett and Munger. Some details are given here: seekingalpha.com/article/4040474-invert-always-invert . I'm no investor though, so I'm not entirely sure how this philosophy applies practically in day-to-day investments. – Favst Jun 17 at 17:41
• @Favst, thanks. So the 'invert' here isn't 'compositional inverse', but literally 'turn upside-down', or whatever (even in Jacobi's sense, as the expanded quote they include indicates). – LSpice Jun 17 at 17:46

Scott Aaronson has taken a stab at articulating his own methodology for upper-bounding the probability of something bad. He was inspired by a blog post by Scott Alexander bemoaning how rarely experts write down their expert knowledge in detail.

The second derivative test (i.e. "a smooth function has a local maximum at a critical point with non-positive second derivative.") is endlessly useful.

When you first see this fact in Calculus, it might not seem so powerful. However, there are countless generalizations (e.g. the maximum principle for elliptic and parabolic PDEs), which play an important role in analysis.

• If the powerful tool of linearity isn’t good enough, the basic concept of convexity is amazingly powerful. – Deane Yang Jun 15 at 19:03
• @DeaneYang, indeed, it amazes me how a first-order approximation is good, a second-order approximation often allows one to wring out a little more power … and yet, outside hard analysis (and I guess the higher reciprocity laws of number theory?), it seems that third-order approximations are either not so useful, or so hard to use that we aren't able to elevate them to the status of tricks yet. – LSpice Jun 16 at 14:06

In homotopy theory: if something is hard to compute, build an infinite tower that converges to it and induct your way up the tower. This includes spectral sequences, Postnikov towers, and Goodwillie calculus.

In category theory: apply Yoneda's Lemma.

Other common tricks in category theory:

• Swap the order of colimits.
• Embed into a presheaf category (e.g., Giraud's Theorem).
• Reduce to the case of representable functors.

In an old mathoverflow answer, I wrote several more common tricks in category theory, including

• Localization: shifting view so that two objects you previously viewed as different are now viewed as the same.
• Replacing an object by one which is easier to work with but has the same fundamental properties you are trying to study.
• Mapping an object to a small bit of information about the object. Showing that two are different because they differ on this bit.
• Good that you mentioned representability and Giraud! Making non-representable functors representable is an extremely powerful trick. In fact something similar is omnipresent in the whole mathematics: if something you want to exist does not exist, - make it exist! – მამუკა ჯიბლაძე Jun 22 at 8:39

My favorite is perhaps the "commutator trick", i.e. "take commutators and see what happens". Some general things that may happen 1) the commutator touches less than the commutatorands 2) the commutator defies your abelian intuition.

I'm mostly familiar with 1) in the context of infinite groups, in particular finding generators for complicated groups, and 2) blew my mind to pieces as Barrington's theorem before I even knew any math.

I counted that a seventh of my papers use some type of commutator trick, but what really sold commutators to me was when I got a Rubik's cube as a christmas present.

• The obvious example for 1) is how you prove simplicity/perfection of alternating simple groups and others like it. – Ville Salo Jun 16 at 8:42

If, on a probability space, $$\int_\Omega X\,dP = x$$, then there is some $$\omega$$ such that $$X(\omega)\ge x$$.

Existence as a property: You want to find an object that solves a given equation or a given problem. Generalize what you mean by object so that existence becomes easy or at least tractable. Being an object is now a possible property you might prove about your generalized object. Having already something you can prove properties about is often both mathematically and psychologically easier than searching in the void.

Some examples:

• Algebraic closures: In your original field, you don't know whether your polynomial has zeros, but in the algebraic closure it does. If you can show that it is Galois invariant, then it is actually in the original field. (Given that complex numbers are an algebraic closure (though unknown at the time of their conception), this is maybe the most classical of these examples.)
• Representability of moduli problems: Often it is hard to show that a moduli problem is representable by a quasi-projective variety. This is what lead Weil to define general varieties so that he could represent a moduli problem. If your moduli problem does not have automorphisms and you can produce an ample line bundle, you can show afterwards that it is actually represented by a quasi-projective variety.
• Partial differential equations: Often it is much easier to find generalized solutions (Sobolev functions or a distribution). Then the existence of a classical solution is a regularity property of you generalized solution.

This trick is called “stupid argument” by some of my collaborators and me.

Let’s say you have a property that is defined on testing using cubes on all scales. Now you have some regular set (say again a cube or a ball) in which the property holds, that is, if you test with a cube that is contained in this regular set then it holds. You might come in this situation for example by local transformation of sets with this property, like flattening the boundary in PDE. Now to get it for all cubes you make the following case distinction: if the concentric cube of half the size is contained in the regular set, you use your assumption. Otherwise, the original cube contains a cube of 1/4 side length compared to the original one that is completely outside the regular set and for this one you get the property usually trivially.

Since this is a trick, I kept it somehow mysterious. Applicability includes things like measure theoretic dimensions, metric properties like porousity and so on and the exact details why it’s trivial “outside” and why testing with comparably smaller objects is ok depends a bit on the specific property one aims for.