Linear algebra v2 beta release

The No bullshit guide to linear algebra files on gumroad were updated. The book is now v2 beta 2, and scheduled for release in early January 2017.

If you’re taking a linear algebra class this term, or need to know linear algebra for a more advanced class, this will be the best money you spend this semester.



Math is power. Specifically, the ability to use math models to describe real-world phenomenon and predict the future is a powerful general tool to add to you toolbox. Linear algebra has applications to many fields. In general, understanding basic math, and specifically functions of the form \(f(x)=y\) like \(x,x^2,x^3,x^n,e^x,\ln(x),\sin(x),\cos(x),\tan(x),\ldots\) opens many doors for mathematical modelling.

Linear algebra is the study of linear transformations, or vector functions of the form \(T(\vec{v}) = \vec{w}\). The linear transformations take vectors \(\vec{v}\) as inputs and produce vectors \(\vec{w}\) as outputs.  Many real-world phenomena in computer science, physics, chemistry, biology, and many other fields can be modeled as vector quantities, so linear algebra has countless applications. Linear algebra is the vector extension to your math modelling toolbox.



Everyone knows that math is useful, but people much rather leave the learning of math to other people, rather than learn math themselves. Most people imagine learning math is a difficult task, like carrying big bags of potatoes up a steep hill. Surely, such hard work is not for everyone, and we should delegate all the potato-carrying to experts in the field (mathematicians, scientists, and engineers). This way of thinking gave us a modern world where only a small portion of the world is math literate. Everyone else lives in ignorance and fear of all things mathematical.

It doesn’t need to be this way. Everyone can learn math—even advanced math like linear algebra—if they follow a structured approach. Each section in the No bullshit guide to linear algebra follows the same recipe:

  • Motivation to trick readers into wanting to learn about the topic
  • Definitions of all quantities and variables relevant to the topic
  • Formulas: all the essential formulas associated with the topic are given
  • Examples that show how to use the formulas in different scenarios
  • Explanations about how the formulas are derived and how to understand them
  • Discussion about how the connections between this topic and other
  • Exercises to test your understanding of the concept
  • Links to web resources for further reading

This structure allows to get all the important information across in the shortest amount of time. The reader is free to skim through superficially, or dig in an read all the explanations. The exercises help both students and self-learners test there understanding of the material.



The No bullshit guide to linear algebra is a short textbook that covers all the standard topics of university-level linear algebra, and also discusses applications like machine learning, computer graphics, probability theory, and quantum mechanics.

You can buy the eBook bundle here ($29, includes all future updates). The book is currently being edited, so it’s likely to see some further improvements to the chapters on applications, but the main material (that which will be on a an exam) is absolutely solid now.

@Students: get in touch with me if you’d like to be a “test subject” for the new  problem sets. I wrote 50+ pages of new problems and solutions for the book, and I could use your help to double-check the answers.

No BS math and physics v5.1 update

Over the last years, several readers uncovered mistakes in the No bullshit guide to math & physics, which I immediately fixed in the source. The errors were mostly minor, so they didn’t warrant a new edition, but once I reached a threshold of six errata, I decided it’s time to release a v5.1 update. With this bugfix update, I took the time to make some other minor improvements described below.


