1. Write solutons of problems down carefully

When you’re doing a problem or filling in a proof, you should write the solution down very carefully. For example, with a proof, it would be better to slowly write down each step in complete sentences rather than scrawling a bunch of shorthand and symbols. By doing this, you automatically check every step mentally, because the extra time to put down a statement or reasoning step in full sentences will force you to do so.

Sometimes, it’s possible to get through advanced material, especially papers, without knowing the basic foundations. And eventually, you will have to take some mathematics by faith because it’s simply impossible to know every detail.

However, by spending as much time as possible on foundational material, you will have a deeper understanding of more advanced material when you read it. Things that appear out of nowhere will suddenly make sense. A classic sign that you don’t know enough foundations is always looking up the same facts again and again while trying to understand something.

For example, if your research area is commutative algebra, it would be a really good idea to go over at least one book on commutative algebra line by line, working out every proof and exercise. That type of foundational reading will pay off continuously every time you need to do research.
…read the rest of this post!

Fifteen awesome cross-platform math apps

So much of my learning mathematics happened by tinkering around with mathematics software. Here are fifteen applications I think are really cool, with eleven of them being free.

1. SageMath

Free: Yes
Platforms: Windows, MacOS, Linux
Website: https://www.sagemath.org/

Top on our list is Sage. Sage is a command line and Jupyter notebook based mathematics system that includes an enormous number of features. It has number theory, calculus, linear algebra, combinatorics, group theory, and ring-theory libraries. For the pure mathematician looking for a little computational algebra, Sage is one of the easiest to start using. The only difficulty with Sage may be that because it includes SO much stuff, the installation size is huge. The install size of 9.2 (the most recent version at the time of this writing) on my computer is 13.1GB.

Sage is usually run in the browser via a Jupyter notebook

I highly recommend Sage. Some of the computations I have done in Sage have led to published results such as my paper on separable polynomials.

2. GAP

Free: Yes
Platforms: Windows, MacOS, Linux
Website: https://www.gap-system.org

GAP stands for Groups, Algorithms, Programming. It’s basically an awesome command-line tool for group theory computations. Construct finitely presented groups, take quotients, and have a whole lot of group theory fun.

GAP, running in a terminal on Linux

GAP is also included with Sage, but it is a lot smaller, so it’s a better choice if all you need are the group theory features of GAP. GAP is also extensible through packages, and users have contributed a variety of additional features such as group cohomology and Gröbner basis calculations.

…read the rest of this post!

Five LaTeX editors for Linux in 2021

Today, we are going to learn about five different solutions for LaTeX editing on Linux (though many of the solutions below are actually cross-platform). What are the solutions available to us in this fine year of 2021? Let’s take a look:

1. LaTeX Workshop plugin for Visual Studio Code

For a long time, I used Vim with the VIM-LaTeX plugin (more on that below). But recently, I’ve switched to Visual Studio Code with James Yu’s LaTeX Workshop plugin. This plugin has many outstanding features like snippets, custom compilation, SyncTeX and reverse search, and PDF viewing. You also get all the power of Visual Studio Code’s excellent text manipulation facilities.
…read the rest of this post!

Projective modules: the dual basis formulation

There are so many equivalent definitions of projective module, that it’s hard to know which is the “right” definition. What about this: an $R$ module $M$ is projective if the functor ${\rm Hom}_R(M,-)$ is an exact functor. This one makes the most sense to me, of course there are others: $M$ is projective if and only if it is the direct summand of a free module, if and only if every short exact sequence $0\to A\to B\to M\to 0$ splits, etc.

Actually there is one equivalent condition for $M$ to be projective that doesn’t get too much attention, but can be quite useful: the dual basis condition. What is a dual basis? A dual basis for $M$ is a set of functions $\{ f_i : i\in I\}$ where $f_i\in {\rm Hom}_R(M,R)$ and a set of elements $\{ m_i : i\in I\}$ where $m_i\in M$ such that:

1. For every $m\in M$, the set $\{ i\in I : f_i(m)\not=0\}$ is finite, and
2. For every $m\in M$, we have $m = \sum_i f_i(m)m_i$

