Are there any differences between tensors and multidimensional arrays?
I see lots of references saying things like
A tensor is a multidimensional or N-way array
But others that say things like
it should be remarked that other mathematical entities occur in physics that, like tensors, generally consist of multi-dimensional arrays of numbers, or functions, but that are NOT tensors. Most noteworthy are objects called spinors.
Are the terms "tensor" and "multidimensional array" interchangeable? Or is it more like "all squares are rectangles but not all rectangles are squares"?
Solution 1:
Tensor : Multidimensional array :: Linear transformation : Matrix.
The short of it is, tensors and multidimensional arrays are different types of object; the first is a type of function, the second is a data structure suitable for representing a tensor in a coordinate system.
In the sense you're asking, mathematicians usually define a "tensor" to be a multilinear function: a function of several vector variables that is "linear in each variable separately". A "tensor field" is a "tensor-valued function".
In more detail, if $M$ is a smooth manifold, there are a tangent bundle $TM$, a cotangent bundle $T^{*}M$, and "tensor bundles" obtained by taking tensor products of these bundles. A tensor field on $M$ is a section of a tensor bundle. (The answers to the question linked by John Mangual flesh out the details.)
Physicists call tensor fields "tensors". I'll (continue to) use mathematician-speak.
In a coordinate chart (i.e., a piece of $M$ diffeomorphic to an open set in a Euclidean space, together with a coordinate system), the tangent and cotangent bundles are trivialized by coordinate vectors and coordinate $1$-forms, and a tensor field is represented as a multidimensional array of functions.
The "transformation rules" for multidimensional arrays amount to the chain rule for vector fields and $1$-forms, i.e., to transition functions for tensors corresponding to changes of coordinates in $M$.
Solution 2:
It's helpful to think like a computer scientist here...
a tensor is a type of multidimensional array with certain transformation properties
So if we wrote the spec for array
we just have to specify the collection of numbers.
array(N1, N2, N3)
If we specify tensor, we need to specify how this array "transforms" under certain matrix operations.
A spinor is going to be a tensor with a group action in addition to the other transformation rules. In particular an $SU(2)$ group action.
This already happens in linear algebra. Take the function $T: (1,0) \mapsto (1,1), (0,1) \mapsto (1,-1)$. We can write this as a $2 \times 2$ matrix:
$$\left[ \begin{array}{cr} 1 & 1 \\ 1 & -1 \end{array}\right]$$
These matrices have eigenvalues and eigenvectors. We have to solve the equation:
$$ \lambda^2 + 2 = 0$$
We get eigenvectors of $\lambda = \pm \sqrt{2}$. The eigenvectors are $(1 \pm \sqrt{2}, 1) $ and the diagonal form is:
$$\left[ \begin{array}{cr} \sqrt{2} & 0 \\ 0 & -\sqrt{2} \end{array}\right]$$
The same geometric object a "linear transformation" can be one of two different matrices depending on the basis we choose!
In differential geometry we can consider the metric tensor:
$$ dz^2 = dx^2 + dy^2 $$
If we switch to polar coordinates: $x = r \cos \theta, y = r \sin \theta$. Then $dx = -r \sin \theta \, d\theta + \cos \theta \, dr$ and $dy = r \cos \theta \, d\theta + \sin \theta \, dr$. Then
\begin{eqnarray*} dz^2 &=& (-r \sin \theta \, d\theta + \cos \theta \, dr)^2 + ( r \cos \theta \, d\theta + \sin \theta \, dr)^2 \\ &=& (r d\theta)^2 + dr^2 \end{eqnarray*}
It should not matter if we compute the arc length in polar coordinates or cartesian, it should give the same answer.
Solution 3:
Tensor is not simply a multidimensional array. Tensor is "something" which can be represented as multidimensional array. And this representation must depend in some very specific way from where you are looking at this "something".
Let's take for example velocity of some object. It can be represented by three numbers, or a multidimensional array (1 x 3). But what are the numbers in this array depends on your system on reference. In one system of reference these numbers are (100, 0, 0). In another system of reference the numbers corresponding to the velocity of this very object at this very moment can be absolutely different. Let's say (60, 0, -80). Velocity is an example of tensor, by the way.
It's the rules of changing representation when switching between systems of reference that make multidimensional array a tensor. I can put several my favorite numbers into an array - but that will not be a tensor.
Another example of "non-tensor" would be "Christoffel symbols". These symbols are used in geometry and physics to describe the curvature of space. They are also represented by multidimensional arrays of numbers, there are some natural rules how these numbers are changed when you switch from one system of reference to another, but these rules are different from the tensor's rules. So Christoffel symbols are not a tensor.