Most of the mistakes in v5 of the book were in the exercises and problems. I’m happy to announce there are no major conceptual problems, or mistakes in any of the core equations. Here are the mistakes in v5.0 (Aug 2014) of the book:

  • P1.41: Both calculations should use the radius instead of the diameter. The change in height is $h_2 – h_1 = 5.47 – 4.41 = 1.06$ cm.
  • P1.44: Answer should be 8.42m = $4\sin 40 + \frac{1}{4}(2\pi(0.5)) + 4\cos 40 + 2$.
  • P1.47: Answer should be 180 degrees – 40 degrees = 140 degrees.
  • P1.51: Question describes the water tank as $12 \times 6 \times 3$, but solution uses $12 \times 6 \times 5$. The question was changed to match the existing solution: the tank now has height $5$[m].
  • P2.9 part (3) $v_f$ should be 6 [m/s], not 10 [m/s].
  • P2.10, part 4. Distance should be 13[m] not 14[m].
  • page 202: Revolution of the Earth example: $v_t$ should be 328.32 m/s not 464.32 m/s, giving a final answer of 1181.95km/h not 1671.56 km/h.
  • 5.5 Limit formulas, page 264 at the bottom: removed formulas $\lim_{x\rightarrow0}\frac{\ln(x+a)}{x}=a$ and $\lim_{x\rightarrow0}\left(a^{1/x}-1\right)=\ln(a)$. First formula is wrong, second is not useful.
  • page 286: “Consider the point $P=(x_P,y_P)$ that lies on the circle $x^2+y^2=R$.” should be “Consider the point $P=(x_P,y_P)$ that lies on the circle $x^2+y^2=R^2$.”
  • page 401: the correct conversion formula for inch is 1[in] = 2.54[cm] and not 1[T] = 1000[kg].


New math exercises

Several readers complained about the math fundamentals chapter being too “rough” for complete beginners. To fix this, I did a critical rereading of the material and corrected some mistakes of continuity (there was crazy rough patch in Section 1.2 where I suddenly jump into negative and fractional exponents that—not surprisingly—some readers found confusing). I also interspersed exercises throughout Chapter 1 so readers can now test their understanding as they progress through the chapter.



Thanks to the suggestion in a comment on amazon, I decided it the book should have an index. It turned out creating an index was a very time-consuming task, but it was very totally worth it since it allowed me to standardize certain terminology (e.g. function range vs function image) and weed out certain inconsistencies.  The exercise of cataloguing every concept used in the book will help with STRUCTURE project too.


New proof of the chain rule for derivatives

A mathematician friend of mine pointed out a mistake in the proof of the chain rule for derivatives in the book. The hand-wavy argument that I had improvised had possible divide by zero error: the quantity $\Delta = g(x+\delta) – g(x)$ can be zero, so it’s not OK to use it in expressions where it appears in the denominator. In other words, bullshit had creeped into the book!  We can’t have any of that in a book which claims to be bullshit free! The new proof of the chain rule for derivatives is longer and more technical, but at least it’s not wrong. Hopefully I will not alienate my readers too much by having such a technical argument in the middle of the calculus chapter, but there really wasn’t any way to make the proof simpler or more intuitive. It’s just a technical argument.


More calculus problems

Upon critical review, I found the section on surface and volumes of revolution was a little short. Sure all the formulas are introduced, but it would have been a stretch to assume the average reader will be able to pick up the concepts from these few pages. To remedy this, I added a few more pictures, beefed up the discussion, and added some problems. I also came up with a “append only” policy for adding problems to the book—this way the numbers won’t change between versions so if  a prof assigns P5.33 to their students, it will be the same problem in v5, v6, or whenever. The new problems added test the student’s ability to apply the volume of revolution formulas and also the infinite Riemann sum formula.


The diff

As with previous updates, I’ve generated a red-blue diff of all the changes between v5.0 (Aug 2014) and v5.1 (July 2016). You can check out the diff to see the details of all that changed.


Right now I’m waiting for the green light from my editor about the changes and the next step will be to push the updated PDFs to all distribution channels. I’ll also send out an update email to all readers.

The aims of education according to Alfred North Whitehead

Yesterday I read the fascinating essay titled The Aims of Education by Alfred North Whitehead (1861-1947). It was written 100 years ago, but every line of it rings true in the modern context. Below I’ve extracted the best quotes from the essay and added some personal comments.

The OP gives a detailed blueprint of how to structure formal education, making a distinction between “general education” (primary school and middle school) and “specialized training” (high school and college). The essay discusses learner psychology, learner user experience, curriculum customization, student assessment, and even proposes a new structure for the educational system. The essay is so full of good stuff that nearly all of it is worth quoting.


The danger of inert ideas

In training a child to activity of thought, above all things we must beware of what I will call “inert ideas”—that is to say, ideas that are merely received into the mind without being utilised, or tested, or thrown into fresh combinations.

