Table of Contents

Preface

This book is about linear algebra and its applications. The writing style is jargon-free and to the point. The coverage is at a first-year university level, but advanced topics are also discussed to illustrate connections and parallels between concepts. By focussing on the connections between concepts, the reader will be able to understand the role linear algebra plays as a generalization of the basic math concepts (numbers, functions, etc.), and as a powerful mathematical toolbox for many applications.

Many problems in science, business, and technology can be described using techniques from linear algebra so it is important that you learn about this subject. In addition, understanding linear algebra opens the door for you to study more advanced math subjects like abstract algebra. This book discusses both the theoretical and practical aspects of linear algebra.

Why?

The genesis of the “No bullshit guide” series of textbooks dates back to my student days when I was required to purchase expensive textbooks for my courses. Not only are these textbooks expensive, they are also tedious to read. Mainstream textbooks are long because mainstream publishers must “pad” their textbooks with numerous full-page colour pictures and repetitive text to make the hundred-dollar sticker price seem reasonable.

Looking at this situation, I said to myself, “something must be done,” so I started writing books that explains math concepts clearly, concisely, and affordably. After finishing my studies, I started the Minireference Co. to bring change to the textbook publishing industry.

Print-on-demand and digital distribution technologies, enable a new shorter, author-centred publishing value chain: \[ \textrm{author} \ \rightarrow \ \textrm{print shop} \ \rightarrow \ \textrm{reader}. \] By removing all the middlemen from the value chain, we can offer reasonable prices for our readers and excellent margins for our authors.

How?

Each section in this book is a self-contained tutorial, which covers the definitions, formulas, and explanations associated with a single topic. You can therefore read the sections in any order you find logical.

To learn linear algebra, you need to know your high school math. In order to make the book accessible for all readers, the book begins with a review chapter on numbers, algebra, equations, functions, and trigonometry. If you feel a little rusty on those concepts, be sure to check out Chapter~\ref{chapter:math_fundamentals}.

TODO: check Chapter ref

Is this book for you?

This book is intended for last-year high school students, first-year university students, and curious adults. The first chapter of the book presents a review of important math concepts from high school math in order to make the book accessible for everyone.

Students taking a linear algebra class will be exposed to everything they need to know to pass their final exam. Don't be fooled by the small size of the book: everything is here.

Students taking an advanced class that requires the knowledge of linear algebra can use this book to go for 0 to 100 in a very short time. You want to take a machine learning class but you don't know what a matrix is? You can get up to speed on linear algebra in just a few weeks if you read this book.

Students who are taking a physics class should pay particular attention to the vectors chapter (Chapter 2), which describes how to carry out calculations with vectors. Understanding vector is crucial to understanding Newton's laws of mechanics and the laws of electricity and magnetism.

Those with a generally curious mind are sure to have a good time learning about one of the deepest subjects in mathematics. The study of linear algebra comes with a number of mind-expanding experiences. Additionally, understanding the basic language of vectors and matrices will allow you to read about other subjects.

Industry folks interested in developing applications and technology using linear algebra techniques will find the compact exposition of the book well suited for their busy lives.

The study of linear open many doors for understanding other subjects. As an example of what is possible thanks to linear algebra, we present an introduction to quantum mechanics in Appendix A. The postulates of quantum mechanics, and many supposedly “counter-intuitive” quantum phenomena can be explained in terms of vectors and matrices.

TODO: fix refs in above pars

About the author

I have been teaching math and physics for more than 10 years as a private tutor. My tutoring experience has taught me how to explain concepts that people find difficult to understand. I've had the chance to experiment with different approaches for explaining challenging material. Fundamentally, I've learned from teaching that understanding connections between concepts is much more important than memorizing facts. It's not about how many equations you know, but about knowing how to get from one equation to another.

I completed my undergraduate studies at McGill University in electrical engineering, then did a M.Sc. in physics, and recently completed a Ph.D. in computer science. Linear algebra played a central role throughout my researcher career. With this book, I want to share with you some of the things I learned along the way.

Introduction

A key role in the day-to-day occupations of scientists and engineers is to build mathematical models of the real world. A significant proportion of these models describe linear relationships between quantities. A function $f$ is linear if it obeys the equation \[ f(ax_1 + bx_2) = af(x_1) + bf(x_2). \] Functions that do not obey this property are called nonlinear. Most real processes and phenomena of science are described by nonlinear equations. Why are scientists, engineers, statisticians, business folk, and politicians so concentrated on developing and using linear functions if the real world is nonlinear?

There are several good reasons for using linear models to model nonlinear real-world phenomena. The first reason is that linear models are very good at approximating the real world. Linear models for nonlinear phenomena are also referred to as first order approximations, the name coming from the tangent line approximation to a function by a line. A second reason is that we can “outsource nonlinearity” by using the linear model with nonlinear transformations of the inputs or outputs.

