Introducing linear algebra
This chapter delves into one of the most important branches of mathematics: linear algebra. Linear algebra deals with linear operations of mathematical objects, including vectors, matrices, and tensors (high-dimensional matrices), the most common forms of data. For example, the typical table we use to store data in Excel consists of a series of columns. Each column is called a vector, which stores a specific number of elements and takes the form of a column instead of a row by default. A collection of these column vectors forms a matrix, a two-dimensional Excel table, or DataFrame, as we used to call it in the previous chapters. We can also view the same table as a collection of row vectors, where each vector lives in the form of a row.
Let’s put these in context. The following code snippet loads the sleep dataset and prints out the first six rows and three columns. We use A to denote this 6x3 matrix in the following exposition:
>>>...