In the history of education, the most striking phenomenon is that schools of learning, which at one epoch are alive with a ferment of genius, in a succeeding generation exhibit merely pedantry and routine. The reason is, that they are overladen with inert ideas. Education with inert ideas is not only useless: it is, above all things, harmful. […] Except at rare intervals of intellectual ferment, education in the past has been radically infected with inert ideas. That is the reason why uneducated clever women, who have seen much of the world, are in middle life so much the most cultured part of the community. They have been saved from this horrible burden of inert ideas. Every intellectual revolution which has ever stirred humanity into greatness has been a passionate protest against inert ideas. Then, alas, with pathetic ignorance of human psychology, it has proceeded by some educational scheme to bind humanity afresh with inert ideas of its own fashioning.

Continue reading “The aims of education according to Alfred North Whitehead”

Learning can be fun

I just read this excellent article Pragmatic Learning: It’s not “fun” on Roger Schank’s blog. It’s a very good post that calls bullshit on the “gamification” cargo cult which is widespread in the edtech and corporate training world. Just adding points, badges, and levels to a corporate training program that teaches you something boring is not going to suddenly make it fun. The author’s main observation is that forced learning is not fun and we need not pretend it is. Consider an employer who wants their employees to know X because it is required by law, or a bunch of students forced to learn Y or else they’ll fail. These “forced” trainings are not fun, and gamifying them is akin to putting lipstick on a pig.

Instead of gamification, the author suggests learner’s experience should focus more on things like:

  • Getting away from the one-size fits all approach:

    Courses need not be administered to multitudes. One can have a course that is for one person only and can be used when needed. […]

  • The use of simulators
  • Enable students to collaborate with peers who are learning the same thing
  • Have human teachers (tutors) available to help
  • Enable “learn by doing” experiences:

    […] real autonomous, motivated, learning happens when you are in the middle of doing something, and questions arise in your mind about it.

  • Provide training in a “just in time”(JIT) manner, e.g. provide training on X right before the student will need to do X.

I highly recommend you read the article because the above summary hardly does it justice. I agree with 90% of the observations in this article, but I have some comments and observations of my own to add below the fold.


Continue reading “Learning can be fun”

No bullshit guide to programming

How does one learn to code? Students in computer science and software engineering will have a few first-year programming courses, with the first one introducing basics like variables, control flow, and loops. Autodidact programmers probably started with a tutorial somewhere, but eventually got a book on the subject. Regardless of the learner’s path, we’re talking about a book that teaches “the basics.”

This is the table of contents I have in mind:

  1. Fundamentals
    1. math review (numbers, variables, functions, multi-step procedures)
    2. syntax and new type of objects (variables, functions, algorithms, int, float, list, dictionary, objects)
  2. Programming basics
    1. Expressions
    2. Functions
    3. Control flow
      1. If elif else
      2. Loops
  3. Structure of programs
    1. modules
    2. libraries
    3. frameworks
  4. Algorithms
    1. Binary search algorithm
    2. Sorting algorithms
    3. Graph algorithms
    4. Numeric algorithms
    5. Optimization algorithms
  5. Applications
    1. Fancy scientific calculations made easy (SymPy, numpy)
    2. Automate info. processing tasks (bash scripting)
    3. Generating reporting and useful analytics from data (pandas)
    4. Creating websites (Django)

It’s not the standard set of topics for the “COMP101 textbook” category,  but I bet with some thought put into it, it can be made to contain most of the material for a first-year coding class. We just godda make sure that profs will have enough to support teaching their class. Best of all it could all probably fit in 300 pages, and retail under $40. It could be even thinner, but would be better to have lots of exercises.

I’m thinking about this today because I was visiting McGill and had the chance to talk with the prof who taught my first-year programming course and we somehow got to the topic of textbooks. She remembered the computer science textbook she learned from, and described it as being very thin. So it can definitely be done.

The book described above doesn’t exist yet, but if you leave comments below telling me you want it, it will move up in the priority list…