Moment of inertia
Moment of inertia, also called mass moment of inertia or the angular mass, (SI units kg m2, Former British units slug ft2), is the rotational analog of mass.  That is, it is the inertia of a rigid rotating body with respect to its rotation.  The moment of inertia plays much the same role in rotational dynamics as mass does in basic dynamics, determining the relationship between angular momentum and angular velocity, torque and angular acceleration, and several other quantities.  While a simple scalar treatment of the moment of inertia suffices for many situations, a more advanced tensor treatment allows the analysis of such complicated systems as spinning tops and gyroscope motion.
The symbols I and sometimes J are usually used to refer to the moment of inertia.
Moment of inertia was introduced by Euler in his book a Theoria motus corporum solidorum seu rigidorum in 1730. In this book, he discussed at length moment of inertia and many concepts, such as principal axis of inertia, related to the moment of inertia.

# Overview
The moment of inertia of an object about a given axis describes how difficult it is to change its angular motion about that axis.  For example, consider two discs (A and B) of the same mass.  Disc A has a larger radius than disc B.  Assuming that there is uniform thickness and mass distribution, it requires more effort to accelerate disc A (change its angular velocity) because its mass is distributed further from its axis of rotation: mass that is further out from that axis must, for a given angular velocity, move more quickly than mass closer in.  In this case, disc A has a larger moment of inertia than disc B.
The moment of inertia of an object can change if its shape changes.  A figure skater who begins a spin with arms outstretched provides a striking example.  By pulling in her arms, she reduces her moment of inertia, causing her to spin faster (by the conservation of angular momentum).
The moment of inertia has two forms, a scalar form I (used when the axis of rotation is known) and a more general tensor form that does not require knowing the axis of rotation.  The scalar moment of inertia I (often called simply the "moment of inertia") allows a succinct analysis of many simple problems in rotational dynamics, such as objects rolling down inclines and the behavior of pulleys.  For instance, while a block of any shape will slide frictionlessly down a decline at the same rate, rolling objects may descend at different rates, depending on their moments of inertia.  A hoop will descend more slowly than a solid disk of equal diameter because more of its mass is located far from the axis of rotation, and thus needs to move faster if the hoop rolls at the same angular velocity.  However, for (more complicated) problems in which the axis of rotation can change, the scalar treatment is inadequate, and the tensor treatment must be used (although shortcuts are possible in special situations).  Examples requiring such a treatment include gyroscopes, tops, and even satellites, all objects whose alignment can change.
The moment of inertia can also be called the mass moment of inertia (especially by mechanical engineers) to avoid confusion with the second moment of area, which is sometimes called the moment of inertia (especially by structural engineers) and denoted by the same symbol I.  The easiest way to differentiate these quantities is through their units.  In addition, the moment of inertia should not be confused with the polar moment of inertia, which is a measure of an object's ability to resist torsion (twisting).

# Scalar moment of inertia

## Definition
A simple definition of the moment of inertia of any object, be it a point mass or a 3D-structure, is given by:
where

### Detailed Analysis
The (scalar) moment of inertia of a point mass rotating about a known axis is defined by
The moment of inertia is additive.  Thus, for a rigid body consisting of N point masses m_{i} with distances r_{i} to the rotation axis, the total moment of inertia equals the sum of the point-mass moments of inertia:
For a solid body described by a continuous mass density function (r), the moment of inertia about a known axis can be calculated by integrating the square of the distance (weighted by the mass density) from a point in the body  to the rotation axis:
where
Based on dimensional analysis alone, the moment of inertia of a non-point object must take the form:
where
Inertial constants are used to account for the differences in the placement of the mass from the center of rotation.  Examples include:
- k = 1, thin ring or thin-walled cylinder around its center,
- k = 2/5, solid sphere around its center
- k = 1/2, solid cylinder or disk around its center.
For more examples, see the List of moments of inertia.

## Parallel axis theorem
Once the moment of inertia has been calculated for rotations about the center of mass of a rigid body, one can conveniently recalculate the moment of inertia for all parallel rotation axes as well, without having to resort to the formal definition.  If the axis of rotation is displaced by a distance R from the center of mass axis of rotation (e.g. spinning a disc about a point on its periphery, rather than through its center,) the displaced and center-moment of inertia are related as follows:
This theorem is also known as the parallel axes rule and is a special case of Steiner's parallel-axis theorem.

