Visualising my Summer School math units

Sam Spilsbury
4 min readApr 22, 2018

--

Last year I decided that I wanted to undertake further study in Computer Science after completing my Bachelor at the University of Western Australia. Specially, I want to specialize in deep learning. Its the future, and an extension of Computer Science, so shouldn’t be too hard, right?

Uh-oh

Problem: I suck at math.

Contradiction: I worked on a very math-heavy project for the better part of my career.

Yes, its a confession that a lot of self-taught programmers aren’t exactly the strongest when it comes to mathematics. The dirty secret of programming is that you really don’t need much math beyond basic arithmetic to achieve most of what you want to do.

No, really, you don’t.

Most programming is what I like to call “boxes and arrows”. You’re just taking one process and connecting it to another with some rules in between. Customer goes to website. Fetch data from database using a query. Marshal the data into a table. Display it. Done.

I can’t really remember the last time I wrote an algorithm for something that was customer facing. Or used math for that matter.

In fact, I went through my entire degree taking only the bridging high school calculus and geometry classes that were required for completion. Useful, but they don’t teach you anywhere near what’s required to understand deep learning.

So when I saw that the requirements of literally every degree programme I applied to were:

  • Probability and Statistics
  • Linear Algebra (Matricies, Vectors)
  • Multivariate Calculus (Derivatives and Integrals of multidimensional objects)
  • Analysis (Differential Equations)

Well, I kinda freaked out a little. How was I going to acquire so much understanding when my base knowledge was already so feeble? I was literally so bad at math that I scored within the bottom 30th percentile when I graduated from High School and I studied really hard.

Photo by Tra Nguyen on Unsplash

Summer school, to the rescue. Not sure how I did it, but I basically learnt all that in the course of eight weeks through three intensive four hour classes per week plus homework and lectures in my own time. I remember that when I enrolled I got a note from the faculty advising me not to do it. I did it anyway.

Probably the hardest I’ve ever worked in my life. I was also working part time too.

Remembering stuff was a problem. 3b1b is probably one of the best resources ever, but it doesn’t have worked examples. So, code to the rescue.

Intuitive Math is a project that I’ve been working on since I started studying for my exams. It contains detailed visualizations and worked examples for concepts in Linear Algebra and Geometry. Built with React and WebGL. Hosted on a serverless instance because I like that. Open source, too.

I’m happy to say that it is available for the public to try and learn from today.

Some of the visualizations are pretty interesting.

Take Elementary Row Reduction for example. This is the process of filling the bottom and top diagonals of a matrix with zeros by adding scalar combinations of rows to each other, such that you get all non-zero numbers down the diagonal. What is that actually doing?

Well, if you look carefully at the diagram, if we visualize each column as a plane, then you’ll see that the planes are being “straightend out” such that they all intersect at exactly one point:

Here’s another example: Doing super-elementary row reduction to find an inverse removes all the skew to start with:

But it is only when scaling by the determinant that the inverse is truly found:

Eigenvalues are found when we find a single value which when subtracted from both dimensions, flattens space into a lower dimension:

If you want to find the surface area of a complex surface, observe that the normal vector for each small parallelogram patch is the same as the area for that patch. So just add up (integrate) all the normal vectors:

For more and worked examples of linear algebra and calculus problems, just head on over. I hope you find it useful.

--

--

Sam Spilsbury

Masters in Computer, Communication and Information Sciences, PhD Candidate @Aalto University