What's the symbol m in this sum? I'm supposed to write some code to calculate the inertia moments of a shape, but I am afraid I have been given too little information. 
The matrix that I must obtain is this one:
$$
\begin{vmatrix}
J_{xx} = \sum \limits_i m_i y_i² & 
J_{xy} = -\sum \limits_i m_i x_i y_i\\
J_{xy} = -\sum \limits_i m_i x_i y_i & 
J_{yy} = \sum \limits_i m_i x_i² \end{vmatrix}
$$
Which we can denote by
$$
\begin{vmatrix}
A & 
-F\\
-F& 
B \end{vmatrix}
$$
Apparently, the eigenvectors $v_1$ and $v_2$ obtained from that matrix, with 
$$
v_n = \begin{vmatrix}
-F \\
-A+r_n\end{vmatrix}
$$
and $r_n$ being the corresponding eigenvalue, will determine the orientation of the shape.
The problem is that it is nowhere stated what the $m$ in the sums is supposed to be. Knowing that it's just a shape, is it possible that this mass is always 1 in this case?
In addition, I think the $x$ and $y$ values of each point have to be measured from the centre of mass of the shape, but I'm not sure.
Is anyone familiar with these concepts and kind enough to clear out my doubts?
 A: Regard the kinetic energy of an assembly of $N$ masses $m_i$ that lie at the distances $r_i$ from a pivot point $P$, which is the sum of the kinetic energy of the individual masses:
$$E_{kin} = \sum_{i=1}^N \frac12\,m_i \mathbf{v}_i\cdot\mathbf{v}_i = \sum_{i=1}^N \frac12\,m_i (\omega\, r_i)^2 = \frac12\, \omega^2 \underbrace{\sum_{i=1}^N m_i \,r_i^2}_{J_{p}}$$
while $\mathbf{v}_i$ velocity.
Hereof results that the moment of inertia of the body is the sum of each of the $m_i r_i^2$ terms, that is:
$$J_{p}=\sum_{i=1}^N m_i \,r_i^2 \qquad (1)$$
But not sure if this is what you look for and perhaps confuses you. The moment of inertia of a body moving in a plane and the second moment of area of a beam's cross-section are often confused. A beam along the z-axis has stresses in the cross-section in the x-y plane that are calculated using the second moment of this area around either the x-axis or y-axis depending on the load. The moment of inertia of mass distributed along a body with the shape of this cross-section is the second moment of this area about the z-axis weighted by its density. The second moment of area around an axis perpendicular to the area is called the polar moment of the area, and is the sum of the second moments about the x and y axes.
The second moment of area for an arbitrary shape with respect to the the x-axis is denoted $J_{xx}$ (see for details for insatnce here>>>).
So if I understood the question correctly, the clue is that you look for moment of inertia of a body in the geometric context of the second moment of area. The result is simple the second second moment of area takes in this case mathematical the form of moment of inertia of a body (equation 1); hence $r_i \sim y_i$
$$J_{xx}=\sum_{i=1}^N m_i \,y_i^2$$

In extension to the abovementioned. The second moment of area is a property of a two-dimensional plane shape which characterizes its deflection under loading. The second moment of area has dimensions of length to the fourth power. Unfortunately, in engineering contexts, the second moment of area is often called simply "the" moment of inertia even though it is not equivalent to the usual moment of inertia of a body (which has dimensions of mass times length squared and characterizes the angular acceleration undergone by a solid when subjected to a torque). 
The second moment of area about the $x$-axis is defined by (commonly this is known in integral but for your calculation discrete) 
$$J_{xx}=\sum_i y_i^2$$
while more generally, the product moment of area is defined by:
$$J_{xx}=\sum_i x_i y_i$$
More generally, the second moment of area tensor $J_{k,l}$ is given by:
$$\begin{pmatrix}
J_{xx} = \sum \limits_i y_i² & 
J_{xy} = -\sum \limits_i x_i y_i\\
J_{xy} = -\sum \limits_i x_i y_i & 
J_{yy} = \sum \limits_i x_i² \end{pmatrix}$$
This is a geometric context and has no mass.
In the physical context "the" moment of inertia (moment of inertia of a body) would be of the same mathematical form, however, different dimmension, hence having mass into account:
$$\begin{pmatrix}
J_{xx} = \sum \limits_i m_i y_i² & 
J_{xy} = -\sum \limits_i m_i x_i y_i\\
J_{xy} = -\sum \limits_i m_i x_i y_i & 
J_{yy} = \sum \limits_i m_i x_i² \end{pmatrix}$$
Resume you have mass in your case and "the" moment of inertia (moment of inertia of a body) in the physical context and must keep it as long this is a physical phenomenon of moment of inertia of a body.
A: I think the idea here is that you can find the total moment of inertia of an object by adding up all the tiny moments.  That is, for a point mass at distance $y$ and mass $m$, we write
$$
J = my^2
$$
If our object consists of several point masses of mass $m_i$ at respective distances $y_i$, we may find the total moment of inertia as
$$
J = \sum_{i=1}^n m_iy_i^2
$$
If you have a smooth object, you can approximate the moment of inertia by thinking of it in this manner, that is, as a collection of individual point masses at their respective distances from the axis of rotation.  This sum can be rendered more precise when it is changed to its analogous integral:
$$
J = \int y^2dm
$$

If you take the object to be of uniform density (which is a common assumption to make in these calculations), the matrix in question becomes
$$
\begin{vmatrix}
J_{xx} = M \sum \limits_i y_i² & 
J_{xy} = -M \sum \limits_i x_i y_i\\
J_{xy} = -M \sum \limits_i x_i y_i & 
J_{yy} = M \sum \limits_i x_i² \end{vmatrix}
$$
What exactly you put for $M$ (the mass of the object) will not effect what the eigenvectors are. So, it should turn out fine if you set, for example, $M=1$.