The name is a bit misleading, because a dual basis is not a basis necessarily! It is more like the next best thing to a basis. For although $\{m_i : i\in I\}$ certainly generates $M$ as an $R$-module, we certainly don’t require that every element can be written as a unique $R$-linear combination of the $m_i$ elements.

Theorem. An $R$-module $M$ is projective if and only if it has a dual basis.

…read the rest of this post!

How to calculate the determinant of a matrix

The determinant of a matrix is calculated recursively as follows. The determinant of a $1\times 1$ matrix is just the number itself. For, example, $\det([3]) = 3$ and $\det([-2.5]) = -2.5$. Here is what you do if you have a larger matrix: take the matrix, and write $+$ or $-1$ beside each entry, starting with $+$ for the first $1,1$-entry of the matrix and alternating from there. For example, a $2\times 2$ matrix will get the following arrangement of signs:
$$\begin{pmatrix} + & -\\ -& +\end{pmatrix}.$$ Now, select any row or column. It doesn’t matter which row or column you select as you will get the same answer in the end. For example, let’s take:
$$A = \begin{pmatrix} 1 & 2\\ 3& 4\end{pmatrix}.$$ Now, I select the first column. We now form a sum, one term for each entry. Start with the $1$, and cross out the row and column that contains it. Doing so will give you a smaller matrix. Multiply the entry $1$ by the determinant of that smaller matrix (this is the recursive part), taking into account the signs as in the first step of assigning $+$ and $-1$. This sum is the determinant. So,
$$\det(A) = 1\det(4)-3\det(2) = 1\cdot 4-3\cdot 2 = -2.$$ Now, this is quite easy for a $2\times 2$ matrix and in fact gives you the general formula
$$\det\left(\begin{pmatrix}a & b\\c & d\end{pmatrix}\right) = ad-bc.$$ Since this formula is so simple it really pays to memorize it. But basically your brain can’t help but memorize it after you do a few calculations anyway.
…read the rest of this post!

Shortcuts to diagonalize a 2×2 matrix

Matrix diagonalization is one of my favourite topics in linear algebra. I still remember learning it for the first time and being quite awed by it. What is diagonalization? If $A$ is a square matrix, the diagonalization is finding an invertible matrix $P$ such that $P^{-1}AP = D$ where $D$ is a diagonal matrix. It’s important to note that diagonalization depends on the field or ring that we are working in. In this post, we will just be working over fields, though diagonalization of course makes sense over rings, but the procedure is more complicated there.

Not all matrices can be diagonalized. For example, the upper triangular matrix
$$\begin{pmatrix}1 & 1\\ 0 & 1\end{pmatrix}$$ actually cannot be diagonalized over any field. Though I guess it is already a diagonal matrix over the zero ring, which is quite perverse if you ask me. Over a field, the procedure for diagonalizing a square $n\times n$ matrix $A$ involves the following procedure:
…read the rest of this post!

My 20 favorite math jokes

I hope my readers don’t mind, but I’ve been writing serious math posts here for ten years so I think it’s high time I inserted some humour onto this blog. Rest assured, serious math posts won’t go away.

Without adieu, my 20 favourite math jokes. Most of them I heard elsewhere, and a few I invented myself.

Why did the chicken cross the Mobius strip?

To get to the other…uh…

Two constants were found to be having an argument:
i: Be rational.
$\pi$: Get real!

Old Macdonald had a form, $e_i\wedge e_i = 0$.

You might be a mathematician if you think fog is a composition.

Professor: Give an example of a vector space.

Student: V.

From the obituary of Samuel Eilenberg:

When someone once asked Professor Eilenberg if he could eat Chinese food with three chopsticks, he answered, “Of course,” according to
Professor Morgan. The questioner asked, “How are you going to do it?”
and Professor Eilenberg replied, “I’ll take the three chopsticks, I’ll
put one of them aside on the table, and I’ll use the other two.”

…read the rest of this post!

A quick guide to Python’s random number generator

