Where Exploration Meets Excellence
Jupiter Wiki›Reference Entry
Jupiter Wiki · Reference Note

Tensor

Updated Jun 14, 2026

Tensor

A tensor is a mathematical object that generalizes the concepts of scalars, vectors, and matrices. It provides a framework for describing linear relationships between geometric vectors, scalars, and other tensors, and importantly, it exists independently of any chosen coordinate system. Tensors are fundamental in physics, engineering, and computer science for representing physical quantities and properties that vary with direction or position, such as stress, strain, electromagnetism, and spacetime curvature.

Short Definition

A tensor is a multilinear map that takes a set of vectors and/or covectors as input and produces a scalar output. Alternatively, it is an object whose components transform in a specific way under a change of coordinates. The "rank" or "order" of a tensor indicates the number of indices required to specify its components in a given coordinate system. Scalars are rank-0 tensors, vectors are rank-1 tensors, and matrices often represent rank-2 tensors.

Detailed Explanation

The concept of a tensor arises from the need to describe physical quantities in a way that is independent of the observer's chosen coordinate system. While scalars (like temperature or mass) remain unchanged under coordinate transformations, and vectors (like displacement or velocity) change their components in a well-defined way, many physical phenomena require a more complex description.

Consider a stress in a material. The force acting on a surface depends not only on the magnitude of the force but also on the orientation of the surface itself. A single vector cannot fully capture this relationship. Instead, a stress tensor is required, which relates a direction (the normal to the surface) to another direction (the force vector acting on that surface).

The defining characteristic of a tensor is its transformation law. When a coordinate system changes, the components of a tensor transform according to specific rules that preserve the underlying physical or geometric object it represents. This ensures that physical laws expressed in terms of tensors hold true regardless of the coordinate system used.

Tensors are typically classified by their rank (or order), which is the number of indices needed to specify their components.

Tensors can also be classified by their covariance and contravariance properties, which relate to how their components transform.

The distinction between contravariant and covariant components becomes crucial in non-Cartesian coordinate systems or curved spaces, where the basis vectors themselves may not be orthogonal or of unit length.

Key Formula / Syntax / Principle

The defining characteristic of a tensor is its transformation law under a change of coordinates. Let's consider a transformation from an old coordinate system ## x^i ## to a new coordinate system ## \bar{x}^j ##. The partial derivatives ## \dfrac{\partial \bar{x}^j}{\partial x^i} ## and ## \dfrac{\partial x^i}{\partial \bar{x}^j} ## are central to these laws.

Transformation Laws:

If ## A^i ## are the components of a contravariant vector in the ## x^i ## system, its components ## \bar{A}^j ## in the ## \bar{x}^j ## system transform as:

### \bar{A}^j = \dfrac{\partial \bar{x}^j}{\partial x^i} A^i ###

(Using Einstein summation convention, where repeated indices imply summation).

If ## B_i ## are the components of a covariant vector (or covector) in the ## x^i ## system, its components ## \bar{B}_j ## in the ## \bar{x}^j ## system transform as:

### \bar{B}_j = \dfrac{\partial x^i}{\partial \bar{x}^j} B_i ###

For a general mixed tensor ## T^{i_1...i_p}_{j_1...j_q} ## with ## p ## contravariant indices and ## q ## covariant indices, its transformation law is:

### \bar{T}^{k_1...k_p}_{l_1...l_q} = \left(\dfrac{\partial \bar{x}^{k_1}}{\partial x^{i_1}} \cdots \dfrac{\partial \bar{x}^{k_p}}{\partial x^{i_p}}\right) \left(\dfrac{\partial x^{j_1}}{\partial \bar{x}^{l_1}} \cdots \dfrac{\partial x^{j_q}}{\partial \bar{x}^{l_q}}\right) T^{i_1...i_p}_{j_1...j_q} ###

Einstein Summation Convention:

This convention simplifies tensor notation. When an index appears exactly twice in a single term (once as a superscript and once as a subscript), it implies summation over all possible values of that index. For example, ## A^i B_i ## means ## \sum_{i} A^i B_i ##.

Metric Tensor:

In a Riemannian manifold, the metric tensor ## g_{ij} ## is a fundamental symmetric rank-2 covariant tensor that defines the inner product (dot product) of vectors and, consequently, distances and angles. It also allows for raising and lowering indices, transforming covariant components to contravariant and vice versa.

### g_{ij} = \mathbf{e}_i \cdot \mathbf{e}_j ###

where ## \mathbf{e}_i ## are the basis vectors. The inverse metric tensor is denoted ## g^{ij} ##.

Tensor Operations:

Important Characteristics

These properties significantly reduce the number of independent components a tensor has and are crucial in many physical theories.

Here is a comparison of basic tensor types:

Type Rank (Order) Representation Transformation Property Physical Example
Scalar 0 Single number (e.g., ## \phi ##) Invariant (no change) Temperature, Mass
Vector (Contravariant) 1 Column array (e.g., ## V^i ##) Transforms inversely to basis vectors Velocity, Force
Covector (Covariant) 1 Row array (e.g., ## V_i ##) Transforms like basis vectors Gradient of a scalar field
Rank-2 Tensor 2 Matrix (e.g., ## T_{ij} ## or ## T^{ij} ## or ## T^i_j ##) Components transform with two partial derivative factors Stress, Strain, Inertia

Practical Example

Tensors find widespread application across various scientific and engineering disciplines due to their ability to describe complex physical phenomena in a coordinate-independent manner.

In continuum mechanics, the stress tensor ## \sigma_{ij} ## describes the internal forces within a deformable body. Imagine a small imaginary surface inside a material. The force acting on this surface depends on both the magnitude and direction of the force, and the orientation of the surface itself.

The stress tensor is a rank-2 tensor with 9 components in 3D space:

### \begin{pmatrix} \sigma_{xx} & \sigma_{xy} & \sigma_{xz} \\ \sigma_{yx} & \sigma_{yy} & \sigma_{yz} \\ \sigma_{zx} & \sigma_{zy} & \sigma_{zz} \end{pmatrix} ###

Here, ## \sigma_{xx} ## represents the normal stress (force perpendicular to the surface) acting on a surface whose normal points in the x-direction, while ## \sigma_{xy} ## represents the shear stress (force parallel to the surface) acting on the same x-normal surface but in the y-direction. The stress tensor transforms according to the rules of a rank-2 tensor, ensuring that the physical state of stress in the material is described consistently regardless of how an observer chooses their coordinate axes. The symmetry of the stress tensor (## \sigma_{xy} = \sigma_{yx} ##, etc.) arises from the conservation of angular momentum.

The moment of inertia in classical mechanics describes an object's resistance to changes in its rotational motion. For a point mass rotating about a fixed axis, it is a scalar. However, for a rigid body rotating about an arbitrary axis, the relationship between angular momentum ## \mathbf{L} ## and angular velocity ## \mathbf{\omega} ## is not simply a scalar multiple. Instead, it is described by the inertia tensor ## I_{ij} ##:

### L_i = I_{ij} \omega^j ###

The inertia tensor is a symmetric rank-2 tensor. Its components depend on the mass distribution of the body and the chosen coordinate system.

### \begin{pmatrix} I_{xx} & I_{xy} & I_{xz} \\ I_{yx} & I_{yy} & I_{yz} \\ I_{zx} & I_{zy} & I_{zz} \end{pmatrix} ###

For example, ## I_{xx} = \int (y^2 + z^2) dm ## and ## I_{xy} = -\int xy dm ##. The inertia tensor allows physicists and engineers to calculate the angular momentum and kinetic energy of a rotating body for any axis of rotation.

In special relativity, the electric field ## \mathbf{E} ## and magnetic field ## \mathbf{B} ## are not independent entities but rather components of a single, unified electromagnetic field tensor ## F_{\mu\nu} ##. This is a rank-2 antisymmetric covariant tensor in 4-dimensional spacetime.

### F_{\mu\nu} = \begin{pmatrix} 0 & -E_x/c & -E_y/c & -E_z/c \\ E_x/c & 0 & -B_z & B_y \\ E_y/c & B_z & 0 & -B_x \\ E_z/c & -B_y & B_x & 0 \end{pmatrix} ###

where ## c ## is the speed of light. The use of this tensor elegantly demonstrates how ## \mathbf{E} ## and ## \mathbf{B} ## fields transform into each other under Lorentz transformations (changes between inertial frames of reference). This tensor formulation allows Maxwell's equations to be written in a compact, manifestly covariant form, valid in all inertial frames.

In the context of machine learning and deep learning, the term "tensor" is often used more loosely to refer to multi-dimensional arrays. While these arrays store numerical data, they are considered tensors in the mathematical sense only if they represent quantities that adhere to specific transformation laws under coordinate changes.

Frameworks like TensorFlow and PyTorch are named after this concept because they primarily operate on these multi-dimensional arrays, which serve as the fundamental data structures for neural networks and other models. These "tensors" facilitate efficient computation, especially on GPUs, though their physical transformation properties are often not explicitly considered in the same way as in physics.

Common Confusions or Misconceptions

This is the most common misconception. While tensors are represented by multi-dimensional arrays of components in a specific coordinate system, the array itself is not the tensor. The defining feature of a tensor is how its components *transform* under a change of coordinates. An arbitrary multi-dimensional array is just a collection of numbers; it only becomes a tensor if its components satisfy the specific tensor transformation laws. For example, the list of a person's height, weight, and age is a 1D array, but it is not a vector (a rank-1 tensor) because these quantities do not transform like vector components under a rotation of coordinate axes.

The rank of a tensor (number of indices) is distinct from the dimensionality of the underlying space. A scalar (rank 0) or a vector (rank 1) can exist in a 3-dimensional space, a 4-dimensional spacetime, or any N-dimensional space. The rank describes the tensor's inherent structure, while the dimensionality of the space determines how many components the tensor will have (## N^{\text{rank}} ## components).

A matrix is a rectangular array of numbers. It can represent a linear transformation between two vector spaces, or it can represent the components of a rank-2 tensor. However, not every matrix is a tensor. For a matrix ## M_{ij} ## to represent a rank-2 tensor, its components must transform according to the rank-2 tensor transformation law when the coordinate system changes. For instance, the matrix of partial derivatives of a scalar field, ## \dfrac{\partial^2 \phi}{\partial x^i \partial x^j} ##, is a rank-2 tensor, but a matrix used to store arbitrary tabular data is not.

While tensors are indispensable in general relativity for describing spacetime curvature, their applications are much broader. They are fundamental in classical mechanics (stress, strain, inertia), electromagnetism, fluid dynamics, material science, and even in engineering disciplines like robotics and computer graphics. The principles of tensor analysis simplify the formulation of physical laws by making them coordinate-independent.

While differential geometry provides the most rigorous and general framework for tensors (especially tensor fields on manifolds), one can grasp the basic concept of tensors and their transformation laws in flat Euclidean spaces using linear algebra. The core idea of coordinate independence and transformation rules can be understood without immediately diving into curved spaces or advanced calculus.

Here is a table summarizing common tensor operations:

Operation Description Example (using Einstein Summation)
Addition Component-wise sum of tensors of the same rank and type. ## A_{ij} + B_{ij} = C_{ij} ##
Scalar Multiplication Multiplying a tensor by a scalar. ## \lambda A_{ij} = C_{ij} ##
Tensor Product (Outer Product) Combines two tensors to form a higher-rank tensor. ## A_i B_j = T_{ij} ## (from two rank-1 tensors to a rank-2)
Contraction Summing over a pair of one contravariant and one covariant index, reducing rank by 2. ## T^i_i = \text{scalar} ## (trace of a rank-2 mixed tensor)
Inner Product A specific type of contraction between two vectors, resulting in a scalar. ## A_i B^i = \text{scalar} ##

Why It Matters

Tensors are indispensable in modern science and engineering for several profound reasons:

In summary, tensors are not merely abstract mathematical constructs; they are powerful tools that provide a precise, universal language for describing the physical world, enabling breakthroughs in physics, engineering, and data science.

RESOURCES

  • Resources will be updated soon.