Linear algebra review

Linear algebra is concerned with the representation of linear equations through the use of matrices. In the algebra taught in high school, we were concerned with scalar, that is, single number, values. We have equations, and rules for manipulating these equations, so that they can be evaluated. The same is true when, instead of scalar values, we use matrices. Let's review some of the concepts involved.

A matrix is simply a rectangular array of numbers. We saw that we added two matrices simply by adding each corresponding element. A matrix can be multiplied by a scalar by simply multiplying every element in the array by the scalar, as shown in the following example:

This is an example of matrix addition and, as you would ...

Get Deep Learning with PyTorch Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.