Introduction to scalar, vector, matrix, and tensor
Scalars, vectors, matrices, and tensors all provide a solid foundation for linear algebra and are widely used in machine learning, deep learning, and scientific computation. All these four structures have different levels of dimensions and are the backbones for all multi-dimensional data, such as tabular data, text, images, videos, and geospatial data. In the following subsections, we will look at these concepts of linear algebra in detail.
Scalar and vectors
A scalar is a single number or value that deals with a vector in space via scalar multiplication. Scalars are 0-dimensional and represent a quantity with magnitude but no direction, while vectors are one-dimensional and represent both magnitude and direction. A vector is an ordered set of elements, or it is an array of elements that can be viewed as a row or a column. Vectors can be added together and can be multiplied by a real number known as a scalar.

Figure 4.1: Examples of...