Perhaps the main reason why linear models are so widely used is because they are easy to describe mathematically, and easy to “fit” to real-world systems. We can obtain the parameters of a linear model by analyzing the behaviour of the system for very few inputs. Let's illustrate with an example.

Example

At an art event, you enter a room with a multimedia setup. The contents of a drawing canvas on a tablet computer are projected on a giant screen. Anything drawn on the tablet will instantly appear on the screen. The user interface on the tablet screen doesn't give any indication about how to hold the tablet “right side up.” What is the fastest way to find the correct orientation of the tablet so your drawing will not appear rotated or upside-down?

This situation is directly analogous to the task scientists face every day when trying to model real-world systems. The canvas on the tablet describes a two-dimensional input space, the wall projection is a two-dimensional output space, and we are looking for the unknown transformation $T$ that maps the pixels of the input space to coloured dots on the wall. Because the unknown transformation $T$ is a linear transformation, we can learn the parameters of the model $T$ very quickly.

We can describe each pixel in the input space by a pair of coordinates $(x,y)$ and each point on the wall by another pair of coordinates $(x',y')$. To understand how $T$ transforms $(x,y)$-coordinates to $(x',y')$-coordinates proceed as follows. First put a dot in the lower left corner of the tablet to represent the origin $(0,0)$ of the $xy$-coordinate system (tablet). Observe where the dot appears on the screen: this is the origin of the $x'y'$-coordinate system (wall). Next, make a short horizontal swipe on the screen to represent the $x$-direction $(1,0)$ and observe the transformed $T(1,0)$ that appears on the wall screen. The third and final step is to make a vertical swipe in the $y$-direction $(0,1)$ and see the transformed $T(0,1)$ that appears on the wall screen. By knowing how the origin, the $x$-direction, and the $y$-direction get mapped by the transformation $T$, you know $T$ completely.

In practical terms, by seeing how the $xy$-coordinate system gets mapped to the wall screen you will be able to figure out what orientation you must hold the tablet so your drawing appears upright. There is a deeper, mathematical sense in which your knowledge of $T$ is complete. Rotations and reflections are linear transformations, and it is precisely the linearity property that allows us to completely understand the linear transformation $T$ with only two swipes.

Can you predict what will appear on the wall if you make a diagonal swipe in the $(2,3)$-direction? Observe the point $(2,3)$ in the input space can be obtained by moving $2$ units in the $x$-direction and $3$ units in the $y$-direction: $(2,3)=(2,0)+(0,3)=2(1,0)+3(0,1)$. Using the fact that $T$ is a linear transformation, we can predict the output of the transformation when the input is $(2,3)$: \[ T(2,3) = T( 2(1,0) + 3(0,1) ) = 2T(1,0) + 3T(0,1). \] The wall projection of the diagonal swipe in the $(2,3)$-direction will appear at a length equal to $2$ times the $x$-direction output $T(1,0)$ plus $3$ times the $y$-direction output $T(0,1)$. Knowledge of the transformed directions $T(1,0)$ and $T(0,1)$ is sufficient to figure out the output of the transformation for any input $(a,b)$ since the input can be written as a linear combination $(a,b)=a(1,0)+b(0,1)$.

Linearity allows us to study complicated, multidimensional processes and transformations by studying their effects on a very small set of inputs. This is an essential aspects of why linear models are so prominent in science. If the system we are styling is linear, the probing it with each “input direction” is enough to characterize it completely. Without this structure, characterizing an unknown system would be a much harder task.

Why learn linear algebra?

Linear algebra is one of the coolest mathematics subjects that undergraduate students learn.

practical skills and

mind-expanding theoretical understanding

bridge towards advanced mathematics

VECTORS vectors are used in physics, computer graphics, machine learning, quantum mechanics, statistics, and many other areas of science. ZZZ You abstract vectors ZZZ “vector spaces” ZZZ like colours and polynomials

Linear transformations are the second big idea of linear algebra ZZZ represented by matrices

Overview

In Chapter 1

In Chapter 2

Chapter 3 will present a high level introduction to the topics of linear algebra and Skip ahead if you

Chapter 4 begins with a

system of linear equations and discusses ways of finding solutions for such systems. Here you are beginning to study an aspect of the course that makes it conceptually difficult. You are beginning to study properties of sets of objects rather than simply examining the properties of one object at a time. The sets involved are usually ordered sets where repetitions of objects are allowed. We use the word system for such ordered sets. Systems of equations may have more variables than equations and more equations than variables. This aspect of linear systems has an impact on whether they have solutions or not. You will see that a system of linear equations either has no solution, one solution, or infinitely many solutions.