1. Scalar
A scalar is a single numerical value used to represent magnitude. It does not have direction, unlike vectors. Scalars are the most basic building blocks in linear algebra and belong to a field such as the real numbers (ℝ
) or complex numbers (ℂ
). Scalars are used in operations such as scaling vectors and matrices.
Example: Temperature = 37.5
°C is a scalar value.
2. Vector
A vector is an ordered list of numbers called components, which can represent both magnitude and direction. Vectors are used to represent points in space, velocities, and many physical quantities. In mathematics, they are treated as elements of a vector space.
Vectors can be:
- 1D vector:
[4]
- 2D vector:
[3, 5]
- n-dimensional vector:
[x₁, x₂, ..., xₙ]
Example: Displacement vector in 2D space: v = [3, 4]
3. Matrix
A matrix is a two-dimensional array of numbers arranged in rows and columns. It can represent a system of linear equations or a linear transformation. Matrices are widely used in computer graphics, data science, engineering, and physics.
The size of a matrix is defined by the number of rows and columns. For example, a 2x2 matrix has 2 rows and 2 columns:
[ [1, 2],
[3, 4] ]
Matrix operations include addition, multiplication, transposition, and finding the inverse (if it exists).
4. Tensor
A tensor is a mathematical object that generalizes scalars (0D), vectors (1D), and matrices (2D) to higher dimensions (3D and beyond). Tensors are used extensively in fields like physics (for representing stress, strain, and physical fields) and machine learning (especially in deep learning models).
Tensors are characterized by their rank (number of dimensions):
- Rank 0: Scalar
- Rank 1: Vector
- Rank 2: Matrix
- Rank 3+: Higher-order tensor
Example: A color image with RGB channels can be represented as a rank-3 tensor of shape (height × width × 3).
5. Field
A field in mathematics is a set equipped with two operations—addition and multiplication—that satisfy certain properties like associativity, distributivity, and the existence of additive and multiplicative inverses. Fields form the foundation for defining scalar values in vector spaces.
Common examples of fields include:
ℝ
- Set of real numbers (e.g., 2, -3.5, √2)ℂ
- Set of complex numbers (e.g., 2 + 3i)ℚ
- Set of rational numbers (fractions)
Every vector space is defined over a field, meaning scalar multiplication and addition are based on elements from that field.