Scalars, vectors, matrices, tensors
Objects of 0, 1, 2 and more dimensions, and how data is stored in them.
A scalar is a single number, — a temperature or a learning rate. A vector is an ordered list of numbers, — one example's features. A matrix is a 2-D grid, — a whole dataset, or the weights of one neural-network layer.
A tensor generalises this to any number of dimensions (axes). A colour image is a 3-D tensor (height × width × 3 channels); a batch of 32 images is 4-D (32 × height × width × 3). Deep-learning libraries are built around tensors.
Notation used in this course: bold lowercase for vectors (column vectors by default), uppercase for matrices, for the -th entry and for row , column . The transpose swaps rows and columns.
Formula to remember
Inner product
Element-wise products summed; relates to the angle between vectors.