If you are doing applied math and want to run a computer simulation, then chances are you will need random numbers. I write most of my simulations in Python, and luckily Python has a great random number library. Let’s see how to use it. The first step is to import the library:

Notice that I called the random.seed() function here. Python generates random numbers by starting with a seed value $x$ and the random numbers from the generator are $f(x), f(f(x)),…$. The function $f$ is the Mersenne twister algorithm. You can also specify the seed yourself by using random.seed(a) where a is an integer. This would be useful for testing, so you can get the same random numbers each time the program is run.
…read the rest of this post!

5 popular math books that inspired me to study math

When I was a teenager, I used to read a lot of popular science and math books. Of course, by “popular”, I just mean books meant for a nonspecialist audience (like a kid without a degree). A lot of those books inspired me to actually go on to study mathematics at university. Here are five of my favourites. Some of them are old now but because of the timeless nature of mathematics, they are not out of date.

1. Ian Stewart’s “Does God Play Dice”

Chaos, or sensitive dependence on initial conditions, is a profound idea in science that goes against the classic Newtonian reductionism and is the concept that one cannot necessarily predict the outcome of complex systems. Ian Stewart explains chaos in his book “Does God Play Dice”. The ideas in this book are a constant influence in my life to this day.

2. William Dunham, “The Mathematical Universe”

I read this book in my final year of high school (and I still remember the day a math teacher commenting that he liked the book also). This book takes an A-Z tour on various mathematical topics. It is more classical than some of the other books here, covering topics such as angle trisection and the foundations of probability. I like that each chapter is short and readable, isn’t shy about including mathematical details and equations, and yet contains a good amount of historical storytelling as well.

…read the rest of this post!

Math book sale, North American shipping

Over time, I have accumulated many mathematics books. Inevitably, there were a few I acquired but were not really my style of book. So, I collected these up and am selling them here in the hope that other people can use them. To set up a purchase, email:

Payment can be made via Interac e-Transfer in Canada or Paypal in North America (if using Paypal add 3%). North American flat shipping 15 dollars, 10% discount if you buy more than one. Free shipping over 80 dollars. All in excellent condition, some near mint, with the exception of a few which are noted below.

All prices are in Canadian dollars. 10% of profits will be donated to Birdlife, an organization that works towards the ecological preservation of birds. If the item is listed here, it is still available.

1. Berlinghoff, William P.; Gouvea, Fernando Q., “Math Throughout the Ages”. Hardcover. MAA 2015 Hardcover. $45 2. Jacob Lurie, “Higher Topos Theory”. Softcover.$70
3. Steven H. Weintraub, “Linear Algebra for the Young Mathematician”. Hardcover. $50 4. Edwin H. Spanier, “Algebraic Topology”. 1966 Hardcover.$40
5. Joseph H. Silverman, “The Arithmetic of Elliptic Curves” 2nd Edition, Springer Hardcover. $60. 6. Johnathan D. Rogawski, “Automorphic Representations of Unitary Groups in Three Variables”. Softcover. Slight crease in cover.$15.
7. Engelbert J. Dockner, Steffen Jorgensen, Ngo Van Long, “Differential Games in Economics and Management Science”. Paperback. Cover is a little scratched and edges of pages have some markings. Inside clean. $40 8. Bailey and Knapp, “Representation theory and automorphic forms”. Hardcover.$90.
9. Goro Shimura, “Automorphic functions and number theory”. Ex-library hardcover, some library markings. $15. 10. Armand Borel, “Linear Algebraic Groups” WA Benjamin 1969 Hardcover.$15
11. Magnus, Karrass, and Solitar, “Combinatorial Group Theory”. Revised Second Dover Edition Softcover. $40. 12. Kenneth S. Brown, “Cohomology of Groups”. GTM Hardcover.$60.
13. Fulton and MacPherson, “Categorical Framework for the study of singular spaces.”. $60. 14. Albert, “Structure of Algebras”. Hardcover 1939.$15
15. Dirk van Dalen, “Logic and Structure”. 2004 Softcover printing. $60 16. Nathan Jacobson, “Lie Algebras”. Wiley 1962 ex-library copy. Some wear on cover and library markings.$10