## Composite bodies
If a body can be decomposed (either physically or conceptually) into several constituent parts, then the moment of inertia of the body about a given axis is obtained by summing the moments of inertia of each constituent part around the same given axis.

## Equations involving the moment of inertia
The rotational kinetic energy of a rigid body can be expressed in terms of its moment of inertia.  For a system with N point masses m_{i} moving with speeds v_{i}, the rotational kinetic energy T equals
T = \sum_{i=1}^{N} \frac{1}{2} m_{i} v_{i}^{2}\,\! = \sum_{i=1}^{N} \frac{1}{2} m_{i} (\omega r_{i})^{2} = \frac{1}{2} \sum_{i=1}^{N} m_{i} r_{i}^{2} \omega^{2} = \frac{1}{2} I \omega^{2}
where \omega is the common angular velocity (in radians per second).  The final formula T=\frac{1}{2} I \omega^{2}\,\! also holds for a continuous distribution of mass with a generalisation of the above derivation from a discrete summation to an integration.
In the special case where the angular momentum vector is parallel to the angular velocity vector, one can relate them by the equation
where L is the angular momentum and \omega is the angular velocity.  However, this equation does not hold in many cases of interest, such as the torque-free precession of a rotating object, although its more general tensor form is always correct.
When the moment of inertia is constant, one can also relate the torque on an object and its angular acceleration in a similar equation:
where \tau is the torque and \alpha is the angular acceleration.

# Moment of inertia tensor
For the same object, different axes of rotation will have different moments of inertia about those axes.  In general, the moments of inertia are not equal unless the object is symmetric about all axes.  The moment of inertia tensor is a convenient way to summarize all moments of inertia of an object with one quantity.  It may be calculated with respect to any point in space, although for practical purposes the center of mass is most commonly used.

## Definition
For a rigid object of N point masses m_{k}, the moment of inertia tensor is given by
\mathbf{I} = \begin{bmatrix}
I_{xx} & I_{xy} & I_{xz} \\
I_{yx} & I_{yy} & I_{yz} \\
I_{zx} & I_{zy} & I_{zz}
\end{bmatrix}
Its components are defined as
where
The diagonal elements are more succinctly written as
while the off-diagonal elements, also called the products of inertia, are
Here I_{xx} denotes the moment of inertia around the x-axis when the objects are rotated around the x-axis, I_{xy} denotes the moment of inertia around the y-axis when the objects are rotated around the x-axis, and so on.
These quantities can be generalized to an object with continuous density in a similar fashion to the scalar moment of inertia.  One then has
where \mathbf{r}\otimes \mathbf{r} is their outer product, E3 is the 3  3 identity matrix, and V is a region of space completely containing the object.

## Derivation of the tensor components
The distance r of a particle at \mathbf{x} from the axis of rotation passing through the origin in the \mathbf{\hat{n}} direction is 
 |\mathbf{x}-(\mathbf{x} \cdot \mathbf{\hat{n}}) \mathbf{\hat{n}}|. By using the formula I=mr^2  (and some simple vector algebra) it can be seen that the moment of inertia of this particle (about the axis of rotation passing through the origin in the \mathbf{\hat{n}}  direction) is 
I=m(|\mathbf{x}|^2 (\mathbf{\hat{n}} \cdot \mathbf{\hat{n}})-(\mathbf{x} \cdot \mathbf{\hat{n}})^2).
This is a quadratic form in \mathbf{\hat{n}} and, after a bit more algebra, this leads to a tensor formula for the moment of inertia
{I} = m \begin{bmatrix}
-y x & x^2+z^2 & -yz \\
-zx & -zy & x^2+y^2
\end{bmatrix} \begin{bmatrix}
n_3
\end{bmatrix}
This is exactly the formula given below for the moment of inertia in the case of a single particle. For multiple particles we need only recall that the moment of inertia is additive in order to see that this formula is correct.

