Example 13
Matrices Applied to 
the Moment of Inertia Tensor

Copyright „ 1993 by Bill Titus, Carleton College, 
Department of Physics and Astronomy, Northfield, MN  55057-4025
September 6, 1993

Topics and Skills

1.  Creating symbolic matrices using  Array[].
2.  Using line sequences of equal input to compact code.
3.  Factor[].
4.  Eigenvalues[]  and   Eigenvectors[].

Problem

Consider a uniform square lamina of side  a  and mass  m  lying in the x-y plane with the origin of the cartesian coordinate system at the bottom-left corner of the square, as viewed from above.

a.  Find the moment of inertia tensor for this object.  Recall that for a plane lamina where  z = 0, the only non-vanishing elements in the inertia tensor are

Ixx = Ú ry2 dxdy
    Ixy = Iyx = -Ú rxy dxdy
    Iyy = Ú rx2 dxdy
    Izz = Ú r(x2 + y2) dxdy

Here  r  is the density, and the integrals are taken over the square area.

b.  Find the eigenvalues and eigenvectors for the moment of inertia tensor.  Recall that these quantities correspond to the principle moments of inertia and the principle axes.

Solution - Part 1

Step 1 - Generate a symbolic 3 x 3 inertia tensor  iTensor  using the MMA command  Array[].  Denote the symbolic elements of  iTensor  by  iT.

Step 2 -  Evaluate the nine elements of the inertia tensor for this particular problem.  Do the necessary 2D integrations symbolically using  Integrate[].  Display the results in matrix form.  You should find that  iTensor  equals

Comment 2

1.  MMA allows a sequence of inputs of the form  z1 = z2 = ... = b  on a single line.  This shorthand notation can help compact your code, and yet still make it readable.  Try it out on your code in Step 2.

Solution - Part b

Step 1 - One can determine the eigenvalues  e  of the inertia tensor by finding the roots of the characteristic polynomial,  
det(iTensor - eI), where  I  is the identify matrix.  First find the characteristic polynomial as a function of  e  and call it  charPoly.  The identity matrix in MMA is generated by the function  IdentityMatrix[].  How do you think one calculates the determinant of a matrix within MMA?

Step 2 - Your polynomial probably looks a bit ugly.  Try factoring it using MMA's function  Factor[].

Step 3 - Find the three roots of your polynomial equation using  Solve[].  Call the result  eigenValues.

Step 4 - The  eigenvector  vj  corrresponding to the eigenvalue  ej  satisfies the matrix equation

                       (iTensor  -  ej  I) vj  =  0

and corresonds to one of the principle axes of rotation.  Because these equations are homogeneous, there will be one arbitrary component in each eigenvector; this component is sometimes fixed by requiring that the eigenvector be normalized.  The following code determines the unnormalized components of the eigenvector corresponding to the first eigenvalue.  Look it over and then activate the cell.  Finally modify the code to find the other two eigenvectors.

Clear[vVector, v, myEqu]
vVector = {v[1], v[2], v[3]};
myEqu = (iTensor - eigenValues[[1,1,2]] *
         IdentityMatrix[3]) . vVector;
Solve[myEqu[[1]] == 0, v[1]]
Solve[myEqu[[2]] == 0, v[1]]
Solve[myEqu[[3]] == 0, v[3]]

Comment 4

1.  You should find that  (1, 1, 0)  is the eigenvector for  (1/12)ma2,  (1, -1, 0) is the eigenvector for  (7/12)ma2,  and  (1, -1, 0)  is the eigenvector for  (2/3)ma2.

Step 5 - There's an easier way to find the eigenvalues and eigenvectors, and that's by letting MMA to it for you.  Find the MMA functions which determine eigenvalues and eigenvectors and apply them to your problem.

Comment 5

1.  Do the results agree with what you found before?
2.  MMA doesn't normalize its eigenvectors.

Step 5 -  Since the inertia tensor is real and symmetric, its eigenvectors should be orthogonal.  Use MMA to prove that your eigenvectors are indeed orthogonal.

Save Your Notebook

Remove any output cells from this notebook and then use  Save As  to store your notebook under the name   myEx13.