/noBSLAnotebooks

Jupyter notebooks with exercises for the No bullshit guide to linear algebra.

Primary LanguageJupyter NotebookMIT LicenseMIT

Launch in Binder

No bullshit guide to linear algebra notebooks

Jupyter notebooks with exercises for the No Bullshit Guide to Linear Algebra by Ivan Savov (Minireference Co., v2.2 2021, ISBN 0992001021). The book is available in both print and digital formats: • softcover print from lulu.com bit.ly/noBSLA-sc • hardcover print from lulu.com bit.ly/noBSLA-hc • softcover print from amazon: amazon.com/dp/0992001021 • digital download from gumroad: gum.co/noBSLA. For more info, visit the book’s website minireference.com.

Abstract

Linear algebra is the foundation of science and engineering. Knowledge of linear algebra is a prerequisite for studying statistics, machine learning, computer graphics, signal processing, chemistry, economics, quantum mechanics, and countless other applications. Indeed, linear algebra offers a powerful toolbox for modelling the real world. Readers can build up their understanding of linear algebra by solving exercises and practice problems using the computer algebra system SymPy to speed up tedious matrix arithmetic tasks, as illustrated in the following notebooks.

Contents

Follow the video links to watch the tutorials or click the "Open in Colab" links to play explore the linear algebra notebooks interactively on your own. See the section Local installation below for instructions how to install and run the notebooks locally on your computer.

Chapters overview

This video and the associated notebook provide a bird's eye view of the whole book.

Chapter 2: Intro to linear algebra

Definitions of vectors and matrices

Linearity intuition

Chapter 3: Computational linear algebra

Exercises on Gauss-Jordan elimination

Problems

  • Video not ready yet.
  • Notebook: Open in Colab (interactive) or nbviewer (read-only).

Chapter 4: Geometric aspects of linear algebra

Exercises

  • Notebook: Open in Colab (interactive) or nbviewer (read-only).

Problems

  • Notebook: Open in Colab (interactive) or nbviewer (read-only).

Local installation

The Colab links provided above allow you to run the notebooks in the cloud, which is very useful (you don't need to install anything on your computer). For an even better interactive experience, you can install the jupyter notebook software on your computer and run the notebooks locally.

Prerequisites: before you begin, make sure you have required software:

  • You'll need to have Python 3 installed on your computer. You can check this is the case by opening a command prompt (terminal) an typing in python --version and making sure something like Python 3.x.y gets printed. If you get an old version of Python, e.g. 2.7.9, you can try running the command python3 --version instead, or else you can download and install a new version.
  • You'll also need to download and install git.

Step 1. Use git to clone the repository

Open a command prompt and issue the following command to "clone" all the notebook files from the github repo and make a local copy of them on your computer:

git clone https://github.com/minireference/noBSLAnotebooks.git

After a few seconds you should be able to see the .ipynb files created in the folder noBSLAnotebooks. You can inspect the files are present, but don't try to open them just yet—you need to install jupyter to run them.

Step 2. Install the required Python libraries

The next will be to change directory (cd) to the noBSLAnotebooks folder and install the Python packages listed in the file requirements.txt:

cd noBSLAnotebooks
python -m pip install -r requirements.txt

This command will take a few minutes to run and in the process install jupyter notebook software and all the other libraries we'll use in the notebooks.

Step 3. Running the notebooks

You can start the jupyter notebook server using the command

jupyter notebook

then click on the link printed in the terminal to open access the notebook interface in your web browser (your browser might open automatically when you run the command).

Note: It's important to keep the notebooks in their current location because they make use of the plotting helper functions in util/plot_helpers.py.

Links

Here are some additional links to learning resources on linear algebra and SymPy that you might find helpful for your studies:

Contributing

To contribute to the noBSLAnotebooks project, you can open a pull request with your additions (typo fixes, adding solutions to exercises or problems, or new notebooks). Feel free to reach out to me (firstname @ publishername dot com) if you need some help getting started. It will be a pleasure for me to "show you around" and the automated scripts[1,2] I've developed for the project.