## Reduction to scalar
For any axis \hat{\mathrm{n}}, represented as a column vector with elements ni, the scalar form I can be calculated from the tensor form I as
I = \mathbf{\hat{n}^{T}} \mathbf{I}\, \mathbf{\hat{n}} = 
\sum_{j=1}^{3} \sum_{k=1}^{3} n_{j} I_{jk} n_{k} .
The range of both summations correspond to the three Cartesian coordinates.
The following equivalent expression avoids the use of transposed vectors which are not supported in maths libraries because internally vectors and their transpose are stored as the same linear array,
I = \mathbf{{I}^{T}} \mathbf{\hat{n}} \cdot \mathbf{\hat{n}}.
However it should be noted that although this equation is mathematically equivalent to the equation above for any matrix, inertia tensors are symmetrical.  This means that it can be further simplified to:
I = \mathbfTemplate:I \mathbf{\hat{n}} \cdot \mathbf{\hat{n}}.

## Principal moments of inertia
Since the moment of inertia tensor is real and symmetric, it is possible to find a Cartesian coordinate system in which it is diagonal, having the form
\mathbf{I} = \begin{bmatrix}
I_{1} & 0 & 0 \\
0 & I_{2} & 0 \\
0 & 0 & I_{3}
\end{bmatrix}
where the coordinate axes are called the principal axes and the 
constants I_{1}, I_{2} and I_{3} are called the principal moments of inertia.  The unit vectors along the principal axes are usually denoted as (\mathbf{e}_{1}, \mathbf{e}_{2}, \mathbf{e}_{3}).
When all principal moments of inertia are distinct, the principal axes are uniquely specified.  If two principal moments are the same, the rigid body is called a symmetrical top and there is no unique choice for the two corresponding principal axes.  If all three principal moments are the same, the rigid body is called a spherical top (although it need not be spherical) and any axis can be considered a principal axis, meaning that the moment of inertia is the same about any axis.
The principal axes are often aligned with the object's symmetry axes.  If a rigid body has an axis of symmetry of order m, i.e., is symmetrical under rotations of 360/m about a given axis, the symmetry axis is a principal axis.  When m>2, the rigid body is a symmetrical top.  If a rigid body has at least two symmetry axes that are not parallel or perpendicular to each other, it is a spherical top, e.g., a cube or any other Platonic solid.  A practical example of this mathematical phenomenon is the routine automotive task of balancing a tire, which basically means adjusting the distribution of mass of a car wheel such that its principal axis of inertia is aligned with the axle so the wheel does not wobble.

## Parallel axis theorem
Once the moment of inertia tensor has been calculated for rotations about the center of mass of the rigid body, there is a useful labor-saving method to compute the tensor for rotations offset from the center of mass.
If the axis of rotation is displaced by a vector R from the center of mass, the new moment of inertia tensor equals
\mathbf{I}^{\mathrm{displaced}} = \mathbf{I}^{\mathrm{center}} + M \left
where M is the total mass of the rigid body,  E3 is the 3  3 identity matrix, and \otimes is the outer product.

## Other mechanical quantities
Using the tensor I, the kinetic energy can be written
as a quadratic form
T = \frac{1}{2} \boldsymbol\omega^T \mathbf{I}\, \boldsymbol\omega = 
\frac{1}{2} I_{1} \omega_{1}^{2} + \frac{1}{2} I_{2} \omega_{2}^{2} + \frac{1}{2} I_{3} \omega_{3}^{2}
and the angular momentum can be written as a product
\mathbf{L} = \mathbf{I}\, \boldsymbol\omega = 
\omega_{1} I_{1} \mathbf{e}_{1} + \omega_{2} I_{2} \mathbf{e}_{2} + \omega_{3} I_{3} \mathbf{e}_{3}
Taken together, one can express the rotational kinetic energy in terms of the angular momentum (L_{1}, L_{2}, L_{3}) in the principal axis frame as
T = 
\frac{L_{1}^{2}}{2I_{1}} + \frac{L_{2}^{2}}{2I_{2}} + \frac{L_{3}^{2}}{2I_{3}}.\,\!
The rotational kinetic energy and the angular momentum are constants of the motion (conserved quantities) in the absence of an overall torque.  The angular velocity  is not constant; even without a torque, the endpoint of this vector may move in a plane (see Poinsot's construction).
See the article on the rigid rotor for more ways of expressing the kinetic energy of a rigid body.