# How to visualize a rank-2 tensor?

The notion (rank-2) "tensor" appears in many different parts of physics, e.g. stress tensor, moment of inertia tensor, etc.

I know mathematically a tensor can be represented by a 3x3 matrix. But I can't grasp its geometrical picture — unlike scalar (a number) and vector (an arrow with direction and magnitude) which I can easily see what's going on.

How to visualize a tensor?

-
Coordinate frame? –  Jonathan Fischoff Jul 26 '10 at 11:28
@Jon: What? [ ](http://.com) –  kennytm Jul 26 '10 at 11:34
If the matrix is not singular, you could think of the vectors as making up an oriented coordinate frames. Although I don't know if they are orthogonal, so the you would have to adjust the picture. –  Jonathan Fischoff Jul 26 '10 at 17:43
Or parallelepipeds, which is another way to think of 3x3 matrix. Not sure if visualization helps with the tensor though... –  Jonathan Fischoff Jul 26 '10 at 17:54

While tensors are generalizations of vectors, I don't think you can really generalize the way you visualize them. This is because you really want to think of tensors as multi-linear functions and you usually don't think of a vector as a linear function from the dual space to the real numbers.

So even if you can't get as nice a geometric picture of a tensor, you do get a nice grasp on what they are if you view them as multi-linear functions (as opposed to just a collection of numbers) from some copies of your vector space V (and/or its dual V*) into R. For example, a metric is a type of rank 2 tensor and has a nice geometric meaning-- applying it to two copies of a vector gives the vectors squared length, you can apply to to two vectors to get the angle between them, etc. The moment of inertia tensor is a 2-tensor I such that I(u,u) is the moment of inertia about the u-axis.

There are also usually different ways of looking at the same tensor, which may make it easier to get a grasp on it. For example, a (1,1) tensor is a multilinear map from V x V* into R. However, this can naturally (i.e. basis independently) be identified with a linear map from V to itself: if T is a (1,1) tensor then contracting it with a vector gives a linear map V* to R, which is just another vector.

-

The other solutions posted already do a good job of explaining tensors as dyads, linear transformations, or using the ellipsoid interpretation. I thought I'd give an engineering perspective.

In engineering applications, physical quantities (mass, velocity, force, etc.) are either "scalars", "vectors", or "tensors". What determines which one, is how the quantity changes under a coordinate transformation. In other words: If you rotate your world view, what happens to the quantity in question? Suppose $U$ is a rotation (read: orthogonal) matrix that rotates vectors from the initial frame $F_1$ to another frame $F_2$.

Scalars, such as mass, do not change at all. An object's mass does not depend on the orientation of your frame, so $m_1$ = $m_2$.

Vectors, such as force or velocity, do change. If $v_1$ is expressed in your starting frame, then $v_2 = U^Tv_1$. Rotating the frame amounts to rotating the vector. All vector quantities tranform in exactly this way.

Tensors, such as stress or inertia, change as well. If $J_1$ is expressed in your starting frame, then $J_2 = U^TJ_1U$. Any quantity that transforms in this manner is a tensor.

Angular momentum (the product of the moment of inertia and the angular velocity) is a vector, because: $$J_2 w_2 = U^TJ_1U U^Tw_1 = U^T(J_1 w_1)$$ Kinetic energy is a scalar, which is intuitive, but you can verify it using the transformations above. For an object in translational and rotational motion, $$E = \frac{1}{2} m_1 v_1^T v_1 + \frac{1}{2} w_1^T J_1 w_1 = \frac{1}{2} m_2 v_2^T v_2 + \frac{1}{2} w_2^T J_2 w_2$$ And so on.

-

One way to "visualize" a 2-tensor (in the presence of an inner product) is as follows: a vector $X$ can be regarded as a function mapping each direction $D$ to a scalar in a linear and homogeneous fashion, namely, the inner product $X\dot D$. In the same vein, a 2-tensor is a function mapping directions to vectors linearly and homogeneously.

-

A common approach for displaying symmetric tensors for scientific data visualization is the use of what are called "tensor glyphs" (see for example "Superquadric Tensor Glyphs" by Kindlmann, 2004). The basic idea helps for visualizing tensors intuitively, too. It really only makes sense for symmetric tensors, but then, many tensors that arise in physics are symmetric.

(Since my familiarity is only with linear algebra and not tensor analysis, I'm going to equate "tensor" and "matrix" in the following. According to the answers to this question, this is not a horribly wrong thing to do.)

Suppose the tensor $T$ is symmetric and positive definite. Treat it as a matrix, and transform the unit sphere $S = \{x : \|x\| = 1\}$ with it to get an ellipsoid $TS = \{x : \|T^{-1}x\| = 1\}$. The ellipsoid's axes are parallel to $T$'s eigenvectors, with lengths proportional to the corresponding eigenvalues. This has some other nice properties:

• The identity matrix is represented by a unit sphere.
• Scalar multiplication $\alpha T$ uniformly scales the ellipsoid by $\alpha$.
• A tensor with one large and two small eigenvalues looks like a line segment pointing along the large eigenvector.
• A tensor with two large and one small eigenvalues looks like a disk normal to the small eigenvector.
• The mapping between symmetric positive definite matrices/tensors and ellipsoids centered on the origin is bijective.

If your tensors are symmetric but not positive definite, you can still visualize them in terms of deformations of the unit sphere, corresponding to $I + \epsilon T$. Now a negative eigenvalue corresponds to shrinking, and a positive one to stretching.

-
Where I said "bijective" above, I should have said "bijective and continuous", which is also important. –  Rahul Aug 13 '10 at 23:48

Imagine a cube of sponge . Press it with two fingers on two opposite, parallel faces.Meanwhile give a parallel stress on the other sides as well. If you represent that using a tensor, that would be a rank two tensor.

Each face has two unit indices.

-